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

Make PrometheusExporter public and open to composition to support Pushgateway scenarios #5656

Open
scharnyw opened this issue May 28, 2024 · 0 comments
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package

Comments

@scharnyw
Copy link

Package

OpenTelemetry.Exporter.Prometheus.HttpListener

Is your feature request related to a problem?

Currently all Prometheus exporter implementations are marked as internal, including PrometheusExporter, PrometheusCollectionManager, etc, and the only way for consumers to use them is setting up the ASP.NET Core middleware or HttpListener via the DI helper methods. This means that consumers using the Prometheus Pushgateway are unable to utilize the SDK at all because it's not open to composition.

I fully understand that the Pushgateway has limitations and is not recommended for the typical scenarios, and as a result the SDK does not wish to support it natively. But it seems unnecessary to make everything internal which prohibits consumers from extending and customizing upon the SDK to meet their own requirements. In addition, there are examples other than Pushgateway that I think can benefit from this as well (e.g. legacy ASP.NET server applications, etc.).

What is the expected behavior?

Make PrometheusExporter and other relevant classes public so that consumers can compose their own implementations on top of them.

Which alternative solutions or features have you considered?

The alternative for now seems to be re-implementing existing functionalities in consumer code.

Additional context

No response

@scharnyw scharnyw added the enhancement New feature or request label May 28, 2024
@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package
Projects
None yet
Development

No branches or pull requests

1 participant