Skip to content

Commit

Permalink
Update default host and port for PrometheusExporter to align with the…
Browse files Browse the repository at this point in the history
… OTel spec. (#2783)
  • Loading branch information
Yun-Ting authored Jan 25, 2022
1 parent 1150f4a commit a4ef4ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Prometheus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class PrometheusExporterOptions
internal Func<DateTimeOffset> GetUtcNowDateTimeOffset = () => DateTimeOffset.UtcNow;

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

#if NETCOREAPP3_1_OR_GREATER
/// <summary>
Expand All @@ -47,7 +47,7 @@ public class PrometheusExporterOptions

/// <summary>
/// Gets or sets the prefixes to use for the http listener. Default
/// value: http://*:80/.
/// value: http://localhost:9464/.
/// </summary>
public IReadOnlyCollection<string> HttpListenerPrefixes
{
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTelemetry.Exporter.Prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a4ef4ee

Please sign in to comment.