generated from micronaut-projects/micronaut-project-template
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Set http.route attribute as path template #149
Merged
n0tl3ss
merged 6 commits into
micronaut-projects:master
from
StevenPJ:use_route_template_for_spans
Oct 14, 2022
Merged
Set http.route attribute as path template #149
n0tl3ss
merged 6 commits into
micronaut-projects:master
from
StevenPJ:use_route_template_for_spans
Oct 14, 2022
Conversation
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
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
appreciate any feedback @sdelamo |
n0tl3ss
approved these changes
Sep 16, 2022
sdelamo
requested changes
Sep 21, 2022
...ronaut/tracing/opentelemetry/instrument/http/server/MicronautHttpServerAttributesGetter.java
Outdated
Show resolved
Hide resolved
…opentelemetry/instrument/http/server/MicronautHttpServerAttributesGetter.java
@StevenPJ Hi! Could youresolve conflicts? |
…cronaut-tracing into StevenPJ-use_route_template_for_spans
n0tl3ss
added a commit
that referenced
this pull request
Jan 30, 2023
* 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>
n0tl3ss
added a commit
that referenced
this pull request
Jan 31, 2023
* User route template as OpenTelemetry HTTP route (#182) * Remove unused import * Verify 404 not found still has route path returned * Set status code in doOnNext * Update tracing-opentelemetry-http/src/main/java/io/micronaut/tracing/opentelemetry/instrument/http/server/OpenTelemetryServerFilter.java Co-authored-by: Nemanja Mikic <n0t_l3ss@outlook.com> * Set http.route attribute as path template (#149) 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> * Update common files (#175) * fix build (#233) --------- Co-authored-by: Xiaochao Yang <xy@zira.ai> Co-authored-by: StevenPJ <spalmerjones@gmail.com> Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com> Co-authored-by: micronaut-build <65172877+micronaut-build@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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