-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(node): Add incoming request headers as OTel span attributes #17475
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran prettier fix and that's why this and the following three files are included in the diff.
size-limit report 📦
|
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to make sure to delete PII-related headers, similar to what we do in extractNormalizedRequestData
!
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add the baggage
and sentry_trace
headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a general question, not related to this test, then yes please. All request headers 😄
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m: Why are we setting this here again? Why not just in the http integration directly?
Uh oh!
There was an error while loading. Please reload this page.
Extracting incoming request data to span attributes.
It's a very long PR but most of it are test edits as the new http attributes are added to existing tests (otherwise, they would fail).
Those are the most important changes:
httpHeadersToSpanAttributes
in core that is used for generating the attributeshttp.client
spans to Koa and in Fastify - I couldn't find out why so far 🤔This is where I add the attributes in
incoming-request
. When those attributes are not added, the node-core tests fail as the HTTP header attributes are not added. But the koa and fastify test add the HTTP header as span attributes with this.Closes #17452