WithOtlpExporter
should not set environment variables when dashboard is disabled
#7031
Open
1 task done
Labels
untriaged
New issue has not been triaged
Is there an existing issue for this?
Describe the bug
When the dashboard is disabled (such as when running with
DistributedApplicationTestingBuilder
), then theWithOtlpEndpoint
method will configure apps to use a non existant OTLP exporter. This can lead to misleading errors in apps that fail to send open telemetry to the non existant endpoint.Expected Behavior
When the dashboard is not running, there's nothing to receive OTLP, so the OTLP environment variables should be omitted.
Steps To Reproduce
Expected result:
OTEL_EXPORTER_OTLP_ENDPOINT
is not setActual Results:
OTEL_EXPORTER_OTLP_ENDPOINT
is set.Exceptions (if any)
No response
.NET Version info
Anything else?
The text was updated successfully, but these errors were encountered: