We have an Azure IoTHub instance and turned on the "Diagnostic Settings" with everything enabled. Additionally, all diagnostics should be archived into a Blob Storage. This works well for cd2twinoperations
, d2ctwinoperations
, fileuploadoperations
and a few others, however, not for Device Telemetry
. We have enabled this setting (see image):
I can see in the "Metrics" that telemetry messages where sent.
Why are no logs created for the Device Telemetry
category?
Edit:
Maybe it makes sense to also explain why we would need this. The usecase is to find the amount of telemetry messages sent per device. For fileupload operations we can just execute a query on the Analytics workspace
and find the number of operations. We could implement a custom solution (by subscribing to the Device Telemetry
messages and "count it by hand") but of course this is much more work than just querying the log analytics.
According to the documentation: "The device telemetry category tracks errors that occur at the IoT hub and are related to the telemetry pipeline. This category includes errors that occur when sending telemetry events (such as throttling) and receiving telemetry events (such as unauthorized reader)."
Unless there are errors, you wouldn't expect to see any telemetry diagnostics.
If you want to capture the telemetry the device is sending in a storage account, you need to set up a route to your storage account. See Send device data to Azure Storage to get started.
Edit following your comment about your usecase:
I'm able to see metrics such as d2c.telemetry.ingress.success
and devices.totalDevices
in the exported metrics as follows: