dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.65k stars 416 forks source link

Consider modeling the OTLP endpoint as a resource in the application model #97

Open davidfowl opened 11 months ago

davidfowl commented 11 months ago

Today the OTLP exporter is a magic environment variable injected into projects. We can consider modeling it as resource so it can be property represented when publishing.

See https://github.com/dotnet/aspire/pull/95

davidfowl commented 8 months ago

I was helping a customer make a sample work with the otlp exporter and I was wondering if we wanted to make this a specific resource type that we can make work differently in different environments. Given the fact that we're moving the dashboard out of process the next version, it feels like the right time to start modeling this resource. I also want to make it work with kubernetes deployments.

Here's the file for wiring up the otlp exporter pushing to both the dashboard and the grafana stack (loki, and tempo):

https://github.com/davidfowl/aspiresample/blob/loki/aspiresample.AppHost/Program.cs

@JamesNK @mitchdenny