-
Notifications
You must be signed in to change notification settings - Fork 138
/
collector-values.yaml
99 lines (93 loc) · 2.75 KB
/
collector-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
mode: deployment
image:
repository: ghcr.io/dynatrace/dynatrace-otel-collector/dynatrace-otel-collector
tag: 0.9.0
presets:
logsCollection:
enabled: true
# enables the k8sattributesprocessor and adds it to the traces, metrics, and logs pipelines
kubernetesAttributes:
enabled: true
extractAllPodLabels: true
extractAllPodAnnotations: true
command:
name: dynatrace-otel-collector
extraEnvs:
- name: DT_API_TOKEN
valueFrom:
secretKeyRef:
name: dynatrace-otelcol-dt-api-credentials
key: DT_API_TOKEN
- name: DT_ENDPOINT
valueFrom:
secretKeyRef:
name: dynatrace-otelcol-dt-api-credentials
key: DT_ENDPOINT
resources:
limits:
memory: 512Mi
config:
receivers:
jaeger: null
prometheus: null
zipkin: null
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
endpoint: ${env:MY_POD_IP}:4318
# Configuration to ingest log file
# Uncomment to use when running locally
# filelog:
# include: [ 'c:\someDir\traveladvisor\*.log' ]
processors:
transform:
metric_statements:
- context: metric
statements:
# Get count from the histogram. The new metric name will be <histogram_name>_count
- extract_count_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM
# Get sum from the histogram. The new metric name will be <histogram_name>_sum
- extract_sum_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM
- context: datapoint
statements:
# convert the <histogram_name>_sum metrics to gauges.
- convert_sum_to_gauge() where IsMatch(metric.name, ".*_sum")
filter:
error_mode: ignore
metrics:
metric:
- 'type == METRIC_DATA_TYPE_HISTOGRAM'
- 'type == METRIC_DATA_TYPE_SUMMARY'
cumulativetodelta:
# Configuration to scrape weaviate metrics
# Uncomment to use when running locally
# prometheus:
# config:
# scrape_configs:
# - job_name: 'weaviate'
# scrape_interval: 10s
# static_configs:
# - targets: ['localhost:2112']
exporters:
otlphttp:
endpoint: "${env:DT_ENDPOINT}/api/v2/otlp"
headers:
Authorization: "Api-Token ${env:DT_API_TOKEN}"
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [otlphttp]
logs:
receivers: [otlp]
# receivers: [otlp, filelog] # Use when running locally
processors: []
exporters: [otlphttp]
metrics:
receivers: [otlp]
# receivers: [otlp, prometheus] # Use when running locally
processors: [transform, filter, cumulativetodelta]
exporters: [otlphttp]