-
Notifications
You must be signed in to change notification settings - Fork 1.4k
SDK observability #2547
Copy link
Copy link
Labels
area:metricsPart of OpenTelemetry MetricsPart of OpenTelemetry Metricsarea:tracePart of OpenTelemetry tracingPart of OpenTelemetry tracingenhancementNew feature or requestNew feature or requestgoal: 2026Goal to accomplish in 2026Goal to accomplish in 2026pkg:APIRelated to an API packageRelated to an API packagepkg:SDKRelated to an SDK packageRelated to an SDK package
Milestone
Description
Metadata
Metadata
Assignees
Labels
area:metricsPart of OpenTelemetry MetricsPart of OpenTelemetry Metricsarea:tracePart of OpenTelemetry tracingPart of OpenTelemetry tracingenhancementNew feature or requestNew feature or requestgoal: 2026Goal to accomplish in 2026Goal to accomplish in 2026pkg:APIRelated to an API packageRelated to an API packagepkg:SDKRelated to an SDK packageRelated to an SDK package
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
TODO
StatusShow more project fields
In progress
Problem Statement
Context: kubernetes/enhancements#3161 (comment)
For an application instrumented with OpenTelemetry for tracing, and using the OTLP trace exporter, it isn't currently possible to monitor (with metrics) whether or not spans are being successfully collected and exported. For example, if my SDK cannot connect to an opentelemetry collector, and isn't able to send traces, I would like to be able to measure how many traces are collected, vs how many are not sent. I would like to be able to set up SLOs to measure successful trace delivery from my applications.
Proposed Solution
After the metrics API is stable, collect metrics in the trace SDK using the metrics API. Specifics about the metrics deserve their own design, but I should be able to tell the volume of spans my application is generating, and the success rate of exporting them. This would be done via a new
TracerProviderOption:WithMeterProvider(MeterProvider).Follow semantic conventions:
Alternatives
We could add metrics to exporters individually, but most exporter-related metrics should be similar.