Skip to content

Commit 5937a3e

Browse files
Transactional session metrics (#7815)
* Update definitions.md * Update opentelemetry_metrics_core_[9,).partial.md (#7816) * Update definitions.md * Update opentelemetry_metrics_core_[9,).partial.md * Move note section into correct place * Update opentelemetry_metrics_core_[9,).partial.md * Update definitions.md --------- Co-authored-by: Daniel Marbach <[email protected]>
1 parent 31eb02c commit 5937a3e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

monitoring/metrics/definitions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,12 @@ This metric tracks the number of messages in the main input queue of the endpoin
8484

8585
> [!NOTE]
8686
> The queue length metric is measured centrally by the [ServiceControl Monitoring instance](/servicecontrol/monitoring-instances) for all transports except MSMQ, which uses a [custom plugin installed at the endpoint](/monitoring/metrics/msmq-queue-length.md). As a result, the NServiceBus.Metrics package does not contain a probe for this metric.
87+
88+
### Transactional Session metrics
89+
90+
There are metrics that measure various spects of the [transactional session operations](/nservicebus/transactional-session/#how-it-works):
91+
92+
- Commit duration - how long it took to commit the transaction and (optionally) dispatch the control message
93+
- Dispatch druation - how long it took to dispatch the control message
94+
- Attempts - how many times the mechanism attempted to process the control message for a given transaction
95+
- Transit time - how long it took between dispatching the control message and starting to process it again

nservicebus/operations/opentelemetry_metrics_core_[9,).partial.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Meters
22

3-
NServiceBus endpoints can be configured to expose metrics related to message processing. To capture meter information, add the `NServiceBus.Core.Pipeline.Incoming` meter source to the OpenTelemetry configuration:
3+
NServiceBus endpoints can be configured to expose metrics related to message processing. To capture meter information, add the appropriate meter source (e.g., `NServiceBus.Core.Pipeline.Incoming`) to the OpenTelemetry configuration:
44

55
> [!NOTE]
66
> The metric definitions published by NServiceBus are not yet finalized and could change in a minor release.
@@ -9,6 +9,8 @@ snippet: opentelemetry-enablemeters
99

1010
### Emitted meters
1111

12+
Meter source `NServiceBus.Core.Pipeline.Incoming`:
13+
1214
- [`nservicebus.messaging.successes`](/monitoring/metrics/definitions.md#metrics-captured-number-of-messages-successfully-processed) - Total number of messages processed successfully by the endpoint
1315
- [`nservicebus.messaging.fetches`](/monitoring/metrics/definitions.md#metrics-captured-number-of-messages-pulled-from-queue) - Total number of messages fetched from the queue by the endpoint
1416
- [`nservicebus.messaging.failures`](/monitoring/metrics/definitions.md#metrics-captured-number-of-message-processing-failures) - Total number of messages processed unsuccessfully by the endpoint
@@ -19,4 +21,11 @@ snippet: opentelemetry-enablemeters
1921
- [`nservicebus.recoverability.delayed`](/monitoring/metrics/definitions.md#metrics-captured-delayed-retries) - Total number of delayed retries requested
2022
- [`nservicebus.recoverability.error`](/monitoring/metrics/definitions.md#metrics-captured-moved-to-error-queue) - Total number of messages sent to the error queue
2123

24+
Meter source `NServiceBus.TransactionalSession`:
25+
26+
- [`nservicebus.transactional_session.commit.duration`](/monitoring/metrics/definitions.md#metrics-captured-transactional-session-metrics) - The time the endpoint takes to commit the session in the Transactional Session
27+
- [`nservicebus.transactional_session.dispatch.duration`](/monitoring/metrics/definitions.md#metrics-captured-transactional-session-metrics) - The time the endpoint takes to dispatch the control message in the Transactional Session
28+
- [`nservicebus.transactional_session.control_message.attempts`](/monitoring/metrics/definitions.md#metrics-captured-transactional-session-metrics) - Total number of attempts to process the control message in the Transactional Session
29+
- [`nservicebus.transactional_session.control_message.transit_time`](/monitoring/metrics/definitions.md#metrics-captured-transactional-session-metrics) - The time between dispatching the control message and starting to process it in the Transactional Session
30+
2231
See the [OpenTelemetry samples](/samples/open-telemetry/) for instructions on how to send metric information to different tools.

0 commit comments

Comments
 (0)