-
Notifications
You must be signed in to change notification settings - Fork 881
Prometheus exporter produces zero-byte HTTP response #5661
Description
Package
OpenTelemetry.Exporter.Prometheus.AspNetCore
Package Version
| Package Name | Version |
|---|---|
| OpenTelemetry.Exporter.Prometheus.AspNetCore | 1.9.0-alpha.1 |
| OpenTelemetry.Extensions.Hosting | 1.9.0-alpha.1 |
| OpenTelemetry.Instrumentation.AspNetCore | 1.8.1 |
| OpenTelemetry.Instrumentation.Http | 1.8.1 |
| OpenTelemetry.Instrumentation.Runtime | 1.8.1 |
Runtime Version
net8.0
Description
Using Prometheus exporter 1.9.0-alpha.1 I'm getting a bunch of zero-byte responses from the metrics endpoint; status code is 200 and Content-Length header is 0.
This issue has been verified by another user as well:

It does not make a difference whether I access directly/behind nginx, via http/https, via hostname/IP-address or even with/without password configured in the application.
Here are corresponding TRACE logs (I've replaced my actual password of course 😉):

Steps to Reproduce
Two possibilities:
-
Copy the example source code from the sources linked below into separate project.
- Asp.Net startup (plugin is loaded at lines 249 and 404)
- Plugin (lines 101 to 129)
-
Set up ArchiSteamFarm in "generic" configuration and install it's "monitoring plugin". The application release is still tracking version
1.7.0-rc.1so you either need to manually build or grab it from the build pipeline where we originally wanted to upgrade to the newest version over here.
Until now I was not yet able to reproduce it using only localhost but only on a remote host so keep in mind that you might need to have a phone or raspberry pi at hand.
Expected Result
Response from prometheus metrics endpoint contains metrics.
Actual Result
Response status code is 200 and Content-Length header is 0.
Additional Context
Thank you in advance for looking into this. If I can be of any assistance, please let me know.