Skip to content
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

Remove setting http.route attribute in frontend #566

Merged

Conversation

AbhiPrasad
Copy link
Member

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:

  1. Should we change SemanticAttributes.HTTP_TARGET to be the url? This seems to match the semantic conventions better.
  2. Do we need a changelog entry for this?

As per the OpenTelemetry HTTP Server semantic conventions, `HTTP.ROUTE`
is meant to be a low cardinality route template. The URI cannot
substitute it.

This patch remove the usage of the HTTP_ROUTE semantic attribute.
Copy link
Contributor

@puckpuck puckpuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense

@AbhiPrasad AbhiPrasad force-pushed the http-route-remove-low-cardinality branch from 088b8f0 to 3b1437d Compare November 9, 2022 14:07
@AbhiPrasad
Copy link
Member Author

Do I need to do anything else to get this merged in? Or is there some release cadence we need to follow here?

@cartersocha
Copy link
Contributor

Do I need to do anything else to get this merged in? Or is there some release cadence we need to follow here?

Just update the branch and for future prs please use a personal fork. We can’t trigger branch updates on an organizational fork.

Should be good to go after that

@cartersocha cartersocha merged commit 978d193 into open-telemetry:main Nov 11, 2022
@AbhiPrasad AbhiPrasad deleted the http-route-remove-low-cardinality branch November 11, 2022 13:00
jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
As per the OpenTelemetry HTTP Server semantic conventions, `HTTP.ROUTE`
is meant to be a low cardinality route template. The URI cannot
substitute it.

This patch remove the usage of the HTTP_ROUTE semantic attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants