Path: blob/main/component/prometheus/exporter/statsd/testdata/mapTest.yaml
4096 views
defaults:1observer_type: histogram2histogram_options:3buckets: [.005, .01, .025, .05, .1, .25, .5, 1, 2.5 ]4native_histogram_bucket_factor: 1.15native_histogram_max_buckets: 2566summary_options:7quantiles:8- quantile: 0.999error: 0.00110- quantile: 0.9511error: 0.0112- quantile: 0.913error: 0.0514- quantile: 0.515error: 0.00516max_age: 5m17age_buckets: 218buf_cap: 100019match_type: glob20glob_disable_ordering: false21ttl: 0 # metrics do not expire22mappings:23# This will be a histogram using the buckets set in `defaults`.24- match: "test.timing.*.*.*"25name: "my_timer"26labels:27provider: "$2"28outcome: "$3"29job: "${1}_server"30# This will be a summary using the summary_options set in `defaults`31- match: "other.distribution.*.*.*"32observer_type: summary33name: "other_distribution"34labels:35provider: "$2"36outcome: "$3"37job: "${1}_server_other"38- match: "test\\.(\\w+)\\.(\\w+)\\.counter"39match_type: regex40name: "${2}_total"41labels:42provider: "$1"43- match: "(.*)\\.(.*)--(.*)\\.status\\.(.*)\\.count"44match_type: regex45name: "request_total"46labels:47hostname: "$1"48exec: "$2"49protocol: "$3"50code: "$4"51- match: "test\\.(\\w+)\\.(\\w+)\\.counter"52match_type: regex53name: "${2}_total"54labels:55provider: "$1"56- match: ".+"57match_type: regex58name: "$0"59labels:60statsd_metric_name: "$0"61- match: "http.request.*"62help: "Total number of http requests"63name: "http_requests_total"64labels:65code: "$1"66- match: "test.timing.*.*.*"67observer_type: summary68name: "my_timer"69labels:70provider: "$2"71outcome: "$3"72job: "${1}_server"73summary_options:74quantiles:75- quantile: 0.9976error: 0.00177- quantile: 0.9578error: 0.0179- quantile: 0.980error: 0.0581- quantile: 0.582error: 0.00583max_age: 30s84age_buckets: 385buf_cap: 100086- match: "test.timing.*.*.*"87observer_type: histogram88histogram_options:89buckets: [ 0.01, 0.025, 0.05, 0.1 ]90native_histogram_bucket_factor: 1.191native_histogram_max_buckets: 25692name: "my_timer"93labels:94provider: "$2"95outcome: "$3"96job: "${1}_server"97# This metric would match as normal.98- match: "test.timing.*.*.*"99name: "my_timer"100labels:101provider: "$2"102outcome: "$3"103job: "${1}_server"104# Any metric not matched will be dropped because "." matches all metrics.105- match: "."106match_type: regex107action: drop108name: "dropped"109110