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

Add configuration option to extract headers from incoming requests/responses to add as span attributes #181

Open
stebet opened this issue Nov 28, 2024 · 1 comment

Comments

@stebet
Copy link

stebet commented Nov 28, 2024

It'd be awesome if we could configure a list of request/response headers that should be extracted and added as span attributes.

Like what is possible here: https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_instrumentation_http.HttpInstrumentationConfig.html#headersToSpanAttributes

@evanderkoogh
Copy link
Owner

Yeah I have looked into supporting those, but there are currently more pressing issue to do in the time that I have..

What is possible though is a method called withNextSpan which takes a set of attributes that will be added to the next span.. so if you call that just before your fetch call (or any other call that is handled by a third party library), those attributes will be added to that generated span.

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

No branches or pull requests

2 participants