Traces and Metrics gems for instrumenting libraries. #985
Replies: 1 comment 6 replies
-
@ioquatix What you're describing is what the OpenTelemetry API itself is supposed to accomplish. Ideally, library authors (like yourself!) would instrument their application with the OpenTelemetry API. When no SDK is configured, everything is essentially a no-op, and nothing really happens up until the point that a user of your library wires up the SDK (and then boom, telemetry!). (And of course, users can configure their OpenTelemetry SDK instance to point to whatever backends they'd like.) I was curious if you'd tried that approach or not? If the ruby implementation of the API is lacking, I think we would want to try and fix its shortcomings rather than create another API that is doing something so similar? (Regardless, I am excited to have people working in this space! 😄 ) |
Beta Was this translation helpful? Give feedback.
-
I want to move the expectations of tracing and instrumentation out of a gem like OTEL (Ruby) and into the actual libraries. My goal is for it to retain zero overhead as the current implementations achieve, but also adopt a flexible model for adding instrumentations.
As such, I've created and released two new gems which I'm hoping to develop in this direction:
These two gems have zero overhead if not in use, but allow library authors to opt into explicitly providing metrics and traces on a class-by-class basis.
To use this gem, a backend must be used. An example of a backend would be OTEL. We will provide some basic testing backends but ideally the backends will be provided by specific gems, e.g.
traces-backend-open_telemetry
.Beta Was this translation helpful? Give feedback.
All reactions