open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.65k stars 873 forks source link

Clarify the differences between entries in distributedContext and attributes of spans #399

Closed huikang closed 4 years ago

huikang commented 4 years ago

The description of DistributedContext says These values can be consumed from DistributedContext and used as an additional dimension for a metric, or additional context for logs and traces. However, I feel that the key-value entries could also be set in the attributes in a span. Could anyone help to clarify what key values should be used in distributedContext, while others in span attributes. Thanks.

reyang commented 4 years ago

The name has changed to CorrelationContext. The difference between CorrelationContext and Span attributes are the scope. Span attributes only works for a particular span, and not propagated within the process or across services.