Skip to content

Add OpenTelemetry Metrics Instrumentation #341

Description

@toizo

Context

The project already offers OpenTelemetry-compliant tracing based on the 1.24 specification, bringing it in line with modern observability best practices. However, only traces are currently supported: metrics instrumentation is not yet available.

Proposal

  • Evaluate and implement OpenTelemetry-based metrics instrumentation in the same way as with tracing.
  • Ensure conformance with the latest stable OpenTelemetry metrics specification.
  • Reuse or extend any relevant infrastructure or patterns already present for tracing.

Rationale and Benefits

With metrics as a first-class signal, observability can be significantly enriched. By emitting relevant metrics, we will be able to:

  • Track and alert on throughput of key operations
  • Monitor error rates and failure ratios
  • Observe latency and performance trends
  • Get insights for capacity planning, SLOs, and cost optimization

Combined traces and metrics provide a foundation for alerting, dashboarding, and automated analysis—making production systems more reliable and maintainable.

Next Steps

  • Identify the most critical and valuable metrics to expose
  • Prototype instrumentation in a non-intrusive manner
  • Document emitted metrics and their semantic meaning

Feedback, use cases, and additional requirements are welcome!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions