Open Juandavi1 opened 1 year ago
Hi @Juandavi1 could you please elaborate?
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 ?
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.
Hi ! Awesome ! I was wondering whether there's a global interceptor 🤔 The currently interface requires a message type 🥲
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
I will try it! Thank you very much!
The feature should be generating instrumentation using: https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource https://learn.microsoft.com/en-us/dotnet/core/diagnostics/diagnosticsource-diagnosticlistener
When the extension is built it needs to follow this: https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/extending-the-sdk/README.md#instrumentation-library
Hi ! Do you know how to implement distributed tracing with slim ?