Fix OTel wiring to match working Auth implementation
Three corrections vs Auth project: - Replace AddOtlpExporter() (traces only) with UseOtlpExporter() so both traces and logs are exported via OTLP - Remove redundant .WithLogging() call; builder.Logging.AddOpenTelemetry() is sufficient on its own - Pass OTEL_EXPORTER_OTLP_ENDPOINT/PROTOCOL through from host env vars instead of hardcoding the collector URL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ services:
|
||||
- VIRTUAL_PORT=8080
|
||||
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
|
||||
- ConnectionStrings__DefaultConnection=Host=apps-db;Port=5432;Database=${POSTGRES_DB:-budget};Username=${POSTGRES_USER:-budget};Password=${POSTGRES_PASSWORD}
|
||||
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
|
||||
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
|
||||
- OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}
|
||||
- OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL}
|
||||
- OTEL_SERVICE_NAME=budget
|
||||
depends_on:
|
||||
- apps-db
|
||||
|
||||
Reference in New Issue
Block a user