-
-
Notifications
You must be signed in to change notification settings - Fork 223
Clarifications for the new trace context spec #410
Comments
I'll add that to the spec. Envelopes with only attachments should have it too, so that we can sample attachments of sampled transactions... TL;DR what you write in your first bullet point is correct: Add whenever there's a transaction.
Please do add sending of
See this section: "Such a context is immediately frozen in the SENT state and should no longer allow for modifications". So, you do not change the context when you inherit it from an incoming header. Only do that when the SDK creates it. Reason for this is to enforce absolutely consistent sampling across the trace. Obviously has the disadvantage of only being able to sample by information available to the frontend SDK, but that's something that belongs in usage docs.
👍 Public key of the SDK that starts the trace needs to be propagate. This is what we use to resolve the same rules across the entire trace if they are different per project.
Yes, and excellent question, feel free to choose a name. Since this is experimental, we can also go with leading TODOs
|
Perhaps this is more about 1) Adding or not Also, there is the related action of parsing a potential incoming |
I find this to be often a misconception. Some traces do start on the frontend, typically coming from manual instrumentation of a single page application, and some "accidentally" start on the frontend because of lack of backend->frontend propagation (requires manual work to render a In a lot of cases traces start on the backend when the first request is made, then it continues on the frontend and other (backend) servers. Perhaps it was already discussed in another venue, but what may end up happening is that the same "backend transaction" will have to be "dynamically sampled" sometimes with information from a backend, sometimes from a frontend (and sometimes with data from a different backend server, depending on what service originated the trace). |
This sounds like a completely valid use case. I wonder if we should consider this already as opposed to simply do a "front-end data only flows through" approach. |
To keep the discussion focused, I'd suggest scoping this issue to clarification of the spec and discuss extended use cases in a different place.
Great point, let's rename to "Trace State" to disambiguate. This also brings it more in line with the W3C spec.
Since this is a fully internal option that doesn't have to be documented and will likely not remain once this feature goes stable (in this way, but to discussed at a much later point), a single option should do the trick.
Correct, this is a known limitation of the current approach that we're going with. We'll be evaluating this next. For now this is how it works. I think it's a great point to mention in the doc though, to clarify that this was considered. |
One more question - doesn't the base64ed header value need to be URI encoded at the very end? Base64 value has a new line after 76 character, which does not seem to work when placed as an HTTP header. |
Base64 doesn't place newlines in the encoded string, at least not the abstract algorithm. I think you might be looking at the behavior of the command line tool |
Just read through the spec and I, too, had a few questions/observations/thoughts. I know some of them we've discussed verbally but I'm including them here for visibility and posterity. (Also, I know this issue is closed, but it seemed like the most relevant place to put this.)
|
The new spec #407 was merged and while going through in details a few questions came up:
EnabledExperimentalTraceContextPropagation
?The text was updated successfully, but these errors were encountered: