Replies: 1 comment 1 reply
-
OperationName exists for legacy/back-compat reasons. (Pre-OpenTelemetry days). It should not be used at all in OpenTelemetry. Please share if there are docs showing its usage, so we can fix them. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was rather suprised to find that if you create an
Activity
and set both theOperationName
(via the constructor) andDisplayName
properties, then it is theDisplayName
that ends up as thename
of the span exported by the OtlpExporter, andOperationName
is not present in the output at all.opentelemetry-dotnet/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/Serializer/ProtobufOtlpTraceSerializer.cs
Line 232 in ceebd45
Looking in to this further, I think this is intentional. The
DisplayName
is to all intents and purposes the actual name of the span, whilst theOperationName
is presumably there for doing advanced filtering, enrichment, etc inside the process.I actually came across this when looking at the network tracing spans created by .NET 9.
Example (source)
Experimental.System.Net.Http.Connections
Experimental.System.Net.Http.Connections.ConnectionSetup
HTTP connection_setup {address}:{port}
AFAICT the
Experimental.System.Net.Http.Connections.ConnectionSetup
identifier won't be available in the output at all, and thename
field will be the much higher cardinalityDisplayName
.Is that what everyone expects?
Beta Was this translation helpful? Give feedback.
All reactions