Skip to content

Commit 34a3840

Browse files
Update prometheus to 0.14 (#187)
* Update prometheus to 0.14 * Update changelog --------- Co-authored-by: Mari <me@cutegirl.tech>
1 parent e0c7481 commit 34a3840

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
# Lint
2121
# Note: GitHub hosted runners using the latest stable version of Rust have Clippy pre-installed.
2222
- run: cargo clippy --features=metrics-0_24,prometheus-exporter
23-
- run: cargo clippy --features=prometheus-0_13
23+
- run: cargo clippy --features=prometheus-0_14
2424
- run: cargo clippy --features=prometheus-client-0_22
2525
- run: cargo clippy --features=opentelemetry-0_24
2626

2727
# Run the tests with each of the different metrics libraries
2828
- run: cargo test --features=prometheus-exporter
2929
- run: cargo test --features=prometheus-exporter,metrics-0_24
30-
- run: cargo test --features=prometheus-exporter,prometheus-0_13
30+
- run: cargo test --features=prometheus-exporter,prometheus-0_14
3131
- run: cargo test --features=prometheus-exporter,prometheus-client-0_22,exemplars-tracing
3232
- run: cargo test --features=prometheus-exporter,prometheus-client-0_22,exemplars-tracing-opentelemetry-0_25
3333
- run: cargo test --features=prometheus-exporter,opentelemetry-0_24

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- `metrics` has been updated to v0.24 (#183)
1414
New feature flag: `metrics-0_24`
1515
Removed feature flag: `metrics-0_21`
16+
- `prometheus` has been updated to v0.14 (#187)
17+
New feature flag: `prometheus-0_14`
18+
Removed feature flag: `prometheus-0_13`
1619

1720
## [2.0.0](https://github.com/autometrics-dev/autometrics-rs/releases/tag/v2.0.0) - 2024-07-25
1821

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ https://github.com/autometrics-dev/autometrics-rs/assets/3262610/966ed140-1d6c-4
165165
[dependencies]
166166
autometrics = {
167167
version = "*",
168-
features = ["prometheus-0_13"],
168+
features = ["prometheus-0_14"],
169169
default-features = false
170170
}
171171
```
@@ -205,7 +205,7 @@ To see autometrics in action:
205205
## Benchmarks
206206
207207
Using each of the following metrics libraries, tracking metrics with the `autometrics` macro adds approximately:
208-
- `prometheus-0_13`: 140-150 nanoseconds
208+
- `prometheus-0_14`: 140-150 nanoseconds
209209
- `prometheus-client-0_21`: 150-250 nanoseconds
210210
- `metrics-0_21`: 550-650 nanoseconds
211211
- `opentelemetry-0_20`: 1700-2100 nanoseconds

autometrics/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ readme = "README.md"
1616
# Metrics backends
1717
metrics-0_24 = ["dep:metrics"]
1818
opentelemetry-0_24 = ["opentelemetry/metrics", "dep:prometheus"]
19-
prometheus-0_13 = ["dep:prometheus"]
19+
prometheus-0_14 = ["dep:prometheus"]
2020
prometheus-client-0_22 = ["dep:prometheus-client"]
2121

2222
# Deprecated feature flags
2323
metrics = ["metrics-0_24"]
2424
opentelemetry = ["opentelemetry-0_24"]
25-
prometheus = ["prometheus-0_13"]
25+
prometheus = ["prometheus-0_14"]
2626
prometheus-client = ["prometheus-client-0_22"]
2727
exemplars-tracing-opentelemetry = ["exemplars-tracing-opentelemetry-0_25"]
2828

autometrics/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub fn main() {
88
#[cfg(feature = "opentelemetry")]
99
println!("cargo:warning=The `opentelemetry` feature is deprecated and will be removed in the next version. Please use `opentelemetry-0_24` instead.");
1010
#[cfg(feature = "prometheus")]
11-
println!("cargo:warning=The `prometheus` feature is deprecated and will be removed in the next version. Please use `prometheus-0_13` instead.");
11+
println!("cargo:warning=The `prometheus` feature is deprecated and will be removed in the next version. Please use `prometheus-0_14` instead.");
1212
#[cfg(feature = "prometheus-client")]
1313
println!("cargo:warning=The `prometheus-client` feature is deprecated and will be removed in the next version. Please use `prometheus-client-0_22` instead.");
1414
#[cfg(feature = "exemplars-tracing-opentelemetry")]
@@ -18,7 +18,7 @@ pub fn main() {
1818
// Backends
1919
metrics: { any(feature = "metrics", feature = "metrics-0_24") },
2020
opentelemetry: { any(feature = "opentelemetry", feature = "opentelemetry-0_24") },
21-
prometheus: { any(feature = "prometheus", feature = "prometheus-0_13") },
21+
prometheus: { any(feature = "prometheus", feature = "prometheus-0_14") },
2222
prometheus_client_feature: { any(feature = "prometheus-client", feature = "prometheus-client-0_22") },
2323
default_backend: { all(
2424
prometheus_exporter,

autometrics/src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ If you require more customization than these offered feature flags, enable just
155155
156156
- `opentelemetry-0_24` - use the [opentelemetry](https://crates.io/crates/opentelemetry) crate for producing metrics.
157157
- `metrics-0_24` - use the [metrics](https://crates.io/crates/metrics) crate for producing metrics
158-
- `prometheus-0_13` - use the [prometheus](https://crates.io/crates/prometheus) crate for producing metrics
158+
- `prometheus-0_14` - use the [prometheus](https://crates.io/crates/prometheus) crate for producing metrics
159159
- `prometheus-client-0_22` - use the official [prometheus-client](https://crates.io/crates/prometheus-client) crate for producing metrics
160160

161161
### Exemplars (for integrating metrics with traces)

examples/custom-metrics/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ cargo run -p example-custom-metrics --features=metrics-0_24
1919
### Using the `prometheus` crate
2020

2121
```shell
22-
cargo run -p example-custom-metrics --features=prometheus-0_13
22+
cargo run -p example-custom-metrics --features=prometheus-0_14
2323
```

0 commit comments

Comments
 (0)