Skip to content

Conversation

@Sajjon
Copy link
Contributor

@Sajjon Sajjon commented Oct 3, 2025

Follow up on #9920 (but can be reviewed / merged independently), I'm working on making it easier to query logs for events, specifically relating to specific parachains.

We also incoherently sometimes use "para=" and sometimes "para_id=", which also makes Grafana Queries harder to do:

All queries are done during 1 hour period (2025-10-03 9:45-10:45 GMT)

Parachain side:

Query: {chain="yap-kusama-3392"} |~ "para="" gives 0 hits
Query: {chain="yap-kusama-3392"} |~ "para_id="" gives 12k hits

Relaychain side:

Query: {chain="kusama"} |~ "para=" gives 286k hits
Query: {chain="kusama"} |~ "para_id=" gives 99k hits

Changes

I've changed so that we always use para_id= which is 3 chars longer but so clearer than para= (and with my PR, we saved 4 chars ['I', 'd', '(', ')'], so this is actually still net -1 char logged)

All logs seem to come from prospective-parachains/src/lib.rs, using para = ?, which I've now changed to para_id = ?

(Grafana (loki) query {chain="kusama", subtarget!="prospective-parachains"} |= "para=" yield no results, i.e. all logged entries indeed come from prospective-parachains subtraget)

@Sajjon Sajjon added the R0-no-crate-publish-required The change does not require any crates to be re-published. label Oct 3, 2025
@ggwpez ggwpez removed the R0-no-crate-publish-required The change does not require any crates to be re-published. label Oct 6, 2025
@ggwpez
Copy link
Member

ggwpez commented Oct 6, 2025

You want the world to use this, so its not R0.

@Sajjon Sajjon added the T0-node This PR/Issue is related to the topic “node”. label Oct 6, 2025
@Sajjon
Copy link
Contributor Author

Sajjon commented Oct 6, 2025

/cmd prdoc --audience node --bump patch

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

Command "prdoc --audience node --bump patch" has failed ❌! See logs here

@Sajjon Sajjon added this pull request to the merge queue Oct 9, 2025
Merged via the queue into master with commit 6999c14 Oct 9, 2025
244 of 245 checks passed
@Sajjon Sajjon deleted the cyon/log_use_para_id_everywhere_instead_of_only_para branch October 9, 2025 08:31
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
…a=` (#9921)

Follow up on #9920 (but
can be reviewed / merged independently), I'm working on making it easier
to query logs for events, specifically relating to specific parachains.

We also incoherently sometimes use `"para="` and sometimes `"para_id=`",
which also makes Grafana Queries harder to do:

**All queries are done during 1 hour period** (2025-10-03 9:45-10:45
GMT)

## Parachain side:
Query: `{chain="yap-kusama-3392"} |~ "para=""` gives 0 hits
Query: `{chain="yap-kusama-3392"} |~ "para_id=""` gives 12k hits

## Relaychain side:
Query: `{chain="kusama"} |~ "para="` gives 286k hits
Query: `{chain="kusama"} |~ "para_id="` gives 99k hits

# Changes
I've changed so that we always use `para_id=` which is 3 chars longer
but so clearer than `para=` (and with [my
PR](#9920), we saved 4
chars `['I', 'd', '(', ')']`, so this is actually still net -1 char
logged)

All logs seem to come from
[prospective-parachains/src/lib.rs](https://github.com/paritytech/polkadot-sdk/blob/bf235845f9ecb2b84264f255afd7aefdd5ddb603/polkadot/node/core/prospective-parachains/src/lib.rs#L797),
using `para = ?`, which I've now changed to `para_id = ?`

(Grafana (loki) query `{chain="kusama",
subtarget!="prospective-parachains"} |= "para="` yield no results, i.e.
all logged entries indeed come from `prospective-parachains` subtraget)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants