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

Stabilize the trace context in non-OTLP formats spec

Open dashpole opened this issue 11 months ago • 13 comments

Closes https://github.com/open-telemetry/opentelemetry-specification/issues/3303

Changes

From @tigrannajaryan in https://github.com/open-telemetry/opentelemetry-specification/issues/3303#issuecomment-1967252364:

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.

This marks the specification for using trace_id, span_id, and trace_flags in non-OTLP logging formats stable.

@jack-berg

dashpole avatar Feb 27 '24 18:02 dashpole

@jmacd raised one potential concern: We want to add some OpenTracing fields (sampling priority?) to this specification, which have dots in them. This would potentially leave us with some fields with dots, and others with underscores. Josh, if there are related issues/PRs, feel free to add them here.

dashpole avatar Mar 05 '24 16:03 dashpole

@jmacd raised one potential concern: We want to add some OpenTracing fields (sampling priority?) to this specification, which have dots in them. This would potentially leave us with some fields with dots, and others with underscores. Josh, if there are related issues/PRs, feel free to add them here.

Can you clarify which OpenTracing fields? Dots are totally fine at namespace separators. We use underscores as word separators.

tigrannajaryan avatar Mar 05 '24 17:03 tigrannajaryan

I have a couple of concern about the absence of an explicit statement about tracestate, which is usually mentioned in the list of W3C trace context fields. In this case, I think it's OK to explicitly state that tracestate is not for recording in logs. We should, instead (IMO),define semantic conventions in case there are any useful fields in the tracestate that make sense for logs.

Here's what that looks like, for example: https://github.com/open-telemetry/semantic-conventions/pull/793

In this case, I have work-in-progress to perform trace sampling based on OTEP 235 (https://github.com/open-telemetry/oteps/blob/main/text/trace/0235-sampling-threshold-in-trace-state.md) inside the collector-contrib probabilistic sampler processor, which applies to both spans and logs. What this means is that the sampler for logs will not try to encode sampling probability using an equivalent to tracestate in the log record, it will do that using attributes for randomness and threshold instead.

I propose this change before stabilizing: https://github.com/open-telemetry/opentelemetry-specification/pull/3923

jmacd avatar Mar 06 '24 00:03 jmacd

Related: https://github.com/open-telemetry/opentelemetry-specification/pull/3924

jmacd avatar Mar 06 '24 00:03 jmacd

@jmacd will #3924 will solve your concern? Can we go ahead and merge this PR or should we wait a little longer?

carlosalberto avatar Mar 15 '24 12:03 carlosalberto

@carlos I thought we should merge #3923 before merging this one. #3924 is related but not a prereq

jmacd avatar Mar 21 '24 14:03 jmacd

@carlosalberto please see https://github.com/open-telemetry/opentelemetry-specification/pull/3923#discussion_r1538294693, thanks!

jmacd avatar Mar 25 '24 22:03 jmacd

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Apr 02 '24 03:04 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Apr 10 '24 03:04 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Apr 18 '24 03:04 github-actions[bot]

@open-telemetry/technical-committee, is this blocked by anything?

pellared avatar Apr 18 '24 06:04 pellared

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Jun 21 '24 03:06 github-actions[bot]

Ping @jsuereth @arminru @bogdandrutu @tigrannajaryan @jack-berg @pellared (who has previously approved this PR).

carlosalberto avatar Jul 01 '24 13:07 carlosalberto

@dashpole It seems only minor edits are needed before we can (finally) merge this ;)

carlosalberto avatar Jul 08 '24 15:07 carlosalberto