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

Tracing / OpenTelemetry #149

Open
Juandavi1 opened this issue Feb 4, 2023 · 7 comments
Open

Tracing / OpenTelemetry #149

Juandavi1 opened this issue Feb 4, 2023 · 7 comments

Comments

@Juandavi1
Copy link

Juandavi1 commented Feb 4, 2023

Hi ! Do you know how to implement distributed tracing with slim ?

@zarusz
Copy link
Owner

zarusz commented Feb 6, 2023

Hi @Juandavi1 could you please elaborate?

@zarusz zarusz added the question label Feb 6, 2023
@Juandavi1
Copy link
Author

Hi ! We are working with OpenTelemetry and we need to create the spans when consume and publish events. For example en Go we have otelsarama to do it ! There is an option to add an interceptor to add this functionality ?

@zarusz
Copy link
Owner

zarusz commented Feb 6, 2023

Now it is more clear, thanks. I assume you are using Kafka transport, is that correct?

There is nothing available out of box, ideally tracing/metrics/instrumentation could be done as a producer/consumer interceptors which would add the necessary spans (or other instrumentation) to the consumers or producer. The interceptor implementation could use one of these:

Regarding otelsarama I do not know it, but it looks like it's meant for Go client application. Not sure if this could be used in .NET.

I am happy to review a contribution/PR for a tracing plugin to make this part of SMB, or provide help.

@zarusz zarusz changed the title Tracing Tracing / OpenTelemetry Feb 6, 2023
@Juandavi1
Copy link
Author

Juandavi1 commented Feb 10, 2023

Hi ! Awesome !
I was wondering whether there's a global interceptor 🤔
The currently interface requires a message type 🥲

@zarusz
Copy link
Owner

zarusz commented Feb 11, 2023

Actually, you can make a generic message interceptor as explained here
https://github.com/zarusz/SlimMessageBus/blob/master/docs/intro.md#generic-interceptors

You can see this working for the outbox plugin
https://github.com/zarusz/SlimMessageBus/blob/master/src/SlimMessageBus.Host.Outbox/Configuration/ServiceCollectionExtensions.cs#L12

@Juandavi1
Copy link
Author

I will try it! Thank you very much!

@zarusz
Copy link
Owner

zarusz commented Aug 17, 2023

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

No branches or pull requests

2 participants