87 lines
2.2 KiB
YAML
87 lines
2.2 KiB
YAML
# OTel Collector: OTLP in, three signals out.
|
|
# - traces -> Tempo (OTLP/gRPC)
|
|
# - metrics -> Prometheus exposition on :8889 (Prometheus scrapes it)
|
|
# - logs -> Loki native OTLP endpoint
|
|
# memory_limiter + batch keep RAM bounded; exporter queues are bounded and
|
|
# retry is time-limited, so a dead backend cannot grow RAM without bound.
|
|
receivers:
|
|
otlp:
|
|
protocols:
|
|
# Internal OTLP with mandatory client certificates (mTLS): the API and the
|
|
# worker present distinct client identities. Random network clients cannot
|
|
# inject telemetry at all.
|
|
grpc:
|
|
endpoint: 0.0.0.0:4317
|
|
tls:
|
|
cert_file: /run/secrets/otel.crt
|
|
key_file: /run/secrets/otel.key
|
|
client_ca_file: /run/secrets/ca.crt
|
|
http:
|
|
endpoint: 0.0.0.0:4318
|
|
tls:
|
|
cert_file: /run/secrets/otel.crt
|
|
key_file: /run/secrets/otel.key
|
|
client_ca_file: /run/secrets/ca.crt
|
|
|
|
processors:
|
|
memory_limiter:
|
|
check_interval: 1s
|
|
limit_mib: 256
|
|
spike_limit_mib: 64
|
|
resource:
|
|
attributes:
|
|
- key: deployment.environment.name
|
|
value: lab
|
|
action: upsert
|
|
batch:
|
|
send_batch_size: 1024
|
|
send_batch_max_size: 2048
|
|
timeout: 5s
|
|
|
|
exporters:
|
|
prometheus:
|
|
endpoint: 0.0.0.0:8889
|
|
resource_to_telemetry_conversion:
|
|
enabled: true
|
|
otlp/tempo:
|
|
endpoint: tempo:4317
|
|
tls:
|
|
insecure: true
|
|
sending_queue:
|
|
enabled: true
|
|
queue_size: 1000
|
|
retry_on_failure:
|
|
enabled: true
|
|
max_elapsed_time: 60s
|
|
otlphttp/loki:
|
|
endpoint: http://loki:3100/otlp
|
|
sending_queue:
|
|
enabled: true
|
|
queue_size: 1000
|
|
retry_on_failure:
|
|
enabled: true
|
|
max_elapsed_time: 60s
|
|
debug:
|
|
verbosity: basic
|
|
|
|
service:
|
|
telemetry:
|
|
logs:
|
|
level: warn
|
|
metrics:
|
|
level: basic
|
|
address: 0.0.0.0:8888
|
|
pipelines:
|
|
traces:
|
|
receivers: [otlp]
|
|
processors: [memory_limiter, resource, batch]
|
|
exporters: [otlp/tempo, debug]
|
|
metrics:
|
|
receivers: [otlp]
|
|
processors: [memory_limiter, resource, batch]
|
|
exporters: [prometheus, debug]
|
|
logs:
|
|
receivers: [otlp]
|
|
processors: [memory_limiter, resource, batch]
|
|
exporters: [otlphttp/loki, debug]
|