Hi everyone,
I’m working on a synthetic trace generation setup using OTLP JSON payloads sent directly to Tempo. My goal is to simulate multiple durations or phases of the same operation and have them appear on the same row or timeline in Grafana’s trace view.
What I Tried
I created two spans with:
- The same trace ID
- The same span ID
- The same operation name
- Different start and end times
I submitted them via OTLP HTTP using a JSON payload.
What I Expected
I was hoping Grafana would merge these into a single row or timeline bar, showing the two durations as a continuous or segmented span.
What I Observed
Instead, Grafana rendered them as two separate rows, even though everything about the spans was identical except for the time range.
Span Visualization
Table Details
My Question
Is there any way to get Grafana to visualize multiple durations or phases of the same operation on the same row?
Would using events inside a single span be the only supported way to do this? Or is there a configuration or metadata trick that can help group them visually?
Any insights or workarounds would be greatly appreciated!
Thanks
IMHO this is a violation of OpenTelemetry spec. Span IDs should be unique in the trace.
What’s the reason behind that decision?
Thanks for your response — you’re absolutely right that reusing span IDs violates the OpenTelemetry spec, and I appreciate the clarification.
The reason I tried using the same span ID was based on a visualization goal: I was hoping that by keeping the trace ID and span ID the same, Grafana Tempo would render the two spans on the same row or timeline, either sequentially or as a continuation of the same logical operation. Instead, they appeared as separate spans on different rows, which was unexpected.
My actual goal is to represent multiple durations or phases of the same operation in a way that they appear visually grouped — ideally on the same row — even if there’s a gap or pause between them. I also tried using events within a single span to simulate this, but the result was a bit too “blended”: the events are shown as markers, but they don’t clearly reflect distinct time segments or inactive periods between phases.
Is there a spec-compliant way to achieve this kind of visualization? Maybe something like:
- A single span with structured events that can be visually segmented?
- A custom attribute or scope that helps Grafana group sibling spans into one row?
- Or perhaps a different visualization approach altogether?
Would love to hear if you have tackled something similar or has ideas on how to model this more effectively.
Thanks again!