Update version of metrics to fix integration with other tools#40
Closed
bltavares wants to merge 1 commit intoPtrskay3:masterfrom
Closed
Update version of metrics to fix integration with other tools#40bltavares wants to merge 1 commit intoPtrskay3:masterfrom
bltavares wants to merge 1 commit intoPtrskay3:masterfrom
Conversation
The current version of metrics (0.21.0) uses an older version of macros that point to different global allocators than the current latest version (0.22.0) causing metrics to not be reported by other tools integrating with the `metrics` facade. Since metrics-rs/metrics#414, the `metrics` project now can have different registries, and such, the macros (eg: `counter!`) have been refactored. As this is a pre-1.0 project, including axum-prometheus into a project with `metrics:0.22.0` register 2 different versions of the metrics crate. So metrics reported by `axum-prometheus` will be registered on the `metrics:0.21.0` global collector, while the project's metrics will use the `metrics:0.22.0` global collector. While the current suggested method of exporting the `let (_, handle)` as a route will work, as it's pointing to the `metrics:0.21.0` collectors, other integrations such as the push-based background task will miss out the layer metrics. By upgrading this project to `metrics:0.22.0` we can ensure it's reporting to the same global collector, and thus integrated with other `metrics`-based tools. This commit bumps the metrics version to 0.22.0 as well as fix the macro invocations introduced on the new version.
Owner
|
Appreciate the detailed explanation and all the efforts, but the update did happen in #39. I'll release a new minor version of this crate soon. Thanks again. |
Author
|
Oh, cool. I did not notice the other PR when I've started using the lib. Thanks for the release :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current version of metrics (0.21.0) uses an older version of macros that point to different global allocators than the current latest version (0.22.0) causing metrics to not be reported by other tools integrating with the
metricsfacade.Since metrics-rs/metrics#414, the
metricsproject now can have different registries, and such, the macros (eg:counter!) have been refactored.As this is a pre-1.0 project, including axum-prometheus into a project with
metrics:0.22.0register 2 different versions of the metrics crate. So metrics reported byaxum-prometheuswill be registered on themetrics:0.21.0global collector, while the project's metrics will use themetrics:0.22.0global collector.While the current suggested method of exporting the
let (_, handle)as a route will work, as it's pointing to themetrics:0.21.0collectors, other integrations such as the push-based background task will miss out the layer metrics.By upgrading this project to
metrics:0.22.0we can ensure it's reporting to the same global collector, and thus integrated with othermetrics-based tools.This commit bumps the metrics version to 0.22.0 as well as fix the macro invocations introduced on the new version.
Thanks for the project :)