Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Telemetry cannot be used for parachain and for relaychain at the same time #149

Closed
cecton opened this issue Jul 16, 2020 · 6 comments · Fixed by #301
Closed

Telemetry cannot be used for parachain and for relaychain at the same time #149

cecton opened this issue Jul 16, 2020 · 6 comments · Fixed by #301
Assignees

Comments

@cecton
Copy link
Contributor

cecton commented Jul 16, 2020

This is a limitation in substrate. The telemetry must be initialized only once.

Related to paritytech/substrate#6666 (this is not a fix as this doesn't allow using the telemetry on the parachain and the relaychain at the same time)

@cecton
Copy link
Contributor Author

cecton commented Jul 23, 2020

Partial fix has been merged to substrate: paritytech/substrate#6666

This will allow enabling the telemetry for the parachain but not for the relaychain OR: for the relaychain but not for the parachain.

(This fix is not on cumulus yet, need to update substrate)

@cecton
Copy link
Contributor Author

cecton commented Aug 6, 2020

I looked at the code and I don't think there is a way to distinguish between the telemetry of the para chain and the relay chain as logs are global and everything is sent to the telemetry worker (relay and para chain logs).

There are 2 ways we can go from there:

  1. Enforce 1: We decide to forbid initializing multiple telemetries in substrate (panicking with a clear and understandable error message saying that only one node can initialize the telemetry)
  2. Multiplex: We decide to allow multiple telemetries but all the recipients will receive the exact same logs

There might a a third way: we remove the use of set_global_logger and we pass a logger instance everywhere and adapt the code accordingly. It's probably as massive as it sounds.

@cecton
Copy link
Contributor Author

cecton commented Aug 6, 2020

Ah I just found #154

So we should take option 3 and there is a feature for that. Cool!

@bkchr
Copy link
Member

bkchr commented Aug 6, 2020

There might a a third way: we remove the use of set_global_logger and we pass a logger instance everywhere and adapt the code accordingly. It's probably as massive as it sounds.

This one

@cecton
Copy link
Contributor Author

cecton commented Aug 6, 2020

Related to #19 : I guess if we have a specific logger instance per node we can easily improve the prefixing

@bkchr
Copy link
Member

bkchr commented Aug 7, 2020

Logging without a singleton is a pain in the ass.

@cecton cecton self-assigned this Oct 8, 2020
Maharacha pushed a commit to Maharacha/cumulus that referenced this issue May 10, 2023
* update rust-toolchain: nightly-2022-11-14

* bump deps: compilation starts

* launch runtime compiles

* encointer-runtime compiles

* bump runtime-spec versions

* node builds
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants