Skip to content

[exporterhelper] Use span links when tracing across queue #12212

Closed
@jade-guiton-dd

Description

@jade-guiton-dd

Is your feature request related to a problem? Please describe.

The observability requirements for stable components requires the processing performance of a component to be observable.

At the moment, this is not quite true for the OTLP exporter (cf. telemetry review), and prevents its stabilization. Using the exporterhelper, it emits a span for the exporting operation, (including retries), but there is no link with the initial trace that enqueued the data, which prevents analysis of latency and queueing times.

Update: In the case of the in-memory queue and with the fix at #12225, there will actually be a parent-child relationship. But even in that case, I think a span link would be more appropriate for the reasons below.

Describe the solution you'd like

When the queue is enabled in exporterhelper, I think a span should be emitted, its SpanContext should be saved in the queue (potentially serialized if using the persistent queue), and the span for the export operation should have a span link linking it to the queueing operation. Note that the links may be N to N, because the batching exporter may fuse or split batches. Adding an attribute on each link describing how many items were processed from an initial batch may be useful.

Describe alternatives you've considered

It would also be possible to measure the latency using a new metric, but this would provide less information, and would still require some context propagation through the queue.

Additional context

Related issues: #11740, #8804

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions