1 min read
Most IoT solutions, including our Azure IoT reference architecture, use several different services. An IoT message, starting from the device, could flow through a dozen or more services before it is stored or visualized. If something goes wrong in this flow, it can be very challenging to pinpoint the issue. How do you know where the message is dropped? For example, you have an IoT solution that uses five different Azure services and 1,500 active devices. Each device sends ten device-to-cloud messages/second (for a total of 15,000 messages/second), but you notice that your web app sees only 10,000 messages/second. Where is the issue? How do you find the culprit?
To completely understand the flow of messages through IoT Hub, you must trace each message’s path using unique identifiers. This process is called distributed tracing. Today, we’re announcing distributed tracing support for IoT Hub, in public preview.
Get started with distributed tracing support for IoT Hub
With this feature, you can:
- Precisely monitor the flow of each message through IoT Hub using trace context. This trace context includes correlation IDs that allow you to correlate events from one component with events from another component. It can be applied for a subset or all IoT device messages using device twin.
- Automatically log the trace context to Azure Monitor diagnostic logs.
- Measure and understand message flow and latency from devices to IoT Hub and routing endpoints.
- Start considering how you want to implement distributed tracing for the non-Azure services in your IoT solution.
In the public preview, the feature will be available for IoT Hubs created in select regions.
To get started:
- Follow our documentation, “Trace Azure IoT device-to-cloud messages with distributed tracing (preview).”
- Check out the C sample code.
- Give us feedback via UserVoice.