Skip to content

Commit 7e46def

Browse files
committed
Added rules for capturing Apache Camel metrics exposed by jmx MBean
1 parent da20d8b commit 7e46def

File tree

4 files changed

+283
-0
lines changed

4 files changed

+283
-0
lines changed

instrumentation/jmx-metrics/javaagent/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ $ java -javaagent:path/to/opentelemetry-javaagent.jar \
2626
No targets are enabled by default. The supported target environments are listed below.
2727

2828
- [activemq](activemq.md)
29+
- [camel](camel.md)
2930
- [jetty](jetty.md)
3031
- [kafka-broker](kafka-broker.md)
3132
- [tomcat](tomcat.md)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Camel Metrics
2+
3+
Here is the list of metrics based on MBeans exposed by Camel.
4+
5+
| Metric Name | Type | Attributes | Description |
6+
|--------------------------------------------------------|---------|----------------------------------------|--------------------------------------------------------------------------------------|
7+
| org.apache.camel.context.exchanges.completed | Counter | context, camelVersion | Exchanges Completed grouped by Camel Context |
8+
| org.apache.camel.context.exchanges.failed | Counter | context, camelVersion | Exchanges Failed grouped by Camel Context |
9+
| org.apache.camel.context.exchanges.inflight | Counter | context, camelVersion | Exchanges Inflight grouped by Camel Context |
10+
| org.apache.camel.context.exchanges.total | Counter | context, camelVersion | Exchanges Total grouped by Camel Context |
11+
| org.apache.camel.context.failures.handled | Counter | context, camelVersion | Failures Handled grouped by Camel Context |
12+
| org.apache.camel.context.external.redeliveries.count | Counter | context, camelVersion | External Redeliveries grouped by Camel Context |
13+
| org.apache.camel.context.max.processing.time | Gauge | context, camelVersion | Maximum Processing Time grouped by Camel Context |
14+
| org.apache.camel.context.mean.processing.time | Gauge | context, camelVersion | Mean Processing Time grouped by Camel Context |
15+
| org.apache.camel.context.min.processing.time | Gauge | context, camelVersion | Min Processing Time grouped by Camel Context |
16+
| org.apache.camel.context.last.processing.time | Gauge | context, camelVersion | Last Processing Time grouped by Camel Context |
17+
| org.apache.camel.context.delta.processing.time | Gauge | context, camelVersion | Delta Processing Time grouped by Camel Context |
18+
| org.apache.camel.context.total.processing.time | Gauge | context, camelVersion | Total Processing Time grouped by Camel Context |
19+
| org.apache.camel.context.redeliveries.count | Counter | context, camelVersion | Redeliveries count grouped by Camel Context |
20+
| org.apache.camel.context.inflight.exchanges | Gauge | context, camelVersion | Inflight Exchanges grouped by Camel Context |
21+
| org.apache.camel.route.exchanges.completed | Counter | context, route | Exchanges Completed grouped by Camel Route |
22+
| org.apache.camel.route.exchanges.failed | Counter | context, route | Exchanges Failed grouped by Camel Route |
23+
| org.apache.camel.route.exchanges.inflight | Counter | context, route | Exchanges Inflight grouped by Camel Route |
24+
| org.apache.camel.route.exchanges.total | Counter | context, route | Exchanges Total grouped by Camel Route |
25+
| org.apache.camel.route.failures.handled | Counter | context, route | Failures Handled grouped by Camel Route |
26+
| org.apache.camel.route.external.redeliveries.count | Counter | context, route | External Redeliveries grouped by Camel Route |
27+
| org.apache.camel.route.max.processing.time | Gauge | context, route | Maximum Processing Time grouped by Camel Route |
28+
| org.apache.camel.route.mean.processing.time | Gauge | context, route | Mean Processing Time grouped by Camel Route |
29+
| org.apache.camel.route.min.processing.time | Gauge | context, route | Min Processing Time grouped by Camel Route |
30+
| org.apache.camel.route.last.processing.time | Gauge | context, route | Last Processing Time grouped by Camel Route |
31+
| org.apache.camel.route.delta.processing.time | Gauge | context, route | Delta Processing Time grouped by Camel Route |
32+
| org.apache.camel.route.total.processing.time | Gauge | context, route | Total Processing Time grouped by Camel Route |
33+
| org.apache.camel.route.redeliveries.count | Counter | context, route | Redeliveries count grouped by Camel Route |
34+
| org.apache.camel.route.inflight.exchanges | Gauge | context, route | Inflight Exchanges grouped by Camel Route |
35+
| org.apache.camel.processor.exchanges.completed | Counter | context, route, processor, destination | Exchanges Completed grouped by Camel Processor |
36+
| org.apache.camel.processor.exchanges.failed | Counter | context, route, processor, destination | Exchanges Failed grouped by Camel Processor |
37+
| org.apache.camel.processor.exchanges.inflight | Counter | context, route, processor, destination | Exchanges Inflight grouped by Camel Processor |
38+
| org.apache.camel.processor.exchanges.total | Counter | context, route, processor, destination | Exchanges Total grouped by Camel Processor |
39+
| org.apache.camel.processor.failures.handled | Counter | context, route, processor, destination | Failures Handled grouped by Camel Processor |
40+
| org.apache.camel.processor.external.redeliveries.count | Counter | context, route, processor, destination | External Redeliveries grouped by Camel Processor |
41+
| org.apache.camel.processor.max.processing.time | Gauge | context, route, processor, destination | Maximum Processing Time grouped by Camel Processor |
42+
| org.apache.camel.processor.mean.processing.time | Gauge | context, route, processor, destination | Mean Processing Time grouped by Camel Processor |
43+
| org.apache.camel.processor.min.processing.time | Gauge | context, route, processor, destination | Min Processing Time grouped by Camel Processor |
44+
| org.apache.camel.processor.last.processing.time | Gauge | context, route, processor, destination | Last Processing Time grouped by Camel Processor |
45+
| org.apache.camel.processor.delta.processing.time | Gauge | context, route, processor, destination | Delta Processing Time grouped by Camel Processor |
46+
| org.apache.camel.processor.total.processing.time | Gauge | context, route, processor, destination | Total Processing Time grouped by Camel Processor |
47+
| org.apache.camel.processor.redeliveries.count | Counter | context, route, processor, destination | Redeliveries count grouped by Camel Processor |
48+
| org.apache.camel.processor.inflight.exchanges | Gauge | context, route, processor, destination | Inflight Exchanges grouped by Camel Processor |
49+
| org.apache.camel.threadpool.active.count | Gauge | context, route | The approximate number of threads that are actively executing tasks. |
50+
| org.apache.camel.threadpool.completed.task.count | Counter | context, route | The approximate total number of tasks that have completed execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation, but one that does not ever decrease across successive calls. |
51+
| org.apache.camel.threadpool.pool.size | Gauge | context, route | The current number of threads in the pool. |
52+
| org.apache.camel.threadpool.largest.pool.size | Gauge | context, route | The largest number of threads that have ever simultaneously been in the pool. |
53+
| org.apache.camel.threadpool.task.count | Gauge | context, route | The approximate total number of tasks that have ever been scheduled for execution. |
54+
| org.apache.camel.threadpool.task.queue.size | Gauge | context, route | The number of Tasks in the Task Queue |
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
---
2+
rules:
3+
- bean: org.apache.camel:context=*,type=context,name=*
4+
prefix: org.apache.camel.context.
5+
metricAttribute:
6+
context: param(context)
7+
camelVersion: beanattr(CamelVersion)
8+
mapping:
9+
ExchangesCompleted:
10+
metric: exchanges.completed
11+
type: counter
12+
desc: Exchanges Completed grouped by Camel Context
13+
ExchangesFailed:
14+
metric: exchanges.failed
15+
type: counter
16+
desc: Exchanges Failed grouped by Camel Context
17+
ExchangesInflight:
18+
metric: exchanges.inflight
19+
type: counter
20+
desc: Exchanges Inflight grouped by Camel Context
21+
ExchangesTotal:
22+
metric: exchanges.total
23+
type: counter
24+
desc: Exchanges Total grouped by Camel Context
25+
FailuresHandled:
26+
metric: failures.handled
27+
type: counter
28+
desc: Failures Handled grouped by Camel Context
29+
ExternalRedeliveries:
30+
metric: external.redeliveries.count
31+
type: counter
32+
desc: External Redeliveries grouped by Camel Context
33+
MaxProcessingTime:
34+
metric: max.processing.time
35+
type: gauge
36+
desc: Maximum Processing Time grouped by Camel Context
37+
MeanProcessingTime:
38+
metric: mean.processing.time
39+
type: gauge
40+
desc: Mean Processing Time grouped by Camel Context
41+
MinProcessingTime:
42+
metric: min.processing.time
43+
type: gauge
44+
desc: Min Processing Time grouped by Camel Context
45+
LastProcessingTime:
46+
metric: last.processing.time
47+
type: gauge
48+
desc: Last Processing Time grouped by Camel Context
49+
DeltaProcessingTime:
50+
metric: delta.processing.time
51+
type: gauge
52+
desc: Delta Processing Time grouped by Camel Context
53+
TotalProcessingTime:
54+
metric: total.processing.time
55+
type: gauge
56+
desc: Total Processing Time grouped by Camel Context
57+
Redeliveries:
58+
metric: redeliveries.count
59+
type: counter
60+
desc: Redeliveries grouped by Camel Context
61+
InflightExchanges:
62+
metric: inflight.exchanges
63+
type: gauge
64+
desc: Inflight Exchanges grouped by Camel Context
65+
66+
# Route Level metrics
67+
68+
- bean: org.apache.camel:context=*,type=routes,name=*
69+
prefix: org.apache.camel.route.
70+
metricAttribute:
71+
route: beanattr(RouteId)
72+
context: param(context)
73+
mapping:
74+
ExchangesCompleted:
75+
metric: exchanges.completed
76+
type: counter
77+
desc: Exchanges Completed grouped by Camel Route
78+
ExchangesFailed:
79+
metric: exchanges.failed
80+
type: counter
81+
desc: Exchanges Completed grouped by Camel Route
82+
ExchangesInflight:
83+
metric: exchanges.inflight
84+
type: counter
85+
desc: Exchanges Inflight grouped by Camel Route
86+
ExchangesTotal:
87+
metric: exchanges.total
88+
type: counter
89+
desc: Exchanges Total grouped by Camel Route
90+
FailuresHandled:
91+
metric: failures.handled
92+
type: counter
93+
desc: Failures Handled grouped by Camel Route
94+
ExternalRedeliveries:
95+
metric: external.redeliveries.count
96+
type: counter
97+
desc: External Redeliveries grouped by Camel Route
98+
MaxProcessingTime:
99+
metric: max.processing.time
100+
type: gauge
101+
desc: Maximum Processing Time grouped by Camel Route
102+
MeanProcessingTime:
103+
metric: mean.processing.time
104+
type: gauge
105+
desc: Mean Processing Time grouped by Camel Route
106+
MinProcessingTime:
107+
metric: min.processing.time
108+
type: gauge
109+
desc: Min Processing Time grouped by Camel Route
110+
LastProcessingTime:
111+
metric: last.processing.time
112+
type: gauge
113+
desc: Last Processing Time grouped by Camel Route
114+
DeltaProcessingTime:
115+
metric: delta.processing.time
116+
type: gauge
117+
desc: Delta Processing Time grouped by Camel Route
118+
TotalProcessingTime:
119+
metric: total.processing.time
120+
type: gauge
121+
desc: Total Processing Time grouped by Camel Route
122+
Redeliveries:
123+
metric: redeliveries.count
124+
type: counter
125+
desc: Redeliveries grouped by Camel Route
126+
InflightExchanges:
127+
metric: inflight.exchanges
128+
type: gauge
129+
desc: Inflight Exchanges grouped by Camel Route
130+
131+
# Processor level Metrics
132+
133+
- bean: org.apache.camel:context=*,type=processors,name=*
134+
prefix: org.apache.camel.processor.
135+
metricAttribute:
136+
processor: beanattr(ProcessorId)
137+
route: beanattr(RouteId)
138+
context: param(context)
139+
destination: beanattr(Destination)
140+
mapping:
141+
ExchangesCompleted:
142+
metric: exchanges.completed
143+
type: counter
144+
desc: Exchanges Completed grouped by Camel Processor
145+
ExchangesFailed:
146+
metric: exchanges.failed
147+
type: counter
148+
desc: Exchanges Completed grouped by Camel Processor
149+
ExchangesInflight:
150+
metric: exchanges.inflight
151+
type: counter
152+
desc: Exchanges Inflight grouped by Camel Processor
153+
ExchangesTotal:
154+
metric: exchanges.total
155+
type: counter
156+
desc: Exchanges Total grouped by Camel Processor
157+
FailuresHandled:
158+
metric: failures.handled
159+
type: counter
160+
desc: Failures Handled grouped by Camel Processor
161+
ExternalRedeliveries:
162+
metric: external.redeliveries.count
163+
type: counter
164+
desc: External Redeliveries grouped by Camel Processor
165+
MaxProcessingTime:
166+
metric: max.processing.time
167+
type: gauge
168+
desc: Maximum Processing Time grouped by Camel Processor
169+
MeanProcessingTime:
170+
metric: mean.processing.time
171+
type: gauge
172+
desc: Mean Processing Time grouped by Camel Processor
173+
MinProcessingTime:
174+
metric: min.processing.time
175+
type: gauge
176+
desc: Min Processing Time grouped by Camel Processor
177+
LastProcessingTime:
178+
metric: last.processing.time
179+
type: gauge
180+
desc: Last Processing Time grouped by Camel Processor
181+
DeltaProcessingTime:
182+
metric: delta.processing.time
183+
type: gauge
184+
desc: Delta Processing Time grouped by Camel Processor
185+
TotalProcessingTime:
186+
metric: total.processing.time
187+
type: gauge
188+
desc: Total Processing Time grouped by Camel Processor
189+
Redeliveries:
190+
metric: redeliveries.count
191+
type: counter
192+
desc: Number of redeliveries grouped by Camel Processor
193+
InflightExchanges:
194+
metric: inflight.exchanges
195+
type: gauge
196+
desc: Inflight Exchanges grouped by Camel Processor
197+
198+
- bean: org.apache.camel:context=*,type=threadpools,name=*
199+
prefix: org.apache.camel.threadpool.
200+
metricAttribute:
201+
route: beanattr(RouteId)
202+
context: param(context)
203+
mapping:
204+
ActiveCount:
205+
metric: active.count
206+
type: gauge
207+
desc: The approximate number of threads that are actively executing tasks.
208+
CompletedTaskCount:
209+
metric: completed.task.count
210+
type: gauge
211+
desc: The approximate total number of tasks that have completed execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation, but one that does not ever decrease across successive calls.
212+
PoolSize:
213+
metric: pool.size
214+
type: gauge
215+
desc: The current number of threads in the pool.
216+
LargestPoolSize:
217+
metric: largest.pool.size
218+
type: gauge
219+
desc: The largest number of threads that have ever simultaneously been in the pool.
220+
TaskCount:
221+
metric: task.count
222+
type: counter
223+
desc: The approximate total number of tasks that have ever been scheduled for execution.
224+
TaskQueueSize:
225+
metric: task.queue.size
226+
type: gauge
227+
desc: The number of Tasks in the Task Queue

instrumentation/jmx-metrics/javaagent/src/test/java/io/opentelemetry/instrumentation/javaagent/jmx/JmxMetricInsightInstallerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class JmxMetricInsightInstallerTest {
2828
new HashSet<>(
2929
Arrays.asList(
3030
"activemq.yaml",
31+
"camel.yaml",
3132
"hadoop.yaml",
3233
"jetty.yaml",
3334
"kafka-broker.yaml",

0 commit comments

Comments
 (0)