-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Span Name formatting is missing #166
Comments
I've realized that there is already a way to do this, implemented string interpolation, and it magically worked how it should. closing the issue now |
Thanks for getting in touch. String interpolation isn't the intended approach here, since it will result in structured data being lost. The sink options carry The default for span naming is the opposite, using a template by default, because span names in OTel are expected to be low-cardinality. I think the best way around this would be to add another Thanks! |
Hi, Thanks for the reply, i thought I fixed it the "right" way with string interpolation. but indeed this would in losing the structured data (allthough if i still provide the properties with the A solution as you suggest would definitely solve any issues we have. |
Great 👍 thanks for the feedback. |
I'm using the Serilog tracing nuget package to add tracing to our framework asp.net mvc application as described here:
serilog-tracing/serilog-tracing#145
Issue is related to this line of code:
Here we start the activity logging the HttpMethod and the RawUrl.
When using this sink to send the traces to an aspire dashboard, the Name property of the span is set to the Message Template, which results in the following on the aspire dashboard.
As you can see, the displayed name is not formatted, the property names are still visible. On the left side in the list of spans related to the trace, and also on the right where the properties are displayed.
The properties needed to format the name/message are present with the span.
(the last trace line is generated by a different service, and not with the serilog sink. on that line it is displayed correctly)
I see in the
OtlpEventBuilder.cs
, that this is done by design?Is there a way to configure the sink to also use the formatted message for the spans? I see that there is a feature for formatting the messages of the structured logs, but not the names of the span.
Perhaps a configurable setting to enforce the parsing of the Span name?
The text was updated successfully, but these errors were encountered: