Critical Time/Retries/Processing Time with Open Telemetry

Hello,

I have been following this Open Telemetry sample in NSB 8 with .NET 6:

The sample exports these metrics into app insights:

  • nservicebus.messaging.successes
  • nservicebus.messaging.failures
  • nservicebus.messaging.fetches

Is there a way to also export the the Critical time, Processing Time and Retries via Open Telemetry?

Thanks for your time.

Hey @Sean-R

The Critical time, Processing time and Retries are currently not exposed as Open Telemetry metrics yet. They are still available via the NServiceBus.Metrics package if you’d like to export those to a 3rd party monitoring tool. We’re looking into adding more OpenTelemetry metrics over time but I can’t give you any estimate about the availability at this point.

Have you looked at the information available on the OpenTelemetry traces already? The traces can provide further information about the success/failure and processing time of messages.

Thanks. I will use the metrics package.

Hi @Tim!

Any more updates on this 7 months later? We are very interested in getting Critical time and Processing time as metrics pushed into Prometheus through OpenTelemetry.

A little more about our use case and why it is important to us… Many of our jobs are bursts of activity that are usually quick to process, so using KEDA to scale based on an Azure Service Bus queue length does not really get us where we need to be. We are thinking we’d rather have KEDA scale up our services containing the handlers based on if processing time is taking longer than expected.

These articles explain how to get Critical time and Processing time as metrics, but have “notes” at the top of the article that seem to be steering people away from NServiceBus.Metrics. Is this still the direction you are heading?
Report metrics to Azure Monitor Application Insights • Metrics Samples • Particular Docs
Capture and visualize metrics using Prometheus and Grafana • Metrics Samples • Particular Docs

Hey @BBrandtTX

Unfortunately, there haven’t been any changes to the currently exposed OpenTelemetry metrics in the meantime. While we have already tracked this internally, I realized that there doesn’t seem to be a public issue corresponding to this improvement yet, so I just raised this issue in the NServiceBus repository to create better visibility: Add processing times to OpenTelemetry metrics · Issue #6868 · Particular/NServiceBus · GitHub. Feel free to chime in on the issue and provide additional context or suggestions based on your needs.

These articles explain how to get Critical time and Processing time as metrics, but have “notes” at the top of the article that seem to be steering people away from NServiceBus.Metrics. Is this still the direction you are heading?

NServiceBus.Metrics remains fully supported so we’re not trying steer people in either direction. We mostly wanted to provide more awareness of our newer OpenTelemetry integration for users that already have OpenTelemetry capable monitoring infrastructure.