New link creates second ghost link #6284
Replies: 2 comments 8 replies
-
Probably we need a bit more information here. Where are you exporting spans to? How are they getting exported? What versions of the OTel libraries are you using? |
Beta Was this translation helpful? Give feedback.
-
Hmm.. we have an integration test that creates a span with a link, and verifies that after a round trip (java app w/ sdk -> otel collector -> java app) the link is as expected. I wonder if grafana or your backend is doing something wrong with the link. Could you run the same scenario, but use the OtlpJsonLoggingSpanExporter (i.e. logging-otlp if using autoconfigure)? The logging otlp exporter will log the full OTLP JSON encoding of the spans, so we'll be able to know if its a problem with the SDK, or elsewhere. |
Beta Was this translation helpful? Give feedback.
-
I'm using open-telemetry for Java version 1.36.0 and creating a new Span (using SpanBuilder) and adding a single link to a related span. That just one link was added via the API is verified by some logging. The link creation works and we get the link to the related traceId and spanId. We also get a link to the current traceId with a spanId of all 0's. (Viewed in Grafana)
Expected:
trace (id=1)
span (id=15)
link (related - traceId=2, spanId = 20)
Actual:
trace (id=1)
span (id=15)
link (related - traceId=1, spanId = 00...) - not a valid spanId
link (related - traceId=2, spanId = 20)
Is this a unique instance of a problem or are other people seeing this?
Java version - 17
Expectation: A single link within the new span
Tried: updating to the latest version of open-telemetry, logging to ensure a link was only added once. Also logged the toString of the new span after spanbuilder.startSpan() and the totalRecordedLinks=1.
Beta Was this translation helpful? Give feedback.
All reactions