Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace metrics-rs with opentelemetry-rust #2870

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented Jul 24, 2021

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, 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.


This change is Reviewable

@yangby-cryptape yangby-cryptape marked this pull request as ready for review July 24, 2021 09:29
@yangby-cryptape yangby-cryptape requested a review from a team as a code owner July 24, 2021 09:29
@yangby-cryptape yangby-cryptape requested review from quake and doitian July 24, 2021 09:29
Copy link
Member

@doitian doitian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8 of 8 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @quake)

@yangby-cryptape
Copy link
Collaborator Author

bors merge=doitian,driftluo

@bors
Copy link
Contributor

bors bot commented Jul 26, 2021

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants