Skip to content

OM 2.0: Consider specifying the keys used for trace id and span id #316

@dashpole

Description

@dashpole

Problem Statement

We provide trace correlation as an example use-case for exemplars.

A common use case are IDs of program traces.

The standard for propagating trace identifiers is the w3c Trace Context spec: https://www.w3.org/TR/trace-context-2/.

It would be helpful to provide guidance about how that trace identifier should be added to exemplars. For example, if prometheus clients want to provide any plugins or libraries to make it easier to add exemplars from OpenTelemetry or any other tracing library, it would help provide direction for how trace correlation should be done.

Proposed solution

Align with https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#exemplars-1, but only reference the w3c spec.

Proposed text:

When an exemplar references a Trace Context, it SHOULD use the trace_id key for the trace-id, and the span_id key for the parent-id.

Alternatives considered

Leave the spec as-is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions