File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
integrationTest/java/io/opentelemetry/contrib/jmxmetrics/target_systems
main/resources/target-systems Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ These metrics are sourced from Kafka's exposed Yammer metrics for each instance:
42
42
* Attributes: ` type `
43
43
* Instrument Type: DoubleValueObserver
44
44
45
+ * Name: ` kafka.request.time.avg `
46
+ * Description: The average time the broker has taken to service requests
47
+ * Unit: ` ms `
48
+ * Attributes: ` type `
49
+ * Instrument Type: DoubleValueObserver
50
+
45
51
* Name: ` kafka.network.io `
46
52
* Description: The bytes received or sent by the broker
47
53
* Unit: ` by `
Original file line number Diff line number Diff line change @@ -126,6 +126,15 @@ List<Consumer<Metric>> kafkaBrokerAssertions() {
126
126
attrs -> attrs .containsOnly (entry ("type" , "produce" )),
127
127
attrs -> attrs .containsOnly (entry ("type" , "fetchfollower" )),
128
128
attrs -> attrs .containsOnly (entry ("type" , "fetchconsumer" ))),
129
+ metric ->
130
+ assertGaugeWithAttributes (
131
+ metric ,
132
+ "kafka.request.time.avg" ,
133
+ "The average time the broker has taken to service requests" ,
134
+ "ms" ,
135
+ attrs -> attrs .containsOnly (entry ("type" , "produce" )),
136
+ attrs -> attrs .containsOnly (entry ("type" , "fetchfollower" )),
137
+ attrs -> attrs .containsOnly (entry ("type" , "fetchconsumer" ))),
129
138
metric ->
130
139
assertGauge (
131
140
metric ,
Original file line number Diff line number Diff line change @@ -86,8 +86,14 @@ otel.instrument(requestTime,
86
86
" type" : { mbean -> mbean. name(). getKeyProperty(" request" ). toLowerCase() },
87
87
],
88
88
" 99thPercentile" , otel. &doubleValueCallback)
89
-
90
-
89
+ otel. instrument(requestTime,
90
+ " kafka.request.time.avg" ,
91
+ " The average time the broker has taken to service requests" ,
92
+ " ms" ,
93
+ [
94
+ " type" : { mbean -> mbean. name(). getKeyProperty(" request" ). toLowerCase() },
95
+ ],
96
+ " Mean" , otel. &doubleValueCallback)
91
97
92
98
def network = otel. mbeans([" kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec" ,
93
99
" kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec" ])
You can’t perform that action at this time.
0 commit comments