Skip to content
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

Add Metrics support for OpenTelemetry.Instrumentation.StackExchangeRedis #1331

Closed
TotallyNotASecret opened this issue Aug 28, 2023 · 3 comments
Labels
comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis

Comments

@TotallyNotASecret
Copy link

Issue with OpenTelemetry.Instrumentation.StackExchangeRedis

List of all OpenTelemetry NuGet
packages
and version that you are
using:

  • OpenTelemetry.Exporter.Prometheus.AspNetCore 1.5.0-rc.1
  • OpenTelemetry.Extensions.Hosting 1.5.1
  • OpenTelemetry.Instrumentation.AspNetCore 1.5.1-beta.1
  • OpenTelemetry.Instrumentation.StackExchangeRedis 1.0.0-rc9.10
  • OpenTelemetry.Instrumentation.Http 1.5.1-beta.1

Runtime version:

  • net6.0

Is this a feature request or a bug?

  • Feature Request

What is the expected behavior?

It should be possible to use AddRedisInstrumentation with MeterProviderBuilder.

What is the actual behavior?

It is currently not possible.

@TotallyNotASecret TotallyNotASecret added the comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis label Aug 28, 2023
@eerhardt
Copy link
Contributor

eerhardt commented Sep 6, 2023

What metrics would you like to see emitted?

Note that I have an initial draft PR of using System.Diagnostics.Metrics in StackExchange.Redis directly. Once this work is complete, we wouldn't need an Instrumentation assembly to get these metrics. Instead, the client library will emit them itself.

@TotallyNotASecret
Copy link
Author

The metrics in the PR you linked seem OK. It would still be nice to be able to call AddRedisInstrumentation on a MeterProviderBuilder to add all the metrics to the OpenTelemetry exporters used in a project, like you currently can with a TracerProviderBuilder.

@cijothomas
Copy link
Member

It would still be nice to be able to call AddRedisInstrumentation on a MeterProviderBuilder

No reason the native instrumentation cannot provide an extension method like that, though it is not needed to enable metrics from - just need to call AddMeter(name of meter used by the library.)

Closing the issue here, as there is some work going on to make this occur natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis
Projects
None yet
Development

No branches or pull requests

3 participants