OpenTelemetry Integration #172
Replies: 2 comments 1 reply
-
Hey @alisaifee let's keep this discussion going 🚀
Do you believe this is a good fit for tracing as well? Tracing is going to be called in a lot of places, so we may end up having a lot of try-except or ifs there which in turn could make code less readable. How do you feel about the following way: we could define a tracer class that would be always used in coredis codebase (here is an example of that in https://github.com/encode/httpcore/blob/master/httpcore/_trace.py#L8). That class would do nothing by default but it would provide extensible points into places where it was called. Then any instrumentation (whether it's OpenTelemetry, Prometheus, StatsD, etc) could patch (or simply provide a new implementation of that tracing component with the same API) that with some specific logic of handling traces. I feel like it's the way to keep codebase simple while still extensible. How do you feel about this idea? Let's settle down on the approach and I will be able to start working on the draft PR for this change. |
Beta Was this translation helpful? Give feedback.
-
Thanks for restarting the discussion @roma-glushko! I prefer your suggestion of having a base telemetry implementation that could be extended for different collectors. How this will be configured could be done either by:
The minor advantage of using approach 2 is that we don't have to pass the instance through the stack and it can be simply accessed anywhere in the codebase as |
Beta Was this translation helpful? Give feedback.
-
Following up our previous conversation with Ali from #158 (comment)
Beta Was this translation helpful? Give feedback.
All reactions