-
Notifications
You must be signed in to change notification settings - Fork 600
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 instrumentation for Async/socketry gems #2283
Comments
So, I'm okay with considering how to inject headers. However I'd like us to consider how we can do this in the least invasive/most predictable/robust way possible. |
I'm starting work on this ticket now, so I'm going to get started on creating a trace-backend-newrelic. For injecting headers, it would be great if that was possible since it would allow us to replace our async-http instrumentation. For the trace context, it looks like we're supposed to create a Context object and return it in the trace_context method, perhaps a similar thing could be done for other headers? What were you thinking about the best way to accomplish this? |
Let me take a look and get back to you. I'm not against adding an extra hook but the goal was to be generic as possible. |
For sure, that totally makes sense. I know the new relic agent needs might not be a common use case, so I appreciate wanting it to be as generic is possible. |
Can you clarify the headers you need to add, with perhaps some examples? |
Other than the trace_context headers, there are 3 sets of headers that we might need to insert. Two of them are just older versions of distributed tracing that New Relic implemented prior to the w3c trace context, and the third is a set of headers to support the New Relic Synthetics product. The New Relics Synthetics headers are
The older types of distributed tracing, Cross Application Tracing and NR Distributed Tracing, are deprecated and not used often, but they are still supported by the agent for now (though they will be removed at some point in the future). Cross Application Tracing example:
NR Distributed Tracing example:
Hopefully that helps, let me know if there is anything else I can do to help! |
hello @ioquatix For the headers, the trace context is implemented, but since we aren't able to insert other headers, if someone needs them implemented, like the new relic synthetics headers, we'll recommend they use the in agent instrumentation for async-http instead. If in the future there is a way for the agent to insert those headers, please let me know and we can get this updated though! Please let me know if there are any concerns you have with the implementation. I was able to test it with Async http and everything seems to be working well as far as I could tell. |
Closed by newrelic/traces-backend-newrelic#1 |
Create instrumentation using
traces
to create a traces-backend-newrelic.It isn't possible to insert any arbitrary headers into the request headers via traces, so our http instrumentation will need to remain separate to maintain that functionality. Because of this, we should make sure things look ok when making async http requests after adding instrumentation via traces.
related comments:
#2272 (comment)
#2272 (comment)
The text was updated successfully, but these errors were encountered: