35 releases (19 stable)

new 17.1.0 Apr 2, 2025
17.0.1 Sep 25, 2024
17.0.0 Apr 8, 2024
16.0.0 Jan 23, 2024
2.0.0-rc5 Jul 24, 2020

#35 in #polkadot

Download history 60694/week @ 2024-12-11 46489/week @ 2024-12-18 17886/week @ 2024-12-25 41575/week @ 2025-01-01 37949/week @ 2025-01-08 50383/week @ 2025-01-15 43440/week @ 2025-01-22 38929/week @ 2025-01-29 43513/week @ 2025-02-05 52678/week @ 2025-02-12 40574/week @ 2025-02-19 41359/week @ 2025-02-26 40300/week @ 2025-03-05 43681/week @ 2025-03-12 39315/week @ 2025-03-19 39651/week @ 2025-03-26

169,904 downloads per month
Used in 815 crates (28 directly)

Apache-2.0

34KB
623 lines

Substrate tracing primitives and macros.

To trace functions or individual code in Substrate, this crate provides within_span and enter_span. See the individual docs for how to use these macros.

Note that to allow traces from wasm execution environment there are 2 reserved identifiers for tracing Field recording, stored in the consts: WASM_TARGET_KEY and WASM_NAME_KEY - if you choose to record fields, you must ensure that your identifiers do not clash with either of these.

Additionally, we have a const: WASM_TRACE_IDENTIFIER, which holds a span name used to signal that the 'actual' span name and target should be retrieved instead from the associated Fields mentioned above.

License: Apache-2.0

Release

Polkadot SDK stable2409

Dependencies

~3–5MB
~103K SLoC