Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: library updates #9170

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/cmetrics/.github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
with:
submodules: true

- name: Set up with Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.29 # For using VS2019 C++

- name: Build on ${{ matrix.os }} with vs-2019
run: |
.\scripts\win_build.bat
Expand All @@ -39,10 +44,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 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

Expand Down
8 changes: 7 additions & 1 deletion lib/cmetrics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# CMetrics Version
set(CMT_VERSION_MAJOR 0)
set(CMT_VERSION_MINOR 9)
set(CMT_VERSION_PATCH 1)
set(CMT_VERSION_PATCH 3)
set(CMT_VERSION_STR "${CMT_VERSION_MAJOR}.${CMT_VERSION_MINOR}.${CMT_VERSION_PATCH}")

# Include helpers
Expand Down Expand Up @@ -241,6 +241,12 @@ if (NOT CMT_HAVE_CFL)
COMPONENT headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)

install(TARGETS cfl-static
RUNTIME DESTINATION ${CMT_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMT_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMT_INSTALL_LIBDIR}
COMPONENT library)

# xxHash
install(FILES lib/cfl/lib/xxhash/xxh3.h
DESTINATION ${CMT_INSTALL_INCLUDEDIR}
Expand Down
2 changes: 0 additions & 2 deletions lib/cmetrics/scripts/win_build.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
setlocal
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
path "C:\Program Files (x86)\MSBuild\16.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin";%path%
git submodule update --init --recursive
cd build
cmake -G "NMake Makefiles" -DCMT_TESTS=On ..\
Expand Down
2 changes: 1 addition & 1 deletion lib/cmetrics/src/cmt_decode_prometheus.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int parse_uint64(const char *in, uint64_t *out)
int64_t val;

errno = 0;
val = strtol(in, &end, 10);
val = strtoll(in, &end, 10);
if (end == in || *end != 0 || errno) {
return -1;
}
Expand Down
5 changes: 3 additions & 2 deletions lib/ctraces/.github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/ctraces/.github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/ctraces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/ctraces/examples/otlp-encoder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ service:
```

Now you can run the example and see the trace data logged by the collector instance.

7 changes: 6 additions & 1 deletion lib/ctraces/src/ctr_encode_msgpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading