Skip to content

Commit c1d0d6c

Browse files
authored
Link to .NET docs about different ports
Document the solution described in #3608 with a link to .NET documentation how to do this, because it seems a best practice to expose the Prometheus scraping endpoint on a different port.
1 parent 7fd3783 commit c1d0d6c

File tree

1 file changed

+2
-0
lines changed
  • src/OpenTelemetry.Exporter.Prometheus.AspNetCore

1 file changed

+2
-0
lines changed

src/OpenTelemetry.Exporter.Prometheus.AspNetCore/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ dotnet add package --prerelease OpenTelemetry.Exporter.Prometheus.AspNetCore
6565
context => context.Request.Path == "/internal/metrics"
6666
&& context.Connection.LocalPort == 5067);
6767
```
68+
69+
This can be used in combination with [configuring multiple ports on the ASP.NET application](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-6.0) to expose the scraping endpoint on a different port.
6870
6971
## Configuration
7072

0 commit comments

Comments
 (0)