-
Notifications
You must be signed in to change notification settings - Fork 881
Prometheus Exporter HttpListener is unreliable on non-Windows OSes #3728
Description
This issue was found when I was taking another look at the unstable integration tests for Prometheus Exporter (HttpListener) in OTel .NET AutoInstrumentation: open-telemetry/opentelemetry-dotnet-instrumentation#1363
It occurs that there is a bug that the HttpListener can crash when the HTTP requests are sent before it is fully operational. The issue was already reported and closed without a fix: dotnet/runtime#28658.
I suggest that at minimum the docs should say that the Prometheus Exporter HttpListener uses an unmaintained legacy .NET component and it should not be used in production. For this reason, I also propose to move its source code to contrib repo or even remove it completely. One can always use OTLP exporter + OTel collector with Prometheus exporter for debugging. This is our default "dev env setup" in OTel .NET AutoInstrumentation: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/dev/otel-config.yaml