opentelemetry-specification icon indicating copy to clipboard operation
opentelemetry-specification copied to clipboard

Consider adopting ECS convention for logging spec's Trace Context in Legacy Formats

Open trask opened this issue 1 year ago • 4 comments

Currently, the logging spec's Trace Context in Legacy Formats says:

the following field names should be used in legacy formats:

"trace_id" for TraceId, hex-encoded. "span_id" for SpanId, hex-encoded. "trace_flags" for trace flags, formatted according to W3C traceflags format.

I think it's worth considering using instead the ECS field names trace.id, span.id and trace.flags.

Related: https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7985

cc @AlexanderWert

trask avatar Mar 08 '23 05:03 trask

Is this issue still being considered? I see https://github.com/elastic/ecs-logging-java/issues/214#issuecomment-1733893266, #3469, and #3518 suggest we are planning to keep the current field names.

I'm interested in seeing https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/logging_trace_context.md reach stability, and this appears to be the only related issue.

@jack-berg @tigrannajaryan

dashpole avatar Feb 23 '24 20:02 dashpole

I think the conclusion in https://github.com/open-telemetry/opentelemetry-specification/issues/3518 was that we keep the names. It has been a while and there is no new evidence that we need to do something else so I suggest that we submit a PR that declares https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/logging_trace_context.md "Stable" and closes this issue. @dashpole do you want to do it?

tigrannajaryan avatar Feb 27 '24 17:02 tigrannajaryan

PR: https://github.com/open-telemetry/opentelemetry-specification/pull/3909

dashpole avatar Feb 27 '24 19:02 dashpole