Skip to content

Instantly share code, notes, and snippets.

@bonclay7
Created April 15, 2026 11:10
Show Gist options
  • Select an option

  • Save bonclay7/be1e832fffd48602bedb2053a1fbb26a to your computer and use it in GitHub Desktop.

Select an option

Save bonclay7/be1e832fffd48602bedb2053a1fbb26a to your computer and use it in GitHub Desktop.
# OpenTelemetry Collector config for Flippy
#
# Receives metrics + traces from Flippy via gRPC/HTTP,
# exports to AWS CloudWatch (metrics) and X-Ray (traces) via OTLP endpoints.
#
# Prerequisites:
# 1. AWS credentials configured (~/.aws/credentials or env vars)
# 2. IAM policy: CloudWatchAgentServerPolicy attached to your user/role
# 3. Transaction Search enabled in X-Ray (for traces)
#
# Usage:
# otelcol-contrib --config otel-collector-config.yaml
#
# Change AWS_REGION below to your region (e.g. eu-west-1, us-east-1).
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch:
send_batch_size: 200
timeout: 10s
exporters:
# Metrics → CloudWatch via OTLP
otlphttp/metrics:
tls:
insecure: false
endpoint: https://monitoring.${AWS_REGION}.amazonaws.com/
auth:
authenticator: sigv4auth/metrics
# Traces → X-Ray via OTLP
otlphttp/traces:
compression: gzip
traces_endpoint: https://xray.${AWS_REGION}.amazonaws.com/v1/traces
auth:
authenticator: sigv4auth/traces
extensions:
sigv4auth/metrics:
service: monitoring
region: ${AWS_REGION}
sigv4auth/traces:
service: xray
region: ${AWS_REGION}
service:
telemetry:
logs:
level: debug
extensions: [sigv4auth/metrics, sigv4auth/traces]
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/metrics]
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/traces]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment