Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/docker-otel-lgtm
Path: blob/main/examples/java/json-logging-otlp/k8s/collector-configmap.yaml
401 views
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
connectors:
35
otlpjson:
36
37
exporters:
38
otlphttp/metrics:
39
endpoint: http://localhost:9090/api/v1/otlp
40
otlphttp/traces:
41
endpoint: http://localhost:4418
42
otlphttp/logs:
43
endpoint: http://localhost:3100/otlp
44
debug/metrics:
45
verbosity: detailed
46
debug/traces:
47
verbosity: detailed
48
debug/logs:
49
verbosity: detailed
50
nop:
51
52
service:
53
pipelines:
54
traces:
55
receivers: [ otlp ]
56
processors: [ batch ]
57
exporters: [ otlphttp/traces ]
58
metrics:
59
receivers: [ otlp, prometheus/collector ]
60
processors: [ batch ]
61
exporters: [ otlphttp/metrics ]
62
logs/raw_otlpjson:
63
receivers: [ filelog/otlp-json-logs ]
64
# (i) no need for processors before the otlpjson connector
65
# Declare processors in the shared "logs" pipeline below
66
processors: [ ]
67
exporters: [ otlpjson ]
68
logs/otlp:
69
receivers: [ otlp, otlpjson ]
70
processors: [ resourcedetection, batch ]
71
exporters: [ otlphttp/logs ]
72
# exporters: [ otlphttp/logs, debug/logs ] # Uncomment this line to enable debug logging
73
74