Remove setting http.route
attribute in frontend
#566
Merged
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.
Changes
As per the OpenTelemetry HTTP Server semantic conventions, the
http.route
attribute is meant to be a low cardinality route template. The URI cannot substitute it.This patch remove the setting of the
http.route
semantic attribute by the Instrumentation Middleware in the frontend service.Trying to get a paramaterized template route in NextJS is incredibly difficult (take a look at getsentry/sentry-javascript#5505 to see what it takes), so I did not replace it with anything. This seems to be fine since as per the semantic convention is the
http.route
attribute is "Conditionally Required: If and only if it's available"Two notes:
SemanticAttributes.HTTP_TARGET
to be the url? This seems to match the semantic conventions better.