-
Notifications
You must be signed in to change notification settings - Fork 876
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
Distributed tracing story with Confluent Kafka client #1269
Comments
CC: @davidfowl and @tarekgh |
librdkafka, the native library on which Supporting |
One problem of implementing logic in native library is the need to exchange some information from managed code to the native library. Starting with What level of details will be lost if instrumentation will be based on pure managed code using |
ahh right, yes, completely agree. I don't see any details that would be lost, based on information presented in the kip. |
I'll take a stab at what |
thanks! yes, backlog at this end too. generally, straightforward changes with no controversy are easy to get merged, but changes beyond that are competing with prioritized tasks for time. |
@mhowlett The one big challenge I can foresee is the trace context. When producing a message, we would spin up an Activity. When consuming a message, we need to spin up an Activity with the same context that the producer had. In order to pull that off, we need to persist some data on the message. W3C Trace Context which basically comes down to 2 strings: @SergeyKanzhelev please correct me if this is the wrong approach to take. |
it sounds like something that requires some thought. my instinct is that we don't want to hard code the message header decisions in the client - we probably want a general plugin API for it, and probably configuration via a builder class method (+ a W3C Trace Context impl. provided in-the-box). this capability could also be built in a class that wraps the producer / consumer of course. but it does seem generally useful enough that we'd like it in the client. note: there is some chance we'll have some bandwidth to think about this in September, we have some related work planned I believe. |
@CodeBlanch yes, just store two strings in metadata would be enough. We started working on AMQP in W3C group: https://github.com/w3c/trace-context-amqp but it is only in proposal state now. I will try to push it forward and perhaps we can validate how it works with kafka. (I believe kafka is almost AMQP from the message structure view, right?) |
@mhowlett I threw up PR #1278 with the Producer side of things so you could check it out. DiagnosticSource generally implements very cleanly, meaning it doesn't add a whole lot of ceremony on top of 'real work' code. Right now I have the |
FYI, there's an experimental page in the OpenTelemetry specification for conventions to use with messaging |
@CodeBlanch Is your PR still under consideration for merging. |
@ElectricVampire I just closed it. Better to do it using ActivitySource now. That was released with .NET 5, but is actually supported all the way back to .NET 4.5 using the NuGet: https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/. |
Hi all, Also, maybe it worth to contribute the code to OpenTelemetry project ? |
Are there any plans to implement this feature? |
Maybe there are assumptions about when this feature can be implemented? |
I am also interested in this piece of content, if anyone has submitted any PR, please submit a reply. |
Please let me know once this feature is implemented. |
Hey everyone, JFYI I created a PR #1838 with a proposal for the Producer instrumentation. |
Hello, Thanks in advance! |
We are working on KIP-714, which can be used to export various client metrics with Opentelemetry. confluentinc/librdkafka#4721 |
KIP-714 looks interesting, but explicitly doesn't cover tracing. Will the implementation here have tracing as well? |
@swythan tracing isn't covered by the KIP, only metrics. There is no effort to support tracing at the moment. |
Isn't tracing what this ticket is for, though? Shouldn't it be left open? |
@anchitj -- metrics are not traces. Can you reopen this please? Also, perhaps link https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/ for reference. /cc @emasab |
Reopening, though we don't have any active effort to support tracing. |
Greetings!
I'm using OpenTelemetry to instrument an application, primarily to watch the performance of all its dependencies and find bottlenecks. OpenTelemetry is automatically capturing Http requests coming into my system and then tracing outgoing Http, SQL, & Redis calls made while doing the processing. All of that data is exported into one of the many tools OpenTelemetry supports for visualization. What I would like to do is mod the Confluent Kafka client to also participate in that process.
The easiest way to do that would be to use DiagnosticSource to allow other code in the process to subscribe to events that are fired as messages are produced or consumed.
DiagnosticSource
only fires when there is a subscriber so the cost to existing users not using the events would be ~0.If we are open to this, I can take a stab at a PR, documentation, etc., but I wanted to check first.
/cc @SergeyKanzhelev @MikeGoldsmith @cijothomas
The text was updated successfully, but these errors were encountered: