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

Producer and consumer diagnostics #1039

Open
soujiro32167 opened this issue Sep 8, 2023 · 4 comments
Open

Producer and consumer diagnostics #1039

soujiro32167 opened this issue Sep 8, 2023 · 4 comments

Comments

@soujiro32167
Copy link

I'd like to create middleware for producers and consumers, to do things like distributed tracing, logging, metrics and so on.

Here is an example of instrumenting a producer and consumer with a variation of trace4cats

As you can see, its pretty clunky: I have to backfill all the aliases. It would be nice to be able to do something like

val tracedProducer = producer
  .tapChunk(c => onChunkProduced(c))
  .tapAck(a => onAckReceived(a))

val tracedCosumer = consumer
  .tapChunk(c => onChunkConsumed(c))
  .tapCommit(c => onCommit(c))
@svroonland
Copy link
Collaborator

See #1048

@erikvanoosten
Copy link
Collaborator

@svroonland We do not actually have diagnostics for producers yet and as far as I know there is no issue requesting those. Should we keep this one open?

@svroonland svroonland reopened this Oct 29, 2023
@svroonland
Copy link
Collaborator

@soujiro32167 This could be of interest for you https://github.com/pierangeloc/zio-theseus/tree/main/modules/tracing-kafka/src/main/scala/io/tuliplogic/ziotoolbox/tracing/kafka

@svroonland svroonland changed the title Producer and consumer composition Producer and consumer diagnostics Apr 4, 2024
@svroonland
Copy link
Collaborator

Also we have consumer metrics since v2.7.3

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

No branches or pull requests

3 participants