-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2870: refactor: replace metrics-rs with opentelemetry-rust r=doitian,driftluo a=yangby-cryptape ### Purpose - Remove all `tokio<1.0` dependencies. Reduce `502 - 483 = 19` dependencies. - Fix the metrics feature, it was broken since v0.43.0. ### Changes - **(BREAK CHANGES)** Due to the refactor of [`metrics-rs`] `>0.12.1`, we couldn't keep the same configurations as before. Since the metrics feature is an experimental and development-only feature, I just made some break changes. - According to the suggestion from `@doitian,` replaces [`metrics-rs`] with [`opentelemetry-rust`]. As [`opentelemetry-rust`] said, [it is not stable, too](https://docs.rs/opentelemetry/0.15.0/opentelemetry/#metrics), so I didn't change the APIs. I just wrote a series of compatible macros. Due to the difference of those two crates, the presentation of data couldn't be totally the same as before. We could tweak them later according to actual requirements. ### In the Further I just let it works again, it only supports export data over a Prometheus endpoint with a preset settings, now. Any more changes should be added later, according to actual requirements. [`opentelemetry-rust`]: https://github.com/open-telemetry/opentelemetry-rust [`metrics-rs`]: https://github.com/metrics-rs/metrics <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/nervosnetwork/ckb/2870) <!-- Reviewable:end --> Co-authored-by: Boyu Yang <[email protected]>
- Loading branch information
Showing
8 changed files
with
196 additions
and
495 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.