Telemetry
Integration with AWS Cloudwatch
We can configure the OTel collector to send logs to AWS Cloudwatch. To do so:
-
Export the collector config map into a file:
kubectl get cm oblv-deploy-stack-oblv-deploy-chart-collector-config \\
-n kube-system -o yaml > /tmp/collector-config.yaml
cat /tmp/collector-config.yaml
apiVersion: v1
data:
collector-config.yaml: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
exporters: [debug]
metrics:
receivers: [otlp]
exporters: [debug]
logs:
receivers: [otlp]
exporters: [debug]
kind: ConfigMap -
Edit the config map to configure AWS CloudWatch as an exporter:
apiVersion: v1
data:
collector-config.yaml: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
debug:
verbosity: detailed
awscloudwatchlogs:
log_group_name: "oblv-deploy-logs"
log_stream_name: "oblv-deploy-stream"
raw_log: true
region: "us-east-1"
endpoint: "logs.us-east-1.amazonaws.com"
log_retention: 365
service:
pipelines:
traces:
receivers: [otlp]
exporters: [debug]
metrics:
receivers: [otlp]
exporters: [debug]
logs:
receivers: [otlp]
exporters: [debug, awscloudwatchlogs]
kind: ConfigMap -
Update the configmap:
kubectl apply -f /tmp/collector-config.yaml -n kube-system
configmap/oblv-deploy-stack-oblv-deploy-chart-collector-config configured -
Restart the OTel collector pod"
kubectl rollout restart \\
deployment/oblv-deploy-stack-oblv-deploy-chart-collector \\
-n kube-system
deployment.apps/oblv-deploy-stack-oblv-deploy-chart-collector restarted