From 9392bc1127d03a2aef2832d0a985cff12e9672ee Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Tue, 6 Aug 2024 10:16:20 -0600 Subject: [PATCH] lib: ctraces: upgrade to v0.5.4 Signed-off-by: Eduardo Silva --- lib/ctraces/.github/workflows/build.yaml | 5 +++-- lib/ctraces/.github/workflows/lint.yaml | 2 +- lib/ctraces/CMakeLists.txt | 2 +- lib/ctraces/examples/otlp-encoder/README.md | 1 - lib/ctraces/src/ctr_encode_msgpack.c | 7 ++++++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/ctraces/.github/workflows/build.yaml b/lib/ctraces/.github/workflows/build.yaml index 45710f6c4f2..97b7639e7d1 100644 --- a/lib/ctraces/.github/workflows/build.yaml +++ b/lib/ctraces/.github/workflows/build.yaml @@ -39,10 +39,11 @@ jobs: steps: - name: Set up base image dependencies run: | + sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo + sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo yum -y update && \ yum install -y ca-certificates cmake curl-devel gcc gcc-c++ git make wget && \ - wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ - rpm -ivh epel-release-latest-7.noarch.rpm && \ + yum install -y epel-release yum install -y cmake3 shell: bash diff --git a/lib/ctraces/.github/workflows/lint.yaml b/lib/ctraces/.github/workflows/lint.yaml index 46471fa5b19..2be0e40c674 100644 --- a/lib/ctraces/.github/workflows/lint.yaml +++ b/lib/ctraces/.github/workflows/lint.yaml @@ -29,4 +29,4 @@ jobs: steps: - uses: actions/checkout@v3 - name: Run markdownlint - uses: actionshub/markdownlint@2.0.2 + uses: actionshub/markdownlint@v3.1.4 diff --git a/lib/ctraces/CMakeLists.txt b/lib/ctraces/CMakeLists.txt index 5f6a96b0f68..425384fcce9 100644 --- a/lib/ctraces/CMakeLists.txt +++ b/lib/ctraces/CMakeLists.txt @@ -27,7 +27,7 @@ endif() # CTraces Version set(CTR_VERSION_MAJOR 0) set(CTR_VERSION_MINOR 5) -set(CTR_VERSION_PATCH 2) +set(CTR_VERSION_PATCH 3) set(CTR_VERSION_STR "${CTR_VERSION_MAJOR}.${CTR_VERSION_MINOR}.${CTR_VERSION_PATCH}") # Define __FILENAME__ consistently across Operating Systems diff --git a/lib/ctraces/examples/otlp-encoder/README.md b/lib/ctraces/examples/otlp-encoder/README.md index 78e65aca35d..ab2bfa0bd01 100644 --- a/lib/ctraces/examples/otlp-encoder/README.md +++ b/lib/ctraces/examples/otlp-encoder/README.md @@ -23,4 +23,3 @@ service: ``` Now you can run the example and see the trace data logged by the collector instance. - diff --git a/lib/ctraces/src/ctr_encode_msgpack.c b/lib/ctraces/src/ctr_encode_msgpack.c index 4c863608830..63714b0af44 100644 --- a/lib/ctraces/src/ctr_encode_msgpack.c +++ b/lib/ctraces/src/ctr_encode_msgpack.c @@ -424,7 +424,12 @@ static void pack_scope_spans(mpack_writer_t *writer, struct cfl_list *scope_span /* scope */ mpack_write_cstr(writer, "scope"); - pack_instrumentation_scope(writer, scope_span->instrumentation_scope); + if (scope_span->instrumentation_scope != NULL) { + pack_instrumentation_scope(writer, scope_span->instrumentation_scope); + } + else { + mpack_write_nil(writer); + } /* spans */ mpack_write_cstr(writer, "spans");