Skip to content

Route name on Traces and Logs #1037

Closed Answered by commonsensesoftware
alefcarlos asked this question in Q&A

You must be logged in to vote

I poked around a bit more and I found this line:

https://github.com/open-telemetry/opentelemetry-dotnet/blob/7dff32480d8b2fe8d41e0958257c00e3602e3b3a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs#L292

This clearly shows that it uses the Endpoint.RoutePattern.RawText as the value. The route template is defined as v{version:apiVersion}/WeatherForecast so that is what I would expect to see. What you would probably prefer is to is IEndpointNameMetadata, which usually maps to OperationId in OpenAPI. There is also IEndpointSummaryMetadata and IEndpointDescriptionMetadata, but those probably provide longer descriptions than what you are looking for.

I don't see an…

Replies: 2 comments 12 replies

You must be logged in to vote
5 replies
@alefcarlos

@xavierjohn

@alefcarlos

@xavierjohn

@xavierjohn

You must be logged in to vote
7 replies
@commonsensesoftware

@alefcarlos

@alefcarlos

@commonsensesoftware

Answer selected by alefcarlos
@alefcarlos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants