- 
                Notifications
    You must be signed in to change notification settings 
- Fork 715
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
Related: practical-otel/opentelemetry-aspire-collector#1
I just went through a lot of trouble debugging this in one of our own applications and made a YouTube video about it, but TL;DR; .NET Aspire 9.4 will front-run the OTEL_EXPORTER_OTLP_ENDPOINT  and overwrite it with its own dashboard OTLP ingestion endpoint at the last minute, even though it looks like it's set correctly inside the .NET Aspire resources view in the first place.
 
Short video I made demo-ing this and a suggested work-around (using custom environment variables and then explicitly using them in the OTEL pipeline): https://www.youtube.com/watch?v=dCKyNCdtaVc
Describe the solution you'd like
if a user is going through the trouble of explicitly specifying OTEL_EXPORTER_OTLP_ENDPOINT inside the Aspire AppHost, Aspire shouldn't front-run that and substitute its own values. I've seen the solutions used in projects like https://github.com/dotnet/aspire-samples/tree/main/samples/Metrics and that seems... Like a tremendous amount of work on the part of the user for what amounts to setting an environment variable.
It'd be better if Aspire just didn't try to overwrite the OTEL_EXPORTER_OTLP_ENDPOINT value if it was already specified here, rather than requiring a Manhattan Project's worth of Aspire internals knowledge or a third party plugin implementing the same.
Additional context
No response