-
Notifications
You must be signed in to change notification settings - Fork 773
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
Activity Display Name: Route Template instead of path #4525
Comments
Same behavior here with dotnet 7 and latest OpenTelemetry nugets.
The Controller: namespace My.WebApi.Controllers.V1
{
...
[ApiController]
[Route("api/v{version:apiVersion}/[controller]")]
[ApiVersion("1.0")]
public sealed class TiersController : ControllerBase
{
...
[HttpGet("{userId}")]
[ProducesResponseType(typeof(GetTiersListByUserIdResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> GetTiersByUserId(int userId)
{
...
}
}
} Thanks. |
This also makes it pretty hard to search traces in Jaeger. The displayName is used as operation name results in a very bloated index which can be prevented if we use the route template. Instead of using the |
As per specification the name should definitely not include the actual route parameters. It is too specific. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#name and https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#span |
Do we have any plan to include version number in route path like |
Is there any workaround how to make open telemetry to show actual version instead of |
Bug Report
We have api versioning for our endpoints which .net supports so for example: [Route("api/v{apiVersion:apiVersion}/[controller]")] which is being reported as api/v{apiVersion:apiVersion}/users
Version
.net Core 6.x
Symptom
What is the expected behavior?
api/v1/user
api/v2/user
What is the actual behavior?
api/v{apiVersion:apiVersion}/users
we have the partial route template and {apiVersion:apiVersion} is not transformed where as [Controller] is.
If it is by design, could you please tell me why you choose to not have the version in the display name?
We are using opentelemetry and the displayname is mapped to trace group. At the end, we don't know what version of our APIs had bad performance or issues as everything is aggregated.
Code
The text was updated successfully, but these errors were encountered: