-
Couldn't load subscription status.
- Fork 1k
improve and align activemq classic JMX metrics with semconv #14996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 19 commits
88ead64
684be1b
2822152
5a2569a
606f7b2
a7939d5
9378354
2bbd993
974fce3
aa88e69
53e8dee
0ebf5bd
c4126bf
9efbb68
413707f
2f38f92
f38757b
7b63be1
3b6bd3a
774d835
55841a4
4fc2dca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # ActiveMQ Metrics | ||
|
|
||
| Here is the list of metrics based on MBeans exposed by ActiveMQ. | ||
|
|
||
| For now, only ActiveMQ classic is supported. | ||
|
|
||
| | Metric Name | Type | Unit | Attributes | Description | | ||
| |-------------------------------------------|---------------|--------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------| | ||
| | activemq.producer.count | UpDownCounter | {producer} | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The number of producers attached to this destination | | ||
| | activemq.consumer.count | UpDownCounter | {consumer} | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The number of consumers subscribed to this destination | | ||
| | activemq.memory.destination.usage | UpDownCounter | By | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The amount of used memory by this destination | | ||
| | activemq.memory.destination.limit | UpDownCounter | By | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The amount of configured memory limit for this destination | | ||
| | activemq.temp.destination.utilization | gauge | 1 | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The percentage of non-persistent storage used by this destination | | ||
SylvainJuge marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | activemq.temp.destination.limit | UpDownCounter | By | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The amount of configured non-persistent storage limit | | ||
| | activemq.message.queue.size | UpDownCounter | {message} | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The current number of messages waiting to be consumed | | ||
| | activemq.message.expired | Counter | {message} | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The number of messages not delivered because they expired | | ||
| | activemq.message.enqueued | Counter | {message} | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The number of messages sent to this destination | | ||
| | activemq.message.dequeued | Counter | {message} | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The number of messages acknowledged and removed from this destination | | ||
| | activemq.message.enqueue.average_duration | Gauge | s | messaging.system, messaging.destination.name, activemq.broker.name, activemq.destination.type | The average time a message was held on this destination | | ||
| | activemq.connection.count | UpDownCounter | {connection} | messaging.system, activemq.broker.name | The number of active connections | | ||
| | activemq.memory.utilization | Gauge | 1 | messaging.system, activemq.broker.name | The percentage of broker memory used | | ||
SylvainJuge marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | activemq.memory.limit | UpDownCounter | By | messaging.system, activemq.broker.name | The amount of configured broker memory limit | | ||
| | activemq.store.utilization | Gauge | 1 | messaging.system, activemq.broker.name | The percentage of broker persistent storage used | | ||
| | activemq.store.limit | UpDownCounter | By | messaging.system, activemq.broker.name | The amount of configured broker persistent storage limit | | ||
| | activemq.temp.utilization | Gauge | 1 | messaging.system, activemq.broker.name | The percentage of broker non-persistent storage used | | ||
| | activemq.temp.limit | UpDownCounter | By | messaging.system, activemq.broker.name | The amount of configured broker non-persistent storage limit | | ||
|
|
||
| ## Attributes | ||
|
|
||
| - `messaging.system` is always set to `activemq` ([semconv](https://opentelemetry.io/docs/specs/semconv/registry/attributes/messaging/#messaging-system)) | ||
| - `messaging.destination.name` contains the destination.name ([semconv](https://opentelemetry.io/docs/specs/semconv/registry/attributes/messaging/#messaging-destination-name)) | ||
| - `activemq.broker.name` contains the name of the broker | ||
| - `activemq.destination.type` is set to `queue` for queues (point-to-point), `topic` for topics (multicast). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| --- | ||
| rules: | ||
|
|
||
| # Topic and Queues level metrics | ||
| - bean: org.apache.activemq:type=Broker,brokerName=*,destinationType=*,destinationName=* | ||
| metricAttribute: | ||
| messaging.destination.name: param(destinationName) | ||
| messaging.system: const(activemq) | ||
| # 'topic' or 'queue' | ||
| activemq.destination.type: lowercase(param(destinationType)) | ||
SylvainJuge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| activemq.broker.name: param(brokerName) | ||
| prefix: activemq. | ||
| mapping: | ||
| # activemq.producer.count | ||
SylvainJuge marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ProducerCount: | ||
| metric: producer.count | ||
| unit: "{producer}" | ||
| type: updowncounter | ||
| desc: The number of producers attached to this destination | ||
| # activemq.consumer.count | ||
| ConsumerCount: | ||
| metric: consumer.count | ||
| unit: "{consumer}" | ||
| type: updowncounter | ||
| desc: The number of consumers subscribed to this destination | ||
| # activemq.memory.destination.usage | ||
| MemoryUsageByteCount: | ||
| metric: memory.destination.usage | ||
| unit: By | ||
| type: updowncounter | ||
| desc: The amount of used memory by this destination | ||
| # activemq.memory.destination.limit | ||
| MemoryLimit: | ||
| metric: memory.destination.limit | ||
| unit: By | ||
| type: updowncounter | ||
| desc: The amount of configured memory limit for this destination | ||
| # activemq.temp.destination.utilization | ||
| TempUsagePercentUsage: | ||
| metric: temp.destination.utilization | ||
| unit: "1" | ||
| type: gauge | ||
| desc: The percentage of non-persistent storage used by this destination | ||
| # activemq.temp.destination.limit | ||
| TempUsageLimit: | ||
| metric: temp.destination.limit | ||
| unit: By | ||
| type: updowncounter | ||
| desc: The amount of configured non-persistent storage limit for this destination | ||
| # activemq.message.queue.size | ||
| QueueSize: | ||
| metric: message.queue.size | ||
| unit: "{message}" | ||
| type: updowncounter | ||
| desc: The current number of messages waiting to be consumed | ||
| # activemq.message.expired | ||
| ExpiredCount: | ||
| metric: message.expired | ||
| unit: "{message}" | ||
| type: counter | ||
| desc: The number of messages not delivered because they expired | ||
| # activemq.message.enqueued | ||
| EnqueueCount: | ||
| metric: message.enqueued | ||
| unit: "{message}" | ||
| type: counter | ||
| desc: The number of messages sent to this destination | ||
| # activemq.message.dequeued | ||
| DequeueCount: | ||
| metric: message.dequeued | ||
| unit: "{message}" | ||
| type: counter | ||
| desc: The number of messages acknowledged and removed from this destination | ||
| # activemq.message.enqueue.average_duration | ||
| AverageEnqueueTime: | ||
| metric: message.enqueue.average_duration | ||
| sourceUnit: ms | ||
| unit: s | ||
| type: gauge | ||
| desc: The average time a message was held on this destination | ||
|
|
||
| # Broker-level metrics | ||
| - bean: org.apache.activemq:type=Broker,brokerName=* | ||
| metricAttribute: | ||
| messaging.system: const(activemq) | ||
| activemq.broker.name: param(brokerName) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or even messaging.brooker.name so it can be reused. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is messaging.broker.name a part of semconv? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not currently but it could be added. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In order to generalize From experience, it usually takes a while as name-related discussions always take time to settle, I don't think we should make this PR depend on it. We can always iterate on it later and change that once a stable semconv attribute is available. |
||
| prefix: activemq. | ||
| mapping: | ||
| # activemq.connection.count | ||
| CurrentConnectionsCount: | ||
| metric: connection.count | ||
| type: updowncounter | ||
| unit: "{connection}" | ||
| desc: The number of active connections | ||
| # activemq.memory.utilization | ||
| MemoryPercentUsage: | ||
| metric: memory.utilization | ||
| type: gauge | ||
| sourceUnit: "%" | ||
| unit: "1" | ||
| desc: The percentage of broker memory used | ||
| # activemq.memory.limit | ||
| MemoryLimit: | ||
| metric: memory.limit | ||
| type: updowncounter | ||
| unit: By | ||
| desc: The amount of configured broker memory limit | ||
| # activemq.store.utilization | ||
| StorePercentUsage: | ||
| metric: store.utilization | ||
| type: gauge | ||
| sourceUnit: "%" | ||
| unit: "1" | ||
| desc: The percentage of broker persistent storage used | ||
| # activemq.store.limit | ||
| StoreLimit: | ||
| metric: store.limit | ||
| type: updowncounter | ||
| unit: By | ||
| desc: The amount of configured broker persistent storage limit | ||
| # activemq.temp.utilization | ||
| TempPercentUsage: | ||
| metric: temp.utilization | ||
| type: gauge | ||
| sourceUnit: "%" | ||
| unit: "1" | ||
| desc: The percentage of broker non-persistent storage used | ||
| # activemq.temp.limit | ||
| TempLimit: | ||
| metric: temp.limit | ||
| type: updowncounter | ||
| unit: By | ||
| desc: The amount of configured broker non-persistent storage limit | ||
Uh oh!
There was an error while loading. Please reload this page.