The OpenTelemetry Collector's configuration is deploy/otel-collector/config.yaml, mounted read-only into the otel-collector service (Observability). Values such as ${env:STACKR_ENVIRONMENT} are read from the service's environment, which compose.yaml sets from .env.
The traces pipeline's exporters come from STACKR_TRACES_EXPORTERS, which make up sets from the profiles: [otlp_grpc/tempo, otlp_http/langfuse] when the langfuse profile runs, and [otlp_grpc/tempo] when it doesn't. Compose's default, for plain docker compose, is both.
LANGFUSE_OTLP_AUTH is base64 of the Langfuse project's public and secret keys, which make env derives. Prometheus scrapes the Collector's own metrics on port 8888 for the Collector health dashboard; neither 8888 nor the health check's 13133 is published.
# The OpenTelemetry Collector: every application, and the LiteLLM proxy, sends# OTLP here, and the Collector fans it out:# traces -> Tempo, and Langfuse when the langfuse profile runs# metrics -> Prometheus, through its OTLP receiver; portalr reads them# through prom-label-proxy# logs -> Loki, through its OTLP endpoint# See docs/architecture.md and ADR-0007. Each backend's address is Compose's# name by default, and its name in the AWS recipe's namespace there (ADR-0034).extensions:health_check:endpoint:0.0.0.0:13133receivers:otlp:protocols:grpc:endpoint:0.0.0.0:4317http:endpoint:0.0.0.0:4318cors:# Browser applications served from this machine can send OTLP too.allowed_origins:["http://localhost:*","http://127.0.0.1:*"]processors:memory_limiter:check_interval:1slimit_percentage:80spike_limit_percentage:25# Telemetry that doesn't say which environment it comes from is labelled# with STACKR_ENVIRONMENT (`local` by default).resource/environment:attributes:-key:deployment.environment.namevalue:${env:STACKR_ENVIRONMENT}action:insert# One attribute names every signal's tenant, tenant.id, whichever library# recorded it as artifactr.tenant.id, reflexr.tenant.id or relayr.tenant.id,# so portalr filters Tempo, Loki and Prometheus on one name (lattice# RFC-0002). Loki keeps it as the tenant_id structured metadata, and# Prometheus as the tenant_id label.transform/tenant:error_mode:ignoretrace_statements:->-set(span.attributes["tenant.id"], span.attributes["artifactr.tenant.id"])where span.attributes["artifactr.tenant.id"] != nil->-set(span.attributes["tenant.id"], span.attributes["reflexr.tenant.id"])where span.attributes["reflexr.tenant.id"] != nil->-set(span.attributes["tenant.id"], span.attributes["relayr.tenant.id"])where span.attributes["relayr.tenant.id"] != nilmetric_statements:->-set(datapoint.attributes["tenant.id"], datapoint.attributes["artifactr.tenant.id"])where datapoint.attributes["artifactr.tenant.id"] != nil->-set(datapoint.attributes["tenant.id"], datapoint.attributes["reflexr.tenant.id"])where datapoint.attributes["reflexr.tenant.id"] != nil->-set(datapoint.attributes["tenant.id"], datapoint.attributes["relayr.tenant.id"])where datapoint.attributes["relayr.tenant.id"] != nillog_statements:->-set(log.attributes["tenant.id"], log.attributes["artifactr.tenant.id"])where log.attributes["artifactr.tenant.id"] != nil->-set(log.attributes["tenant.id"], log.attributes["reflexr.tenant.id"])where log.attributes["reflexr.tenant.id"] != nil->-set(log.attributes["tenant.id"], log.attributes["relayr.tenant.id"])where log.attributes["relayr.tenant.id"] != nilbatch:{}exporters:otlp_grpc/tempo:endpoint:${env:TEMPO_ADDRESS:-tempo}:4317tls:insecure:trueotlp_http/prometheus:endpoint:http://${env:PROMETHEUS_ADDRESS:-prometheus}:9090/api/v1/otlptls:insecure:trueotlp_http/loki:endpoint:http://${env:LOKI_ADDRESS:-loki}:3100/otlptls:insecure:true# Langfuse takes traces only, over OTLP HTTP. The ingestion version header# makes them visible as soon as they are written.otlp_http/langfuse:endpoint:http://${env:LANGFUSE_ADDRESS:-langfuse-web}:3000/api/public/otelheaders:Authorization:Basic ${env:LANGFUSE_OTLP_AUTH}x-langfuse-ingestion-version:"4"service:extensions:[health_check]pipelines:traces:receivers:[otlp]processors:[memory_limiter,resource/environment,transform/tenant,batch]# [otlp_grpc/tempo, otlp_http/langfuse], or Tempo alone when the# langfuse profile isn't running; set in compose.yaml and the Makefile.exporters:${env:STACKR_TRACES_EXPORTERS}metrics:receivers:[otlp]processors:[memory_limiter,resource/environment,transform/tenant,batch]exporters:[otlp_http/prometheus]logs:receivers:[otlp]processors:[memory_limiter,resource/environment,transform/tenant,batch]exporters:[otlp_http/loki]telemetry:# The Collector's own metrics, scraped by Prometheus for the Collector# dashboard.metrics:level:detailedreaders:-pull:exporter:prometheus:host:0.0.0.0port:8888logs:level:info