Skip to content

Commit a4ef4ee

Browse files
authored
Update default host and port for PrometheusExporter to align with the OTel spec. (#2783)
1 parent 1150f4a commit a4ef4ee

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
* Update default `httpListenerPrefixes` for PrometheusExporter to be `http://localhost:9464/`.
6+
([2783](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2783))
7+
58
## 1.2.0-rc1
69

710
Released 2021-Nov-29

src/OpenTelemetry.Exporter.Prometheus/PrometheusExporterOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class PrometheusExporterOptions
2929
internal Func<DateTimeOffset> GetUtcNowDateTimeOffset = () => DateTimeOffset.UtcNow;
3030

3131
private int scrapeResponseCacheDurationMilliseconds = 10 * 1000;
32-
private IReadOnlyCollection<string> httpListenerPrefixes = new string[] { "http://*:80/" };
32+
private IReadOnlyCollection<string> httpListenerPrefixes = new string[] { "http://localhost:9464/" };
3333

3434
#if NETCOREAPP3_1_OR_GREATER
3535
/// <summary>
@@ -47,7 +47,7 @@ public class PrometheusExporterOptions
4747

4848
/// <summary>
4949
/// Gets or sets the prefixes to use for the http listener. Default
50-
/// value: http://*:80/.
50+
/// value: http://localhost:9464/.
5151
/// </summary>
5252
public IReadOnlyCollection<string> HttpListenerPrefixes
5353
{

src/OpenTelemetry.Exporter.Prometheus/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ properties:
8383

8484
* `HttpListenerPrefixes`: Defines the prefixes which will be used by the
8585
listener when `StartHttpListener` is `true`. The default value is
86-
`["http://*:80/"]`. You may specify multiple endpoints.
86+
`["http://localhost:9464/"]`. You may specify multiple endpoints.
8787
8888
For details see:
8989
[HttpListenerPrefixCollection.Add(String)](https://docs.microsoft.com/dotnet/api/system.net.httplistenerprefixcollection.add)

0 commit comments

Comments
 (0)