File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
require 'fluent/test/driver/filter'
3
3
require 'fluent/plugin/filter_prometheus'
4
4
require_relative 'shared'
5
+ require 'json'
5
6
6
7
describe Fluent ::Plugin ::PrometheusFilter do
7
- let ( :tag ) { 'prometheus.test' }
8
+ let ( :tag ) { 'prometheus.test.additional.parts ' }
8
9
let ( :driver ) { Fluent ::Test ::Driver ::Filter . new ( Fluent ::Plugin ::PrometheusFilter ) . configure ( config ) }
9
10
let ( :registry ) { ::Prometheus ::Client . registry }
10
11
32
33
expect ( es . first ) . to eq ( message )
33
34
end
34
35
end
35
-
36
- it_behaves_like 'instruments record'
37
- end
38
36
end
Original file line number Diff line number Diff line change 83
83
key foo
84
84
<labels>
85
85
foo ${foo}
86
+ the_prefix ${tag_prefix[2]}
87
+ another_part ${tag_parts[0]}
86
88
</labels>
87
89
</metric>
88
90
<labels>
89
91
tag ${tag}
90
92
hostname ${hostname}
93
+ single_part ${tag_parts[1]}
94
+ the_suffix ${tag_suffix[2]}
91
95
</labels>
92
96
]
93
97
You can’t perform that action at this time.
0 commit comments