|
| 1 | +apiVersion: v1 |
| 2 | +kind: ConfigMap |
| 3 | +metadata: |
| 4 | + name: otel-collector-config |
| 5 | +data: |
| 6 | + otel-collector-config.yaml: |- |
| 7 | + receivers: |
| 8 | + otlp: |
| 9 | + protocols: |
| 10 | + grpc: |
| 11 | + endpoint: 0.0.0.0:4317 |
| 12 | + http: |
| 13 | + endpoint: 0.0.0.0:4318 |
| 14 | + prometheus/collector: # needed if you use the docker-lgtm image |
| 15 | + config: |
| 16 | + scrape_configs: |
| 17 | + - job_name: 'opentelemetry-collector' |
| 18 | + static_configs: |
| 19 | + - targets: [ 'localhost:8888' ] |
| 20 | + filelog/otlp-json-logs: |
| 21 | + include: |
| 22 | + - /var/log/pods/*/*/*.log |
| 23 | + include_file_path: true |
| 24 | + operators: |
| 25 | + - id: container-parser |
| 26 | + type: container |
| 27 | + |
| 28 | + processors: |
| 29 | + batch: |
| 30 | + resourcedetection: |
| 31 | + detectors: [ "env", "system" ] |
| 32 | + override: false |
| 33 | +
|
| 34 | + k8sattributes: |
| 35 | + # Config details in |
| 36 | + # https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor |
| 37 | + connectors: |
| 38 | + otlpjson: |
| 39 | +
|
| 40 | + exporters: |
| 41 | + otlphttp/metrics: |
| 42 | + endpoint: http://localhost:9090/api/v1/otlp |
| 43 | + otlphttp/traces: |
| 44 | + endpoint: http://localhost:4418 |
| 45 | + otlphttp/logs: |
| 46 | + endpoint: http://localhost:3100/otlp |
| 47 | + debug/metrics: |
| 48 | + verbosity: detailed |
| 49 | + debug/traces: |
| 50 | + verbosity: detailed |
| 51 | + debug/logs: |
| 52 | + verbosity: detailed |
| 53 | + nop: |
| 54 | + |
| 55 | + service: |
| 56 | + pipelines: |
| 57 | + traces: |
| 58 | + receivers: [ otlp ] |
| 59 | + processors: [ k8sattributes, resourcedetection, batch ] |
| 60 | + exporters: [ otlphttp/traces ] |
| 61 | + metrics: |
| 62 | + receivers: [ otlp, prometheus/collector ] |
| 63 | + processors: [ k8sattributes, resourcedetection, batch ] |
| 64 | + exporters: [ otlphttp/metrics ] |
| 65 | + logs/raw_otlpjson: |
| 66 | + receivers: [ filelog/otlp-json-logs ] |
| 67 | + # No need for processors before the otlpjson connector |
| 68 | + # Declare processors in the shared "logs" pipeline below |
| 69 | + processors: [ ] |
| 70 | + exporters: [ otlpjson ] |
| 71 | + logs/otlp: |
| 72 | + receivers: [ otlp, otlpjson ] |
| 73 | + processors: [ k8sattributes, resourcedetection, batch ] |
| 74 | + exporters: [ otlphttp/logs ] |
| 75 | + # exporters: [ otlphttp/logs, debug/logs ] # Uncomment this line to enable debug logging |
0 commit comments