diff --git a/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md b/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md index ff560b9242f..22d45e2c8ff 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Update default `httpListenerPrefixes` for PrometheusExporter to be `http://localhost:9464/`. +([2783](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2783)) + ## 1.2.0-rc1 Released 2021-Nov-29 diff --git a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterOptions.cs b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterOptions.cs index 391ea8a0068..1c9878afd3f 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterOptions.cs +++ b/src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterOptions.cs @@ -29,7 +29,7 @@ public class PrometheusExporterOptions internal Func GetUtcNowDateTimeOffset = () => DateTimeOffset.UtcNow; private int scrapeResponseCacheDurationMilliseconds = 10 * 1000; - private IReadOnlyCollection httpListenerPrefixes = new string[] { "http://*:80/" }; + private IReadOnlyCollection httpListenerPrefixes = new string[] { "http://localhost:9464/" }; #if NETCOREAPP3_1_OR_GREATER /// @@ -47,7 +47,7 @@ public class PrometheusExporterOptions /// /// Gets or sets the prefixes to use for the http listener. Default - /// value: http://*:80/. + /// value: http://localhost:9464/. /// public IReadOnlyCollection HttpListenerPrefixes { diff --git a/src/OpenTelemetry.Exporter.Prometheus/README.md b/src/OpenTelemetry.Exporter.Prometheus/README.md index 64b3329d627..b92b5093525 100644 --- a/src/OpenTelemetry.Exporter.Prometheus/README.md +++ b/src/OpenTelemetry.Exporter.Prometheus/README.md @@ -83,7 +83,7 @@ properties: * `HttpListenerPrefixes`: Defines the prefixes which will be used by the listener when `StartHttpListener` is `true`. The default value is - `["http://*:80/"]`. You may specify multiple endpoints. + `["http://localhost:9464/"]`. You may specify multiple endpoints. For details see: [HttpListenerPrefixCollection.Add(String)](https://docs.microsoft.com/dotnet/api/system.net.httplistenerprefixcollection.add)