-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Otel activation for message traces #5052
Comments
@ripienaar Can you clarify:
Are you saying that we do not deliver the message to the apps (like we do with Nats-Trace-Only) but deliver the resulting trace to the account's destination, or are you saying that we do not deliver the message nor the trace, in which case I would simply say that trace is not triggered at all? |
Basically the What we don't do is deliver to the otel subject when the |
@ripienaar Understood. What confused me was the reference to But I get it now:
|
If the `Nats-Trace-Dest` header is not present, but `Traceparent` is and its last token is `01`, then message tracing is triggered. This also requires that the account be defined with a `trace_dest` subject so that traces can be sent there. Note that `Nats-Trace-Only` is not applicable for `Traceparent`. Addition to PR #5014 Resolves #5052 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
If the `Nats-Trace-Dest` header is not present, but `Traceparent` is and its last token is `01`, then message tracing is triggered. This also requires that the account be defined with a `trace_dest` subject so that traces can be sent there. Note that `Nats-Trace-Only` is not applicable for `Traceparent`. Addition to PR #5014 Resolves #5052 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Proposed change
In #5014 a basic capability to do on-demand message tracing was introduced for core pub-sub messages.
This capability is activated using a NATS specific header. The bigger picture is that users want to trigger traces based on trace headers from the likes of Open Telemetry etc.
There is prior-art in the server around ADR-3 that already supports triggering based on the headers we need and there are already functions for parsing the headers and determining if it's a continuation of a trace that started outside of NATS. See the
shouldSample()
function.This leaves the question of where should traces be delivered when these headers like
traceparent
are present, of course we don't know as previously we configured the delivery per message. The only option I can think of is to add an account scope config item that configures a per-account subject for these externally-activated traces to be delivered.Some other cases to consider, there might be more:
Nats-Trace-Only
is present AND otel headers are set, we honorNats-Trace-Only
and do not deliver the messageNats-Trace-Dest
is set AND otel headers are set, we honorNats-Trace-Dest
and deliver to that subject/cc @kozlovic
Use case
Integration with external tracing systems on account level.
Contribution
No response
The text was updated successfully, but these errors were encountered: