Skip to content

Commit e276a86

Browse files
leonardo-albertovichedsiper
authored andcommitted
opentelemetry: made the scope field optional
Signed-off-by: Leonardo Alminana <leonardo.alminana@chronosphere.io>
1 parent 6783bc7 commit e276a86

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ctr_decode_opentelemetry.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,10 @@ int ctr_decode_opentelemetry_create(struct ctrace **out_ctr,
552552

553553
scope_span = ctr_scope_span_create(resource_span);
554554
ctr_scope_span_set_schema_url(scope_span, otel_scope_span->schema_url);
555-
ctr_scope_span_set_scope(scope_span, otel_scope_span->scope);
555+
556+
if (otel_scope_span->scope != NULL) {
557+
ctr_scope_span_set_scope(scope_span, otel_scope_span->scope);
558+
}
556559

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

0 commit comments

Comments
 (0)