forked from open-telemetry/opentelemetry-helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfigmap-agent.yaml
More file actions
164 lines (163 loc) · 4.7 KB
/
Copy pathconfigmap-agent.yaml
File metadata and controls
164 lines (163 loc) · 4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
# Source: opentelemetry-collector/templates/configmap-agent.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.115.24
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.126.0"
app.kubernetes.io/managed-by: Helm
data:
relay: |
connectors:
spanmetrics:
dimensions:
- name: http.method
- name: cgx.transaction
- name: cgx.transaction.root
- name: status_code
- name: db.namespace
- name: db.operation.name
- name: db.collection.name
- name: db.system
- name: http.response.status_code
- name: rpc.grpc.status_code
- name: service.version
histogram:
explicit:
buckets:
- 1ms
- 4ms
- 10ms
- 20ms
- 50ms
- 100ms
- 200ms
- 500ms
- 1s
- 2s
- 5s
metrics_expiration: 0
metrics_flush_interval: 15s
namespace: ""
exporters:
debug: {}
otlp:
endpoint: example-opentelemetry-collector:4317
tls:
insecure: true
extensions:
health_check:
endpoint: ${env:MY_POD_IP}:13133
processors:
memory_limiter:
check_interval: 5s
limit_percentage: 80
spike_limit_percentage: 25
transform/kubeletstatscpu:
error_mode: ignore
metric_statements:
- context: metric
statements:
- set(unit, "1") where name == "container.cpu.usage"
- set(name, "container.cpu.utilization") where name == "container.cpu.usage"
- set(unit, "1") where name == "k8s.pod.cpu.usage"
- set(name, "k8s.pod.cpu.utilization") where name == "k8s.pod.cpu.usage"
- set(unit, "1") where name == "k8s.node.cpu.usage"
- set(name, "k8s.node.cpu.utilization") where name == "k8s.node.cpu.usage"
transform/prometheus:
error_mode: ignore
metric_statements:
- context: metric
statements:
- replace_pattern(name, "_total$", "")
- context: resource
statements:
- set(attributes["k8s.pod.ip"], attributes["net.host.name"]) where attributes["service.name"]
== "opentelemetry-collector"
- delete_key(attributes, "service_name") where attributes["service.name"] ==
"opentelemetry-collector"
- context: datapoint
statements:
- delete_key(attributes, "service_name") where resource.attributes["service.name"]
== "opentelemetry-collector"
- delete_key(attributes, "otel_scope_name") where attributes["service.name"]
== "opentelemetry-collector"
transform/spanmetrics:
error_mode: silent
trace_statements:
- context: span
statements:
- set(attributes["http.response.status_code"], attributes["http.status_code"])
where attributes["http.response.status_code"] == nil
receivers:
kubeletstats:
auth_type: serviceAccount
collect_all_network_interfaces:
node: true
pod: true
collection_interval: 20s
endpoint: ${env:K8S_NODE_IP}:10250
insecure_skip_verify: true
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
max_recv_msg_size_mib: 20
http:
endpoint: ${env:MY_POD_IP}:4318
prometheus:
config:
scrape_configs:
- job_name: opentelemetry-collector
scrape_interval: 30s
static_configs:
- targets:
- ${env:MY_POD_IP}:8888
service:
extensions:
- health_check
pipelines:
logs:
exporters:
- otlp
- debug
processors:
- memory_limiter
receivers:
- otlp
metrics:
exporters:
- otlp
- debug
processors:
- memory_limiter
- transform/kubeletstatscpu
receivers:
- kubeletstats
- spanmetrics
- otlp
traces:
exporters:
- otlp
- debug
- spanmetrics
processors:
- memory_limiter
- transform/spanmetrics
receivers:
- otlp
telemetry:
logs:
encoding: json
metrics:
readers:
- pull:
exporter:
prometheus:
host: ${env:MY_POD_IP}
port: 8888