curated_compose/docker/alloy/config.alloy
2026-06-16 11:02:17 -04:00

42 lines
1.6 KiB
Text

// =============================================================================
// Grafana Alloy Pipeline Configuration
// Centralized OpenTelemetry collector for the curated compose stacks.
// Receives OTLP traces/metrics/logs and forwards to the LGTM backend.
// =============================================================================
// ---------------------------------------------------------------------------
// OTLP Receiver — gRPC + HTTP
// All stacks push telemetry here via OTLP gRPC (port 4317) or OTLP HTTP (port
// 4318). Other stacks reference this service on the `pipeline` network as `otel`
// or `alloy`.
// ---------------------------------------------------------------------------
otelcol.receiver.otlp "default" {
grpc {
endpoint = "0.0.0.0:4317"
}
http {
endpoint = "0.0.0.0:4318"
}
output {
traces = [otelcol.exporter.otlp.lgtm.input]
metrics = [otelcol.exporter.otlp.lgtm.input]
logs = [otelcol.exporter.otlp.lgtm.input]
}
}
// ---------------------------------------------------------------------------
// OTLP Exporter — Forward to LGTM
// Sends all received telemetry to the LGTM backend (grafana/otel-lgtm).
// The target endpoint is configurable via the ALLOY_OTLP_FORWARD_ENDPOINT env
// var, defaulting to http://lgtm:4318 (LGTM's OTLP HTTP endpoint on pipeline).
// ---------------------------------------------------------------------------
otelcol.exporter.otlp "lgtm" {
client {
endpoint = env("OTEL_EXPORTER_OTLP_ENDPOINT")
tls {
insecure = true
insecure_skip_verify = true
}
}
}