Skip to content

[Feature Request] Add Official Metrics Support to OTLP Exporters #2162

@arjun-rajappa

Description

@arjun-rajappa

Add official OpenTelemetry Metrics API support to OTLP exporters to monitor export performance and reliability.

Metrics Needed

1. Message Sizes

  • otel.otlp_exporter.message.uncompressed_size (bytes)
  • otel.otlp_exporter.message.compressed_size (bytes, when compression enabled)

2. Request Duration

  • otel.otlp_exporter.request.duration (milliseconds)
    • Attribute: http.status_code

3. Export Failures

  • otel.otlp_exporter.export.failure (counter)
    • Attribute: error.type (e.g., "timeout", "http_503", "socket_error")

Requirements

  • Use official OpenTelemetry Metrics SDK (not the un-spec'd MetricsReporter)
  • Make metrics optional/configurable
  • Avoid circular dependencies in self-instrumentation
  • Apply consistently across HTTP and gRPC exporters

Benefits

  • Monitor export pipeline health in production
  • Troubleshoot performance issues and failures
  • Optimize compression and batch configurations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions