Closed ktoso closed 1 year ago
If unsure about this feature, please check the https://github.com/apple/swift-distributed-tracing/issues/48 discussion and otel's justification which I think is reasonable https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#updatename
Motivation:
The feature frozen otel specification allows for renaming spans after they have been started. This often is too late to impact sampling decisions, however we still can use to to provide better names for spans as time goes on.
Modifications:
add an operationName to the Span protocol.
A span has to be thread-safe already and we have mutating operations on it already so it does not change the complexity requirements on implementing a span.
Result:
Be closer to otel spec and more flexible in naming and renaming spans. Resolves https://github.com/apple/swift-distributed-tracing/issues/48