-
Notifications
You must be signed in to change notification settings - Fork 116
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
Time to fully support TraceContext #71
Comments
This means we either have to upgrade all agents at the same time, or have broken distributed traces. If we're going to make this the default behaviour, should we do it in a major version bump of each agent? Perhaps we could make it an option before then? Is it not still possible for the
I think we also need to define a vendor key ("elastic"?), and probably our own versioning scheme for our vendor-specific tracestate. Maybe we can defer the second bit till later. |
@axw wrote:
I think you misunderstood. We would still keep the old header. So this should be backward compatible and wouldn't need to major bump.
Technically yes, but unlikely. But now that other APM vendors have implemented the header (without a prefix), this would mean a lot of broken implementations. So if this happens I expect that it will be dealt with in a way that would make it as painless as possible. E.g. by bumping the version. But of course, there are no guarantees.
Yes, and I agree we should defer it as we don't have a need for this key at the moment. |
Indeed, I missed the "also" and inserted "instead" :) |
For the RUM agent, I think we can only add We might want to remove the |
@jahtalab Good point. If you major bump it should be ok to remove
So the user just has to make sure to upgrade the backend agents first before upgrading the RUM agent in order for this to work. As this will be implemented with a major bump in the RUM agent I think this is an acceptable approach. |
Just to be clear the backend configuration I was referring to is not necessarily in the same backend as the backend instrumented by the our agents e.g. a reverse proxy that handles cross-origin header. But, I agree we should remove |
I think it's fine to start looking into supporting this, but i would have preferred to let other blaze the trail when it comes to implementing it. With that in mind, we should make sure to make it part of our regular priority decision process, as we do with everything. |
Since the RUM agent's implementation of the tracecontext will be a breaking change, we're planning to release this change once the backend agents have support for the
@elastic/apm-agent-devs, Please respond with 👍 if the above plan is accurate, otherwise please comment if you expect any changes. For .NET there is no milestone. Is this still the case @gregkalapos , @SergeyKleyman ? Do you have any plans for this? |
@jahtalab we did not add elastic/apm-agent-dotnet#177 to 7.6, so if we don't change priorities we can add it to 7.7. However, I don't think it's a very high effort thing, it could be done fairly quickly. Are we ok with 7.7 for .NET? |
the table is up to date, we can align the .Net & node in the near future(7.x timeframe). |
Short update on .NET - this was implemented and released with .NET Agent v. 1.3 - which was released in sync with 7.6. Updated the table above - fyi @jahtalab. |
The remaining ones are Java and Python, I can see the changes are merged but not released yet. |
@jahtalab yes, release is going out in a couple hours /edit due to an issue with Jenkins, I wasn't able to trigger the release. I'll try again tomorrow. |
probably early next week |
We were able to trigger the release yesterday, so Python should be all good |
The RUM agent released version 5.0.0 this week which includes (among other breaking changes) switching to the W3C |
I'd like to propose that we start the work of dropping the
elastic-apm-
prefix on ourtraceparent
header + add support fortracestate
. We have to add a transition period though. This issue is for discussion that 🙂While TraceContext is not a finished standard yet, it's at it's final stage, Candidate Recommondation (CR), and require real-world usage from at least 3 APM vendors in order to become so. While I think there's already enough vendors pushing this so that we don't need to, I don't see any reason for us to hold back any longer. Hence this proposal.
Proposed plan
elastic-apm-traceparent
andtraceparent
. If both are present, but the values differ, the agent should preferelastic-apm-traceparent
overtraceparent
.traceparent
, and optionally setelastic-apm-traceparent
; RUM agents will either setelastic-apm-traceparent
ortraceparent
, due to CORS. This will be controlled by a new environment variable, described below.ELASTIC_APM_USE_ELASTIC_TRACEPARENT_HEADER
, which will control the above behaviour. Its value will initially default totrue
, to ensure backwards compatibility with older agents. Later we will flip the default value tofalse
, to phase out backwards compatibility. The configuration exists as an "escape hatch" for large/complex environments, but otherwise shouldn't be necessary.tracestate
and, based on the rules in the TraceContext spec, forward it to all outgoing requests. We currently don't need our agents to use this header for anything.tracestate
header. Our agents should combine multiple incomingtracestate
headers into one outgoingtracestate
header.Testing
@gregkalapos brought up that there's a bunch of compatibility tests we can run to ensure we support the spec correctly. It would be a good idea if we all added those to our CI in some way if possible:
https://github.com/w3c/trace-context/tree/master/test
What we are voting on
@elastic/apm-agent-devs Are you ok with moving forward with this plan?
@roncohen Please weigh in here if you have any objections.
Vote
The text was updated successfully, but these errors were encountered: