Skip to content
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

Pass the context to the telemetry hooks #874

Open
StarpTech opened this issue Dec 13, 2024 · 2 comments
Open

Pass the context to the telemetry hooks #874

StarpTech opened this issue Dec 13, 2024 · 2 comments
Labels

Comments

@StarpTech
Copy link

StarpTech commented Dec 13, 2024

Hi, it would be very useful if we would have access to the producer context in the telemetry hooks. This would allow us to trace application specific and connect metrics points specific to the trace in the context. This would work with OpenTelemetry.

My proposal is to pass the ctx as the first parameter to the functions.

@twmb
Copy link
Owner

twmb commented Dec 28, 2024

Which context? The client context closes only when the client is closed. I'm not opposed, although this doubles the surface area of hooks for a pretty marginal gain. Would you be open to contributing this?

@twmb twmb added the waiting label Dec 28, 2024
@StarpTech
Copy link
Author

I was referring to the context passed to Produce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants