rust-prometheus icon indicating copy to clipboard operation
rust-prometheus copied to clipboard

feat: export inner MetricVecBuilder structs

Open MrCroxx opened this issue 1 year ago • 12 comments

Signed-off-by: MrCroxx [email protected]

This PR exports MetricVecBuilder types, with which users can easily build customized tools.

MrCroxx avatar May 11 '23 12:05 MrCroxx

In risingwave#9756 I built self-managed metrics generic types with the inner builder types. IMO exporting the inner builder helps a lot. Is It okay to export them to all user or is there any better way to achieve it? Thanks a lot. 🙏

MrCroxx avatar May 11 '23 12:05 MrCroxx

You should also bump the MSRV in the CI file.

TennyZhuang avatar May 12 '23 10:05 TennyZhuang

Seems a new version of indirect dependency requires the new rust version. 🤔

MrCroxx avatar May 12 '23 10:05 MrCroxx

@nickelc PTAL 🙏 If this PR is reasonable. Thanks a lot.

MrCroxx avatar May 12 '23 10:05 MrCroxx

@lucab PTAL

MrCroxx avatar May 15 '23 07:05 MrCroxx

The changes look fine.

Seems a new version of indirect dependency requires the new rust version. thinking

The dev dependency rayon 1.7 requires Rust 1.59 and the indirect dependency security-framework v2.9.0 now requires Rust 1.60.

$ cargo tree --target all -i security-framework --features push
security-framework v2.9.0
└── native-tls v0.2.11
    ├── hyper-tls v0.5.0
    │   └── reqwest v0.11.17
    │       └── prometheus v0.13.3 (/projects/various/rust-prometheus)
    ├── reqwest v0.11.17 (*)
    └── tokio-native-tls v0.3.1
        ├── hyper-tls v0.5.0 (*)
        └── reqwest v0.11.17 (*)

nickelc avatar May 15 '23 12:05 nickelc

@nickelc Thanks for help. Should I pin the dependency to the version that meets the MSRV(1.57) requires or update MSRV to a higher version?

MrCroxx avatar May 17 '23 07:05 MrCroxx

@MrCroxx thanks for the patch! Let's bump the MSRV, 1.60 sounds like a good target. Could you please do that in a separate PR? I'll review and merge that one, so that we can first unblock CI and then get to the rest of changes later.

lucab avatar May 17 '23 08:05 lucab

@nickelc Could you please do that in a separate PR? I'll review and merge that one, so that we can first unblock CI and then get to the rest of changes later.

Sure~

Done with #491 .

MrCroxx avatar May 17 '23 08:05 MrCroxx

Besides, would you like to publish a new version of this lib after this PR is merged?

MrCroxx avatar May 17 '23 08:05 MrCroxx

@nickelc Sorry to bother you again. Can this PR be merged?

MrCroxx avatar May 18 '23 03:05 MrCroxx

@lucab Hi, any updates? Can this PR be merged?

MrCroxx avatar Sep 06 '23 03:09 MrCroxx