ApplicationInsights-Java icon indicating copy to clipboard operation
ApplicationInsights-Java copied to clipboard

OpenTelemetry support for MQTT pub/sub with Application Insights Java agent

Open ralarcon opened this issue 2 months ago • 1 comments

Is your feature request related to a problem? Please describe. We need to track and correlate telemetry data across a distributed system that spans both Azure-hosted micro-services and on-premises components which some of those use an MQTT broker for pub/sub operations.

Actually we need to be able to correlate telemetry between Azure hosted micro-services (in AKS) which publish data to a on-premises MQTT broker; There are a subscriber on-premises which handles the published messages and implement different actions, which finally end up using other Azure Services (Event Hubs, Cosmos Db...). Our need is to be able to track request started in Azure, with the on-premises actions, and back with the Azure requests.

Describe the solution you would like Be able to automatically correlate the request originated from the AKS hosted micro-services and on-premises components which already use the Application Insights Java agent among all the stack.

Describe alternatives you have considered Use new MQTT 5.0 user properties to propagate the operation_id in pub/sub operations, but it requires to introduce custom code where we are already using the Application Insights Java agent.

Additional context We use Java across all micro-services & components. We currently use Applications insights in both Azure hosted micro-services and on-premises micro-services.

For MQTT pub/sub operations we currently use HiveMQ client and EMQX broker:

EMQX broker can even propagate the operation_id automatically if it is populated to be used within their metrics: https://www.emqx.io/docs/en/latest/observability/open-telemetry/traces.html

ralarcon avatar Apr 05 '24 08:04 ralarcon