fix: add agent key auth for ingest endpoints
This commit is contained in:
123
deploy/docker/otel-collector-config.yaml
Normal file
123
deploy/docker/otel-collector-config.yaml
Normal file
@@ -0,0 +1,123 @@
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🐍 OPHION - OpenTelemetry Collector Configuration
|
||||
# Receives traces/metrics/logs from instrumented applications
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
|
||||
receivers:
|
||||
# OTLP receiver - accepts data from any OTLP-compatible SDK
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
cors:
|
||||
allowed_origins:
|
||||
- "*"
|
||||
|
||||
# Prometheus receiver for metrics scraping (optional)
|
||||
prometheus:
|
||||
config:
|
||||
scrape_configs:
|
||||
- job_name: 'otel-collector'
|
||||
scrape_interval: 15s
|
||||
static_configs:
|
||||
- targets: ['localhost:8888']
|
||||
|
||||
processors:
|
||||
# Batch processor for better performance
|
||||
batch:
|
||||
timeout: 5s
|
||||
send_batch_size: 512
|
||||
send_batch_max_size: 1024
|
||||
|
||||
# Memory limiter to prevent OOM
|
||||
memory_limiter:
|
||||
check_interval: 1s
|
||||
limit_percentage: 80
|
||||
spike_limit_percentage: 25
|
||||
|
||||
# Resource processor to add common attributes
|
||||
resource:
|
||||
attributes:
|
||||
- key: collector.name
|
||||
value: ophion-collector
|
||||
action: upsert
|
||||
- key: deployment.environment
|
||||
from_attribute: OTEL_RESOURCE_ATTRIBUTES
|
||||
action: upsert
|
||||
|
||||
# Attributes processor for enrichment
|
||||
attributes:
|
||||
actions:
|
||||
- key: ophion.collected
|
||||
value: true
|
||||
action: upsert
|
||||
|
||||
exporters:
|
||||
# Export to Ophion server via OTLP
|
||||
otlphttp/ophion:
|
||||
endpoint: http://server:8080
|
||||
headers:
|
||||
X-Ophion-Source: otel-collector
|
||||
compression: gzip
|
||||
retry_on_failure:
|
||||
enabled: true
|
||||
initial_interval: 5s
|
||||
max_interval: 30s
|
||||
max_elapsed_time: 300s
|
||||
|
||||
# Debug exporter for troubleshooting (disable in production)
|
||||
debug:
|
||||
verbosity: basic
|
||||
sampling_initial: 5
|
||||
sampling_thereafter: 200
|
||||
|
||||
# Prometheus exporter for collector metrics
|
||||
prometheus:
|
||||
endpoint: 0.0.0.0:8889
|
||||
namespace: ophion_collector
|
||||
|
||||
extensions:
|
||||
# Health check extension
|
||||
health_check:
|
||||
endpoint: 0.0.0.0:13133
|
||||
path: /health
|
||||
|
||||
# Performance profiler
|
||||
pprof:
|
||||
endpoint: 0.0.0.0:1777
|
||||
|
||||
# zPages for debugging
|
||||
zpages:
|
||||
endpoint: 0.0.0.0:55679
|
||||
|
||||
service:
|
||||
extensions: [health_check, pprof, zpages]
|
||||
|
||||
pipelines:
|
||||
# Traces pipeline
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch, resource, attributes]
|
||||
exporters: [otlphttp/ophion, debug]
|
||||
|
||||
# Metrics pipeline
|
||||
metrics:
|
||||
receivers: [otlp, prometheus]
|
||||
processors: [memory_limiter, batch, resource]
|
||||
exporters: [otlphttp/ophion, debug]
|
||||
|
||||
# Logs pipeline
|
||||
logs:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch, resource]
|
||||
exporters: [otlphttp/ophion, debug]
|
||||
|
||||
telemetry:
|
||||
logs:
|
||||
level: info
|
||||
encoding: json
|
||||
metrics:
|
||||
level: detailed
|
||||
address: 0.0.0.0:8888
|
||||
Reference in New Issue
Block a user