-
Notifications
You must be signed in to change notification settings - Fork 892
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
Instrumentation API is too tracing oriented #13151
Comments
related: open-telemetry/opentelemetry.io#6102 (comment)
|
@breedx-splk Your point about the Instrumenter class being tightly tied to spans is spot on. Right now, logging an event or recording a metric often requires unnecessary workarounds, which can be especially frustrating in mobile environments like Android. I went through PR #6102, and it really highlights the need for clearer documentation and better support for non-tracing telemetry. I think your idea of expanding the Instrumentation API could be a great solution. Here are a few thoughts: Unified Instrumentation Abstraction: A high-level TelemetryInstrumenter that supports tracing, logging, metrics, and events in one place. Thanks again for bringing this up |
Thanks @Charlesnorris509, for the reply and for some confirmation. Appreciate that. A few notes;
I think there is room for that to happen, once the dust clears on logging over in the core repo. It may not be part of the specification, but languages are free to provide their own convenience APIs (or "syntactic sugar") to make things more idiomatic and more usable. We probably want a kotlin-based event API for Android as well.
I am pretty sure that because the specification doesn't address the instrumentation API, we can probably avoid needing a more formal rfc/spec for this. Instead, we can just think about doing parts of what you described incrementally. That also allows us (and the community) to try things out and provide feedback so that we can iteratively work toward stability. |
When we first built the Instrumentation API, tracing was (and often still is!) on the forefront of developers' minds. Over time, it becomes more apparent that not all instrumentation is concerned with tracing. Some instrumentations only want to measure something...and some other instrumentations might only want to log a thing or emit an event when something interesting happens.
The latter is especially true in the client/mobile world. At the time of this writing, Android is using an odd mix of zero-duration spans serving as events and fledgling events (based on LogRecord). This isn't great, and an improved Instrumentation API could help to facilitate improvements here.
As evidence that the Instrumentation API is primarily concerned with tracing, take the example of the primary instrumentation API class:
Instrumenter
(link). The javadoc reads as though it encompasses all manner of instrumenting:...but the
builder()
requires aSpanNameExtractor
and assumes that all telemetry will have a span name! Furthermore, there are no methods dealing with logs nor events, and the metrics support is also minimal (geared at measuring tracing "operations" [like requests] and supportability metrics).I haven't given this topic too much though and don't have a design approach yet. I think it would be great for us to begin thinking about what an extension/expansion of the instrumentation API might be -- and one that helps instrumentation authors (in the web/mobile space and beyond) to easily create non-tracing instrumentation that is implemented with consistency.
The text was updated successfully, but these errors were encountered: