aspire-samples icon indicating copy to clipboard operation
aspire-samples copied to clipboard

Remove workaround for ASP.NET Core Promethesus exporter issue when resolved

Open DamianEdwards opened this issue 1 year ago • 6 comments
trafficstars

The Metrics sample is working around open-telemetry/opentelemetry-dotnet-contrib#1617 right now. These workarounds should be removed when this issue is resovled.

DamianEdwards avatar Apr 19 '24 17:04 DamianEdwards

@samsp-msft can you follow up in that external issue as this is broken for GA?

joperezr avatar May 06 '24 19:05 joperezr

The issue with prometheus is resolved and metrics are working with OpenTelemetry.Exporter.Prometheus.AspNetCore 1.9.0-beta.2.

However, in trying that out I realized what a mess getting prometheus to work with anything but the simplest projects is. I was trying to get it to work with testshop, and ran into issues with:

  • https redirection and getting prometheus to be happy with the dev cert - in the end I had to remove the https redirection
  • Talking between containers - and getting the ports right - the sample project uses a direct url
  • Configuring prometheus to scrape from each applicable container

I think to make prometheus a real story we would need to have a better solution for how it can resolve the services that it needs to pull the data from. I don't know if we can use one of the existing scrape discovery mechanisms, or if we need to add a prometheus scraping provider to apphost that can then deliver the dependency data via config modifications, but I would suggest the prometheus experience is less than ideal.

It reminds me why the dashboard is such a revolutionary experience.

samsp-msft avatar Jul 18 '24 23:07 samsp-msft

Moving to backlog for now. Once we are at 8.2 (very shortly) we'll make the case of what we want to bring in.

mitchdenny avatar Jul 22 '24 08:07 mitchdenny

Hey @DamianEdwards, I think we can remove the workaround at this moment, right?

LeftTwixWand avatar Nov 16 '24 16:11 LeftTwixWand

Possibly! Would you like to send a PR?

DamianEdwards avatar Nov 16 '24 18:11 DamianEdwards

Hey @DamianEdwards Here is PR: #576

LeftTwixWand avatar Nov 17 '24 23:11 LeftTwixWand