Skip to content

Commit

Permalink
lib: ctraces: upgrade to v0.5.5
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Aug 14, 2024
1 parent 23d514e commit 960419b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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 3)
set(CTR_VERSION_PATCH 5)
set(CTR_VERSION_STR "${CTR_VERSION_MAJOR}.${CTR_VERSION_MINOR}.${CTR_VERSION_PATCH}")

# Define __FILENAME__ consistently across Operating Systems
Expand Down
1 change: 1 addition & 0 deletions lib/ctraces/src/ctr_decode_opentelemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ int ctr_decode_opentelemetry_create(struct ctrace **out_ctr,
otel_resource_span = service_request->resource_spans[resource_span_index];
if (otel_resource_span == NULL) {
opentelemetry__proto__collector__trace__v1__export_trace_service_request__free_unpacked(service_request, NULL);
ctr_destroy(ctr);
return -1;
}

Expand Down
3 changes: 2 additions & 1 deletion lib/ctraces/src/ctr_encode_opentelemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ static Opentelemetry__Proto__Trace__V1__ResourceSpans **set_resource_spans(struc

otel_resource_span = initialize_resource_span();
if (!otel_resource_span) {
free(rs);
return NULL;
}
otel_resource_span->resource = ctr_set_resource(resource_span->resource);
Expand Down Expand Up @@ -1305,12 +1306,12 @@ cfl_sds_t ctr_encode_opentelemetry_create(struct ctrace *ctr)
len = opentelemetry__proto__collector__trace__v1__export_trace_service_request__get_packed_size(req);
buf = cfl_sds_create_size(len);
if (!buf) {
destroy_export_service_request(req);
return NULL;
}
cfl_sds_set_len(buf, len);

opentelemetry__proto__collector__trace__v1__export_trace_service_request__pack(req, (uint8_t *)buf);

destroy_export_service_request(req);

return buf;
Expand Down

0 comments on commit 960419b

Please sign in to comment.