-
Notifications
You must be signed in to change notification settings - Fork 6
/
statsd.yaml
48 lines (45 loc) · 1.47 KB
/
statsd.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
receivers:
statsd:
aggregation_interval: 60s
endpoint: 0.0.0.0:8125
timer_histogram_mapping:
- statsd_type: "histogram"
observer_type: "histogram"
histogram:
# max size for the auto-scaling exponential histgram OTLP metric
max_size: 100
- statsd_type: "timing"
observer_type: "histogram"
histogram:
max_size: 100
- statsd_type: "distribution"
observer_type: "histogram"
histogram:
max_size: 100
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
# convert the <histogram_name>_sum metrics to gauges.
- convert_sum_to_gauge() where IsMatch(name, ".*_sum")
filter:
metrics:
metric:
# Drop metrics of type histogram. The _count and _sum metrics will still be exported.
- type == METRIC_DATA_TYPE_HISTOGRAM
exporters:
otlphttp:
endpoint: ${env:DT_ENDPOINT}
headers:
Authorization: "Api-Token ${env:DT_API_TOKEN}"
service:
pipelines:
metrics:
receivers: [statsd]
processors: [transform,filter]
exporters: [otlphttp]