Make PrometheusExporter public and open to composition to support Pushgateway scenarios #5656
Labels
enhancement
New feature or request
pkg:OpenTelemetry.Exporter.Prometheus.HttpListener
Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package
Package
OpenTelemetry.Exporter.Prometheus.HttpListener
Is your feature request related to a problem?
Currently all Prometheus exporter implementations are marked as
internal
, includingPrometheusExporter
,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 classespublic
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
The text was updated successfully, but these errors were encountered: