-
Notifications
You must be signed in to change notification settings - Fork 239
Description
My actual problem
I have a legacy X-MyCompany-RequestId header that is sent with every request and relayed throughout the backend. I'd like to log this in spans, so that you can connect OTEL spans with our legacy observability stuff. This will be replaced with propagator, but not everything is on OTEL yet.
This affects multiple instrumentations, but net_http is the main one. I'm currently only using standard Rails instrumentation from this repo, I don't have any custom instrumentation/spans. It seems like I could wrap every call to Net::HTTP with a new span, but that seems like a bad approach.
Questions and workflow
-
How should HTTP Headers be reported? I found semantic docs, but not recommendations. Dumping all headers does seem like a bad idea.
a. Wait, found it, its under footnote[15]here.[15] http.request.header.: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.
b. Yep, this makes sense. So, my expected workflow would be to add
X-MyCompany-RequestIdto the expected headers of Net:HTTP during initialization? -
Is this just unfinished work? Is it planned? It seems approachable enough that I might be able to pick it up.