opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

Support UriPrefixes with wildcard

Open mayafit opened this issue 2 years ago • 3 comments

Bug Report

using OpenTelemetry.Exporter.Prometheus.HttpListener version 1.5.0-alpha.1
with .net 7.0

Symptom

I would like to use a wildcard when defining the URIPrefixes . i am doing so using the following code :

        using MeterProvider meterProvider = Sdk.CreateMeterProviderBuilder()
                .AddMeter("MyAppMeter")
                .AddPrometheusHttpListener(opt =>
                {
                  opt.UriPrefixes = new string[] { "http://*:5000/" };
                })
                .Build();

What is the expected behavior?

I would expect the endpoint to be available on port 5000

What is the actual behavior? the endpoint is down

mayafit avatar May 11 '23 09:05 mayafit

@Yun-Ting Do you recall if this was addressed?

cijothomas avatar Jun 20 '23 17:06 cijothomas

Running into the same issue, tried using the workaround suggested for the older SDK version but it does not seem to pick up and expose the endpoint: https://github.com/open-telemetry/opentelemetry-dotnet/issues/2840#issuecomment-1072977042

katriendg avatar Aug 21 '23 07:08 katriendg

This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

github-actions[bot] avatar Oct 15 '24 03:10 github-actions[bot]

Closed as inactive. Feel free to reopen if this issue is still a concern.

github-actions[bot] avatar Oct 23 '24 03:10 github-actions[bot]