You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message routing allows you to query on the message properties and message body as well as device twin tags and device twin properties. If the message body isn't in JSON format, message routing can still route the message, but queries can't be applied to the message body. Queries are described as Boolean expressions where, if true, the query succeeds and routes all the incoming data; otherwise, the query fails and the incoming data isn't routed. If the expression evaluates to a null or undefined value, it's treated as a Boolean false value, and generates an error in the IoT Hub [routes resource logs](monitor-iot-hub-reference.md#routes). The query syntax must be correct for the route to be saved and evaluated.
19
+
Message routing allows you to query on the message properties and message body as well as device twin tags and device twin properties. If the message body isn't in JSON format, message routing can still route the message, but queries can't be applied to the message body. Queries are described as Boolean expressions where, if true, the query succeeds and routes all the incoming data; otherwise, the query fails and the incoming data isn't routed. If the expression evaluates to a null or undefined value, it's treated as a Boolean false value, and generates an error in the IoT Hub [routes resource logs](monitor-iot-hub-reference.md#routes-category). The query syntax must be correct for the route to be saved and evaluated.
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-device-streams-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ az iot hub devicestream show --name <YourIoTHubName>
117
117
118
118
## Troubleshoot via Device Streams resource logs
119
119
120
-
You can set up Azure Monitor to collect the [resource logs for device streams](monitor-iot-hub-reference.md#device-streams-preview) emitted by your IoT Hub. This can be very helpful in troubleshooting scenarios.
120
+
You can set up Azure Monitor to collect the [resource logs for device streams](monitor-iot-hub-reference.md#device-streams-category-preview) emitted by your IoT Hub. This can be very helpful in troubleshooting scenarios.
121
121
122
122
Follow the steps below to create a diagnostics setting to send device streams logs for your IoT Hub to Azure Monitor Logs:
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-distributed-tracing.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ To support wider adoption for distributed tracing, Microsoft is contributing to
68
68
1. The SDK adds a `tracestate` value to the message property, which contains the time stamp for message creation.
69
69
1. The IoT device sends the message to IoT Hub.
70
70
1. The message arrives at the IoT Hub gateway.
71
-
1. IoT Hub looks for the `tracestate` value in the message properties and checks whether it's in the correct format. If so, IoT Hub generates a globally unique `trace-id` value for the message and a `span-id` value for the "hop." IoT Hub records these values in the [IoT Hub distributed tracing logs](monitor-iot-hub-reference.md#distributed-tracing-preview) under the `DiagnosticIoTHubD2C` operation.
71
+
1. IoT Hub looks for the `tracestate` value in the message properties and checks whether it's in the correct format. If so, IoT Hub generates a globally unique `trace-id` value for the message and a `span-id` value for the "hop." IoT Hub records these values in the [IoT Hub distributed tracing logs](monitor-iot-hub-reference.md#distributed-tracing category-preview) under the `DiagnosticIoTHubD2C` operation.
72
72
1. When the message processing is finished, IoT Hub generates another `span-id` value and logs it, along with the existing `trace-id` value, under the `DiagnosticIoTHubIngress` operation.
73
73
1. If routing is enabled for the message, IoT Hub writes it to the custom endpoint. IoT Hub logs another `span-id` value with the same `trace-id` value under the `DiagnosticIoTHubEgress` category.
74
74
@@ -108,7 +108,7 @@ After the logging is turned on, IoT Hub records a log when a message that contai
108
108
- The IoT hub processes the message.
109
109
- The message is routed to custom endpoints. Routing must be enabled.
110
110
111
-
To learn more about these logs and their schemas, see [Monitor IoT Hub](monitor-iot-hub.md) and [Distributed tracing in IoT Hub resource logs](monitor-iot-hub-reference.md#distributed-tracing-preview).
111
+
To learn more about these logs and their schemas, see [Monitor IoT Hub](monitor-iot-hub.md) and [Distributed tracing in IoT Hub resource logs](monitor-iot-hub-reference.md#distributed-tracing-category-preview).
112
112
113
113
## Update sampling options
114
114
@@ -206,7 +206,7 @@ Here are a few example logs in Log Analytics:
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-troubleshoot-connectivity.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ Explore the following articles to learn more about monitoring device connection
58
58
59
59
IoT hub continuously emits resource logs for several categories of operations. To collect this log data, though, you need to create a diagnostic setting to route it to a destination where it can be analyzed or archived. One such destination is Azure Monitor Logs via a Log Analytics workspace ([see pricing](https://azure.microsoft.com/pricing/details/log-analytics/)), where you can analyze the data using Kusto queries.
60
60
61
-
The IoT Hub [resource logs connections category](monitor-iot-hub-reference.md#connections) emits operations and errors having to do with device connections. The following screenshot shows a diagnostic setting to route these logs to a Log Analytics workspace:
61
+
The IoT Hub [resource logs connections category](monitor-iot-hub-reference.md#connections-category) emits operations and errors having to do with device connections. The following screenshot shows a diagnostic setting to route these logs to a Log Analytics workspace:
62
62
63
63
:::image type="content" source="media/iot-hub-troubleshoot-connectivity/create-diagnostic-setting.png" alt-text="Recommended setting to send connectivity logs to Log Analytics workspace.":::
Copy file name to clipboardExpand all lines: articles/iot-hub/monitor-iot-hub.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ The information presented on the **Overview pane** is useful, but represents onl
50
50
51
51
## Monitor per-device disconnects with Event Grid
52
52
53
-
Azure Monitor provides a metric, *Connected devices*, that you can use to monitor the number of devices connected to your IoT Hub. This metric triggers an alert when the number of connected devices drops below a threshold value. Azure Monitor also emits events in the [connections category](monitor-iot-hub-reference.md#connections) that you can use to monitor device connects, disconnects, and connection errors. While these events might be sufficient for some scenarios, [Azure Event Grid](../event-grid/index.yml) provides a low-latency, per-device monitoring solution that you can use to track device connections for critical devices and infrastructure.
53
+
Azure Monitor provides a metric, *Connected devices*, that you can use to monitor the number of devices connected to your IoT Hub. This metric triggers an alert when the number of connected devices drops below a threshold value. Azure Monitor also emits events in the [connections category](monitor-iot-hub-reference.md#connections-category) that you can use to monitor device connects, disconnects, and connection errors. While these events might be sufficient for some scenarios, [Azure Event Grid](../event-grid/index.yml) provides a low-latency, per-device monitoring solution that you can use to track device connections for critical devices and infrastructure.
54
54
55
55
With Event Grid, you can subscribe to the IoT Hub [**DeviceConnected** and **DeviceDisconnected** events](iot-hub-event-grid.md#event-types) to trigger alerts and monitor device connection state. Event Grid provides a much lower event latency than Azure Monitor, so you can monitor on a per-device basis rather than for all connected devices. These factors make Event Grid the preferred method for monitoring connections for critical devices and infrastructure. We highly recommend using Event Grid to monitor device connections in production environments.
56
56
@@ -144,7 +144,7 @@ For common queries with IoT Hub, see [Sample Kusto queries](#sample-kusto-querie
144
144
145
145
Some operations in IoT Hub resource logs return an `sdkVersion` property in their `properties` object. For these operations, when a device or backend app is using one of the Azure IoT SDKs, this property contains information about the SDK being used, the SDK version, and the platform on which the SDK is running.
146
146
147
-
The following examples show the `sdkVersion` property emitted for a [`deviceConnect`](monitor-iot-hub-reference.md#connections) operation using:
147
+
The following examples show the `sdkVersion` property emitted for a [`deviceConnect`](monitor-iot-hub-reference.md#connections-category) operation using:
Copy file name to clipboardExpand all lines: includes/iot-hub-include-last-known-errors.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ ms.custom: include file
13
13
14
14
|Last Known Error|Description/when it occurs|Possible Mitigation|
15
15
|-----|-----|-----|
16
-
|Transient|A transient error has occurred and IoT Hub will retry the operation.|Observe [routes resource logs](../articles/iot-hub/monitor-iot-hub-reference.md#routes).|
17
-
|InternalError|An error occurred while delivering a message to an endpoint.|This is an internal exception but also observe the [routes resource logs](../articles/iot-hub/monitor-iot-hub-reference.md#routes).|
16
+
|Transient|A transient error has occurred and IoT Hub will retry the operation.|Observe [routes resource logs](../articles/iot-hub/monitor-iot-hub-reference.md#routes-category).|
17
+
|InternalError|An error occurred while delivering a message to an endpoint.|This is an internal exception but also observe the [routes resource logs](../articles/iot-hub/monitor-iot-hub-reference.md#routes-category).|
18
18
|Unauthorized|IoT Hub is not authorized to send messages to the specified endpoint.|Validate that the connection string is up to date for the endpoint. If it has changed, consider an update on your IoT Hub. If the endpoint uses managed identity, check that the IoT Hub principal has the required permissions on the target.|
19
19
|Throttled|IoT Hub is being throttled while writing messages into the endpoint.|Review the throttle limits for the affected endpoint. Modify configurations for the endpoint to scale up if needed.|
0 commit comments