(Optional) Configure the Collector Endpoint

By default, the collector endpoint points to http://localhost:4318 and sends metrics via HTTP using OTLP format. The .NET Agent for OpenTelemetry does not support sending metrics via gRPC.

The endpoint can be configured with the environment variable OTEL_EXPORTER_OTLP_ENDPOINT:

OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:8080