generated from micronaut-projects/micronaut-project-template
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set http.route attribute as path template (#149)
* Set http.route attribute as path template We have seen issues with the current spans exported from the http library in observability backends, due to too granular span names when the routes contain path variables. As per the opentelemetry specification, this PR extracts the path template from the UriRouteMatch object, and sets it as the `http.route` attribute. https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#http-server-semantic-conventions * Update tracing-opentelemetry-http/src/main/java/io/micronaut/tracing/opentelemetry/instrument/http/server/MicronautHttpServerAttributesGetter.java Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com> Co-authored-by: Nemanja Mikic <nemanja.mikic@oracle.com>
- Loading branch information
1 parent
62515d7
commit eac6ff7
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters