-
Notifications
You must be signed in to change notification settings - Fork 10
/
values.yaml
953 lines (942 loc) · 39 KB
/
values.yaml
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
# For advanced configuration options, refer to the [official OpenTelemetry Helm chart](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-kube-stack/values.yaml)
opentelemetry-operator:
manager:
extraArgs:
- --enable-go-instrumentation
admissionWebhooks:
certManager:
enabled: false # For production environments, it is [recommended to use cert-manager for better security and scalability](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator#tls-certificate-requirement).
autoGenerateCert:
enabled: true # Enable/disable automatic certificate generation. Set to false if manually managing certificates.
recreate: true # Force certificate regeneration on updates. Only applicable if autoGenerateCert.enabled is true.
crds:
create: true # Install the OpenTelemetry Operator CRDs.
defaultCRConfig:
image:
repository: "docker.elastic.co/beats/elastic-agent"
tag: "8.16.0"
targetAllocator:
enabled: false # Enable/disable the Operator's Target allocator.
# Refer to: https://github.com/open-telemetry/opentelemetry-operator/tree/main/cmd/otel-allocator
clusterRole:
rules:
- apiGroups: [ "" ]
resources: ["configmaps"]
verbs: ["get"]
# `clusterName` specifies the name of the Kubernetes cluster. It sets the 'k8s.cluster.name' field.
# Cluster Name is automatically detected for EKS/GKE/AKS. Add the below value in environments where cluster name cannot be detected.
# clusterName: myClusterName
collectors:
# Cluster is a K8s deployment EDOT collector focused on gathering telemetry
# at the cluster level (Kubernetes Events and cluster metrics).
cluster:
# Configure the pods resources to control CPU and memory usage.
# resources:
# limits:
# cpu: 100m
# memory: 500Mi
# requests:
# cpu: 100m
# memory: 500Mi
env:
- name: ELASTIC_AGENT_OTEL
value: '"true"'
- name: ELASTIC_ENDPOINT
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_endpoint
- name: ELASTIC_API_KEY
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_api_key
config:
exporters:
# [Debug exporter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/debugexporter/README.md)
debug:
verbosity: basic # Options: basic, detailed. Choose verbosity level for debug logs.
# [Elasticsearch exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/elasticsearchexporter/README.md)
elasticsearch/otel:
endpoints: # List of Elasticsearch endpoints.
- ${env:ELASTIC_ENDPOINT}
api_key: ${env:ELASTIC_API_KEY} # API key for Elasticsearch authentication.
logs_dynamic_index:
enabled: true
# Enable in order to skip the SSL certificate Check
# tls:
# insecure_skip_verify: true
mapping:
mode: otel
processors:
# [Resource Detection Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor)
resourcedetection/eks:
detectors: [env, eks] # Detects resources from environment variables and EKS (Elastic Kubernetes Service).
timeout: 15s
override: true
eks:
resource_attributes:
k8s.cluster.name:
enabled: true
resourcedetection/gcp:
detectors: [env, gcp] # Detects resources from environment variables and GCP (Google Cloud Platform).
timeout: 2s
override: true
resourcedetection/aks:
detectors: [env, aks] # Detects resources from environment variables and AKS (Azure Kubernetes Service).
timeout: 2s
override: true
aks:
resource_attributes:
k8s.cluster.name:
enabled: true
# [Resource Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor)
resource/k8s: # Resource attributes tailored for services within Kubernetes.
attributes:
- key: service.name # Set the service.name resource attribute based on the well-known app.kubernetes.io/name label
from_attribute: app.label.name
action: insert
- key: service.name # Set the service.name resource attribute based on the k8s.container.name attribute
from_attribute: k8s.container.name
action: insert
- key: app.label.name # Delete app.label.name attribute previously used for service.name
action: delete
- key: service.version # Set the service.version resource attribute based on the well-known app.kubernetes.io/version label
from_attribute: app.label.version
action: insert
- key: app.label.version # Delete app.label.version attribute previously used for service.version
action: delete
resource/hostname:
attributes:
- key: host.name
from_attribute: k8s.node.name
action: upsert
# [K8s Attributes Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor)
k8sattributes:
passthrough: false # Annotates resources with the pod IP and does not try to extract any other metadata.
pod_association:
# Below association takes a look at the k8s.pod.ip and k8s.pod.uid resource attributes or connection's context, and tries to match it with the pod having the same attribute.
- sources:
- from: resource_attribute
name: k8s.pod.ip
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: connection
extract:
metadata:
- "k8s.namespace.name"
- "k8s.deployment.name"
- "k8s.replicaset.name"
- "k8s.statefulset.name"
- "k8s.daemonset.name"
- "k8s.cronjob.name"
- "k8s.job.name"
- "k8s.node.name"
- "k8s.pod.name"
- "k8s.pod.ip"
- "k8s.pod.uid"
- "k8s.pod.start_time"
labels:
- tag_name: app.label.name
key: app.kubernetes.io/name
from: pod
- tag_name: app.label.version
key: app.kubernetes.io/version
from: pod
receivers:
# [K8s Objects Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8sobjectsreceiver)
k8sobjects:
objects:
- name: events
mode: "watch"
group: "events.k8s.io"
exclude_watch_type:
- "DELETED"
# [K8s Cluster Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8sclusterreceiver)
k8s_cluster:
auth_type: serviceAccount # Determines how to authenticate to the K8s API server. This can be one of none (for no auth), serviceAccount (to use the standard service account token provided to the agent pod), or kubeConfig to use credentials from ~/.kube/config.
node_conditions_to_report:
- Ready
- MemoryPressure
allocatable_types_to_report:
- cpu
- memory
metrics:
k8s.pod.status_reason:
enabled: true
resource_attributes:
k8s.kubelet.version:
enabled: true
os.description:
enabled: true
os.type:
enabled: true
k8s.container.status.last_terminated_reason:
enabled: true
# [Service Section](https://opentelemetry.io/docs/collector/configuration/#service)
service:
pipelines:
metrics:
exporters:
- debug
- elasticsearch/otel
processors:
- k8sattributes
- resourcedetection/eks
- resourcedetection/gcp
- resourcedetection/aks
- resource/k8s
- resource/hostname
receivers:
- k8s_cluster
logs:
receivers:
- k8sobjects
processors:
- resourcedetection/eks
- resourcedetection/gcp
- resourcedetection/aks
- resource/hostname
exporters:
- debug
- elasticsearch/otel
# Daemon is a K8s daemonset EDOT collector focused on gathering telemetry at
# node level and exposing an OTLP endpoint for data ingestion.
# Auto-instrumentation SDKs will use this endpoint.
daemon:
# Configure the pods resources to control CPU and memory usage.
resources:
limits:
cpu: 1500m
memory: 1500Mi
requests:
cpu: 100m
memory: 500Mi
env:
# Work around for open /mounts error: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35990
- name: HOST_PROC_MOUNTINFO
value: ""
- name: ELASTIC_AGENT_OTEL
value: '"true"'
- name: ELASTIC_ENDPOINT
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_endpoint
- name: ELASTIC_API_KEY
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_api_key
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
- name: GOMEMLIMIT
value: "1025MiB"
presets:
logsCollection:
enabled: true # Enable/disable the collection of node's logs.
storeCheckpoints: true # Store checkpoints for log collection, allowing for resumption from the last processed log.
hostNetwork: true # Use the host's network namespace. This allows the daemon to access the network interfaces of the host directly.
securityContext: # Run the daemon as the root user and group for proper metrics collection.
runAsUser: 0
runAsGroup: 0
scrape_configs_file: "" # [Prometheus metrics](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-kube-stack#scrape_configs_file-details)
config:
connectors:
# [Signal To Metrics Connector](https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/signaltometricsconnector)
signaltometrics: # Produces metrics from all signal types (traces, logs, or metrics).
logs:
- name: service_summary
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: metricset.name
default_value: service_summary
sum:
value: "1"
datapoints:
- name: service_summary
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: metricset.name
default_value: service_summary
sum:
value: "1"
spans:
- name: service_summary
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: metricset.name
default_value: service_summary
sum:
value: Int(AdjustedCount())
- name: transaction.duration.histogram
description: APM service transaction aggregated metrics as histogram
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: transaction.root
- key: transaction.type
- key: metricset.name
default_value: service_transaction
- key: elasticsearch.mapping.hints
default_value: [_doc_count]
unit: us
exponential_histogram:
value: Microseconds(end_time - start_time)
- name: transaction.duration.summary
description: APM service transaction aggregated metrics as summary
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: transaction.root
- key: transaction.type
- key: metricset.name
default_value: service_transaction
- key: elasticsearch.mapping.hints
default_value: [aggregate_metric_double]
unit: us
histogram:
buckets: [1]
value: Microseconds(end_time - start_time)
- name: transaction.duration.histogram
description: APM transaction aggregated metrics as histogram
ephemeral_resource_attribute: true
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
- key: container.id
- key: k8s.pod.name
- key: service.version
- key: service.instance.id # service.node.name
- key: process.runtime.name # service.runtime.name
- key: process.runtime.version # service.runtime.version
- key: telemetry.sdk.version # service.language.version??
- key: host.name
- key: os.type # host.os.platform
- key: faas.instance
- key: faas.name
- key: faas.version
- key: cloud.provider
- key: cloud.region
- key: cloud.availability_zone
- key: cloud.platform # cloud.servicename
- key: cloud.account.id
attributes:
- key: transaction.root
- key: transaction.name
- key: transaction.type
- key: transaction.result
- key: event.outcome
- key: metricset.name
default_value: transaction
- key: elasticsearch.mapping.hints
default_value: [_doc_count]
unit: us
exponential_histogram:
value: Microseconds(end_time - start_time)
- name: transaction.duration.summary
description: APM transaction aggregated metrics as summary
ephemeral_resource_attribute: true
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
- key: container.id
- key: k8s.pod.name
- key: service.version
- key: service.instance.id # service.node.name
- key: process.runtime.name # service.runtime.name
- key: process.runtime.version # service.runtime.version
- key: telemetry.sdk.version # service.language.version??
- key: host.name
- key: os.type # host.os.platform
- key: faas.instance
- key: faas.name
- key: faas.version
- key: cloud.provider
- key: cloud.region
- key: cloud.availability_zone
- key: cloud.platform # cloud.servicename
- key: cloud.account.id
attributes:
- key: transaction.root
- key: transaction.name
- key: transaction.type
- key: transaction.result
- key: event.outcome
- key: metricset.name
default_value: transaction
- key: elasticsearch.mapping.hints
default_value: [aggregate_metric_double]
unit: us
histogram:
buckets: [1]
value: Microseconds(end_time - start_time)
- name: span.destination.service.response_time.sum.us
description: APM span destination metrics
ephemeral_resource_attribute: true
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: span.name
- key: event.outcome
- key: service.target.type
- key: service.target.name
- key: span.destination.service.resource
- key: metricset.name
default_value: service_destination
unit: us
sum:
value: Double(Microseconds(end_time - start_time))
- name: span.destination.service.response_time.count
description: APM span destination metrics
ephemeral_resource_attribute: true
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: span.name
- key: event.outcome
- key: service.target.type
- key: service.target.name
- key: span.destination.service.resource
- key: metricset.name
default_value: service_destination
sum:
value: Int(AdjustedCount())
# event.success_count is populated using 2 metric definition with different conditions
# and value for the histogram bucket based on event outcome. Both metric definition
# are created using same name and attribute and will result in a single histogram.
# We use mapping hint of aggregate_metric_double, so, only the sum and the count
# values are required and the actual histogram bucket is ignored.
- name: event.success_count
description: Success count as a metric for service transaction
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: transaction.root
- key: transaction.type
- key: metricset.name
default_value: service_transaction
- key: elasticsearch.mapping.hints
default_value: [aggregate_metric_double]
conditions:
- attributes["event.outcome"] != nil and attributes["event.outcome"] == "success"
unit: us
histogram:
buckets: [1]
count: Int(AdjustedCount())
value: Int(AdjustedCount())
- name: event.success_count
description: Success count as a metric for service transaction
include_resource_attributes:
- key: service.name
- key: deployment.environment # service.environment
- key: telemetry.sdk.language # service.language.name
- key: agent.name # set via elastictraceprocessor
attributes:
- key: transaction.root
- key: transaction.type
- key: metricset.name
default_value: service_transaction
- key: elasticsearch.mapping.hints
default_value: [aggregate_metric_double]
conditions:
- attributes["event.outcome"] != nil and attributes["event.outcome"] != "success"
unit: us
histogram:
buckets: [0]
count: Int(AdjustedCount())
value: Double(0)
exporters:
# [Debug exporter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/debugexporter/README.md)
debug:
verbosity: basic
# [Elasticsearch exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/elasticsearchexporter/README.md)
elasticsearch/otel:
endpoints:
- ${env:ELASTIC_ENDPOINT}
api_key: ${env:ELASTIC_API_KEY}
metrics_dynamic_index:
enabled: true
logs_dynamic_index:
enabled: true
traces_dynamic_index:
enabled: true
flush:
interval: 10s
# tls:
# insecure_skip_verify: true
mapping:
mode: otel
# [Elasticsearch exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/elasticsearchexporter/README.md)
elasticsearch/ecs:
endpoints:
- ${env:ELASTIC_ENDPOINT}
api_key: ${env:ELASTIC_API_KEY}
# tls:
# insecure_skip_verify: true
mapping:
mode: ecs
processors:
# [Batch Processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor)
batch: {}
# [Elastic Trace Processor](https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/elastictraceprocessor)
elastictrace: {} # The processor enriches traces with elastic specific requirements.
# [LSM Interval Processor](https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/lsmintervalprocessor)
lsminterval:
intervals:
- duration: 1m
statements:
- set(resource.attributes["metricset.interval"], "1m")
- set(attributes["data_stream.dataset"], Concat([attributes["metricset.name"], "1m"], "."))
- set(attributes["processor.event"], "metric")
- duration: 10m
statements:
- set(resource.attributes["metricset.interval"], "10m")
- set(attributes["data_stream.dataset"], Concat([attributes["metricset.name"], "10m"], "."))
- set(attributes["processor.event"], "metric")
- duration: 60m
statements:
- set(resource.attributes["metricset.interval"], "60m")
- set(attributes["data_stream.dataset"], Concat([attributes["metricset.name"], "60m"], "."))
- set(attributes["processor.event"], "metric")
# [Elastic Infra Metrics Processor](https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/elasticinframetricsprocessor)
elasticinframetrics:
add_system_metrics: true
add_k8s_metrics: true
drop_original: true
# [Resource Detection Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor)
resourcedetection/eks:
detectors: [env, eks] # Detects resources from environment variables and EKS (Elastic Kubernetes Service).
timeout: 15s
override: true
eks:
resource_attributes:
k8s.cluster.name:
enabled: true
resourcedetection/gcp:
detectors: [env, gcp] # Detects resources from environment variables and GCP (Google Cloud Platform).
timeout: 2s
override: true
resourcedetection/aks:
detectors: [env, aks] # Detects resources from environment variables and AKS (Azure Kubernetes Service).
timeout: 2s
override: true
aks:
resource_attributes:
k8s.cluster.name:
enabled: true
resource/hostname:
attributes:
- key: host.name
from_attribute: k8s.node.name
action: upsert
resourcedetection/system:
detectors: ["system", "ec2"] # Detects resources from the system and EC2 instances.
system:
hostname_sources: [ "os" ]
resource_attributes:
host.name:
enabled: true
host.id:
enabled: false
host.arch:
enabled: true
host.ip:
enabled: true
host.mac:
enabled: true
host.cpu.vendor.id:
enabled: true
host.cpu.family:
enabled: true
host.cpu.model.id:
enabled: true
host.cpu.model.name:
enabled: true
host.cpu.stepping:
enabled: true
host.cpu.cache.l2.size:
enabled: true
os.description:
enabled: true
os.type:
enabled: true
ec2:
resource_attributes:
host.name:
enabled: false
host.id:
enabled: true
# [Resource Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor)
resource/k8s: # Resource attributes tailored for services within Kubernetes.
attributes:
- key: service.name # Set the service.name resource attribute based on the well-known app.kubernetes.io/name label
from_attribute: app.label.name
action: insert
- key: service.name # Set the service.name resource attribute based on the k8s.container.name attribute
from_attribute: k8s.container.name
action: insert
- key: app.label.name # Delete app.label.name attribute previously used for service.name
action: delete
- key: service.version # Set the service.version resource attribute based on the well-known app.kubernetes.io/version label
from_attribute: app.label.version
action: insert
- key: app.label.version # Delete app.label.version attribute previously used for service.version
action: delete
resource/cloud:
attributes:
- key: cloud.instance.id
from_attribute: host.id
action: insert
resource/process:
attributes:
- key: process.executable.name
action: delete
- key: process.executable.path
action: delete
# [Attributes Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor)
attributes/dataset:
actions:
- key: event.dataset
from_attribute: data_stream.dataset
action: upsert
# [K8s Attributes Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor)
k8sattributes:
filter:
# Only retrieve pods running on the same node as the collector
node_from_env_var: OTEL_K8S_NODE_NAME
passthrough: false
pod_association:
# Below association takes a look at the k8s.pod.ip and k8s.pod.uid resource attributes or connection's context, and tries to match it with the pod having the same attribute.
- sources:
- from: resource_attribute
name: k8s.pod.ip
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: connection
extract:
metadata:
- "k8s.namespace.name"
- "k8s.deployment.name"
- "k8s.replicaset.name"
- "k8s.statefulset.name"
- "k8s.daemonset.name"
- "k8s.cronjob.name"
- "k8s.job.name"
- "k8s.node.name"
- "k8s.pod.name"
- "k8s.pod.ip"
- "k8s.pod.uid"
- "k8s.pod.start_time"
labels:
- tag_name: app.label.name
key: app.kubernetes.io/name
from: pod
- tag_name: app.label.version
key: app.kubernetes.io/version
from: pod
k8sattributes/ecs:
filter:
# Only retrieve pods running on the same node as the collector
node_from_env_var: OTEL_K8S_NODE_NAME
passthrough: false
pod_association:
# Below association takes a look at the k8s.pod.ip and k8s.pod.uid resource attributes or connection's context, and tries to match it with the pod having the same attribute.
- sources:
- from: resource_attribute
name: k8s.pod.ip
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: connection
extract:
metadata:
- "k8s.replicaset.name"
- "k8s.statefulset.name"
- "k8s.daemonset.name"
- "k8s.cronjob.name"
- "k8s.job.name"
receivers:
# [OTLP Receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver)
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
# [File Log Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver)
filelog:
retry_on_failure:
enabled: true
start_at: end
exclude:
# exlude collector logs
- /var/log/pods/opentelemetry-operator-system_opentelemetry-kube-stack*/*/*.log
include:
- /var/log/pods/*/*/*.log
include_file_name: false
include_file_path: true
operators:
- id: container-parser # Extract container's metadata
type: container
# [Hostmetrics Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver)
hostmetrics:
collection_interval: 10s
root_path: /hostfs # Mounted node's root file system
scrapers:
cpu:
metrics:
system.cpu.utilization:
enabled: true
system.cpu.logical.count:
enabled: true
memory:
metrics:
system.memory.utilization:
enabled: true
process:
mute_process_exe_error: true
mute_process_io_error: true
mute_process_user_error: true
metrics:
process.threads:
enabled: true
process.open_file_descriptors:
enabled: true
process.memory.utilization:
enabled: true
process.disk.operations:
enabled: true
network: {}
processes: {}
load: {}
disk: {}
filesystem:
exclude_mount_points:
mount_points:
- /dev/*
- /proc/*
- /sys/*
- /run/k3s/containerd/*
- /var/lib/docker/*
- /var/lib/kubelet/*
- /snap/*
match_type: regexp
exclude_fs_types:
fs_types:
- autofs
- binfmt_misc
- bpf
- cgroup2
- configfs
- debugfs
- devpts
- devtmpfs
- fusectl
- hugetlbfs
- iso9660
- mqueue
- nsfs
- overlay
- proc
- procfs
- pstore
- rpc_pipefs
- securityfs
- selinuxfs
- squashfs
- sysfs
- tracefs
match_type: strict
# [Kubelet Stats Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kubeletstatsreceiver)
kubeletstats:
auth_type: serviceAccount # Authentication mechanism with the Kubelet endpoint, refer to: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kubeletstatsreceiver#configuration
collection_interval: 20s
endpoint: ${env:OTEL_K8S_NODE_NAME}:10250
node: '${env:OTEL_K8S_NODE_NAME}'
# Required to work for all CSPs without an issue
insecure_skip_verify: true
k8s_api_config:
auth_type: serviceAccount
metrics:
k8s.pod.memory.node.utilization:
enabled: true
k8s.pod.cpu.node.utilization:
enabled: true
k8s.container.cpu_limit_utilization:
enabled: true
k8s.pod.cpu_limit_utilization:
enabled: true
k8s.container.cpu_request_utilization:
enabled: true
k8s.container.memory_limit_utilization:
enabled: true
k8s.pod.memory_limit_utilization:
enabled: true
k8s.container.memory_request_utilization:
enabled: true
k8s.node.uptime:
enabled: true
k8s.node.cpu.usage:
enabled: true
k8s.pod.cpu.usage:
enabled: true
extra_metadata_labels:
- container.id
# [Service Section](https://opentelemetry.io/docs/collector/configuration/#service)
service:
pipelines:
logs/node:
receivers:
- filelog
processors:
- batch
- k8sattributes
- resourcedetection/system
- resourcedetection/eks
- resourcedetection/gcp
- resourcedetection/aks
- resource/k8s
- resource/hostname
- resource/cloud
exporters:
- debug
- elasticsearch/otel
metrics/node/otel:
receivers:
- kubeletstats
processors:
- batch
- k8sattributes
- resourcedetection/system
- resourcedetection/eks
- resourcedetection/gcp
- resourcedetection/aks
- resource/k8s
- resource/hostname
- resource/cloud
exporters:
- debug
- elasticsearch/otel
metrics/node/ecs:
receivers:
- hostmetrics
- kubeletstats
processors:
- elasticinframetrics
- batch
- k8sattributes/ecs
- resourcedetection/system
- resourcedetection/eks
- resourcedetection/gcp
- resourcedetection/aks
- resource/k8s
- resource/hostname
- resource/cloud
- attributes/dataset
- resource/process
exporters:
- debug
- elasticsearch/ecs
metrics/otel-apm:
receivers:
- otlp
processors:
- batch
- resource/hostname
exporters:
- debug
- signaltometrics
- elasticsearch/otel
logs/apm:
receivers:
- otlp
processors:
- batch
- resource/hostname
exporters:
- debug
- signaltometrics
- elasticsearch/otel
traces/apm:
receivers:
- otlp
processors:
- batch
- elastictrace
- resource/hostname
exporters:
- debug
- signaltometrics
- elasticsearch/otel
metrics/aggregated-otel-metrics:
receivers:
- signaltometrics
processors:
- batch
- lsminterval
exporters:
- debug
- elasticsearch/otel
# For more details on OpenTelemetry's zero-code instrumentation, see:
# https://opentelemetry.io/docs/concepts/instrumentation/zero-code/
instrumentation:
name: elastic-instrumentation
enabled: true # Enable/disable auto-instrumentation.
exporter:
endpoint: http://opentelemetry-kube-stack-daemon-collector.opentelemetry-operator-system.svc.cluster.local:4318 # The daemonset OpenTelemetry Collector endpoint where telemetry data will be exported.
propagators:
- tracecontext # W3C TraceContext propagator for distributed tracing.
- baggage # Baggage propagator to include baggage information in trace context.
- b3 # B3 propagator for Zipkin-based distributed tracing compatibility.
sampler:
type: parentbased_traceidratio # Sampler type
argument: "1.0" # Sampling rate set to 100% (all traces are sampled).
java:
image: docker.elastic.co/observability/elastic-otel-javaagent:1.0.0
nodejs:
image: docker.elastic.co/observability/elastic-otel-node:0.4.1
dotnet:
image: docker.elastic.co/observability/elastic-otel-dotnet:edge
python:
image: docker.elastic.co/observability/elastic-otel-python:0.3.0
go:
image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.14.0-alpha