Skip to content

Commit

Permalink
opentelemetry: made the scope field optional
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Apr 24, 2024
1 parent fc02f71 commit 8d008c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ctr_decode_opentelemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,10 @@ int ctr_decode_opentelemetry_create(struct ctrace **out_ctr,

scope_span = ctr_scope_span_create(resource_span);
ctr_scope_span_set_schema_url(scope_span, otel_scope_span->schema_url);
ctr_scope_span_set_scope(scope_span, otel_scope_span->scope);

if (otel_scope_span->scope != NULL) {
ctr_scope_span_set_scope(scope_span, otel_scope_span->scope);
}

for (span_index = 0; span_index < otel_scope_span->n_spans; span_index++) {
otel_span = otel_scope_span->spans[span_index];
Expand Down

0 comments on commit 8d008c9

Please sign in to comment.