Skip to content

Commit c7e3829

Browse files
Add Observability Features
1 parent 039c803 commit c7e3829

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

llms.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27905,16 +27905,19 @@ If you are new to XCM replay or dry-run, see [Replay and Dry Run XCMs Using Chop
2790527905

2790627906
### What is `SetTopic`?
2790727907

27908-
When sending XCMs using `limited_reserve_transfer_assets` or other extrinsics from the `PolkadotXcm` pallet, two key observability features enable developers to trace and correlate messages across chains:
27908+
When sending XCMs using `limited_reserve_transfer_assets` or other extrinsics from the `PolkadotXcm` pallet, a `SetTopic` instruction is automatically appended to the end of the message if one is not already present.
2790927909

27910-
- **[`PolkadotXcm.Sent`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pallet/enum.Event.html#variant.Sent){target=\_blank} event** emitted on the origin chain when an XCM is sent.
27911-
- The guarantee that the **`message_id` in the `PolkadotXcm.Sent` event matches the `id` in the [`MessageQueue.Processed`](https://paritytech.github.io/polkadot-sdk/master/pallet_message_queue/pallet/enum.Event.html#variant.Processed){target=\_blank} event** on the destination chain, enabling reliable cross-chain correlation.
2791227910
- **[`SetTopic([u8; 32])`](https://github.com/polkadot-fellows/xcm-format#settopic){target=\_blank}** is an XCM instruction that sets a 32-byte topic register inside the message.
27913-
- This topic acts as a **logical identifier** (`message_id`) for the XCM, allowing you to group and trace related messages across chains.
27911+
- The topic acts as a **logical identifier** (`message_id`) for the XCM, allowing you to group and trace related messages across chains.
2791427912

2791527913
> ⚠️ **Note:** The topic is **not guaranteed to be unique**. If uniqueness is required (e.g. for deduplication), it must be enforced by the message creator.
2791627914

27917-
These features are available on runtimes built from **`stable2503-5` or later**.
27915+
### Observability Features
27916+
27917+
Runtimes built from **`stable2503-5` or later** provide two key observability features for tracing and correlating XCMs across chains:
27918+
27919+
- **[`PolkadotXcm.Sent`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pallet/enum.Event.html#variant.Sent){target=\_blank}** emitted on the origin chain when an XCM is sent.
27920+
- The **`message_id` in the `PolkadotXcm.Sent` event matches the `id` in the [`MessageQueue.Processed`](https://paritytech.github.io/polkadot-sdk/master/pallet_message_queue/pallet/enum.Event.html#variant.Processed){target=\_blank}** event on the destination chain, enabling reliable cross-chain correlation.
2791827921

2791927922
### Understanding `message_id`
2792027923

tutorials/interoperability/xcm-observability.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,19 @@ If you are new to XCM replay or dry-run, see [Replay and Dry Run XCMs Using Chop
8585

8686
### What is `SetTopic`?
8787

88-
When sending XCMs using `limited_reserve_transfer_assets` or other extrinsics from the `PolkadotXcm` pallet, two key observability features enable developers to trace and correlate messages across chains:
88+
When sending XCMs using `limited_reserve_transfer_assets` or other extrinsics from the `PolkadotXcm` pallet, a `SetTopic` instruction is automatically appended to the end of the message if one is not already present.
8989

90-
- **[`PolkadotXcm.Sent`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pallet/enum.Event.html#variant.Sent){target=\_blank} event** emitted on the origin chain when an XCM is sent.
91-
- The guarantee that the **`message_id` in the `PolkadotXcm.Sent` event matches the `id` in the [`MessageQueue.Processed`](https://paritytech.github.io/polkadot-sdk/master/pallet_message_queue/pallet/enum.Event.html#variant.Processed){target=\_blank} event** on the destination chain, enabling reliable cross-chain correlation.
9290
- **[`SetTopic([u8; 32])`](https://github.com/polkadot-fellows/xcm-format#settopic){target=\_blank}** is an XCM instruction that sets a 32-byte topic register inside the message.
93-
- This topic acts as a **logical identifier** (`message_id`) for the XCM, allowing you to group and trace related messages across chains.
91+
- The topic acts as a **logical identifier** (`message_id`) for the XCM, allowing you to group and trace related messages across chains.
9492

9593
> ⚠️ **Note:** The topic is **not guaranteed to be unique**. If uniqueness is required (e.g. for deduplication), it must be enforced by the message creator.
9694

97-
These features are available on runtimes built from **`stable2503-5` or later**.
95+
### Observability Features
96+
97+
Runtimes built from **`stable2503-5` or later** provide two key observability features for tracing and correlating XCMs across chains:
98+
99+
- **[`PolkadotXcm.Sent`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pallet/enum.Event.html#variant.Sent){target=\_blank}** emitted on the origin chain when an XCM is sent.
100+
- The **`message_id` in the `PolkadotXcm.Sent` event matches the `id` in the [`MessageQueue.Processed`](https://paritytech.github.io/polkadot-sdk/master/pallet_message_queue/pallet/enum.Event.html#variant.Processed){target=\_blank}** event on the destination chain, enabling reliable cross-chain correlation.
98101

99102
### Understanding `message_id`
100103

0 commit comments

Comments
 (0)