Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
# Note: GitHub hosted runners using the latest stable version of Rust have Clippy pre-installed.
- run: cargo clippy --features=metrics-0_21,prometheus-exporter
- run: cargo clippy --features=prometheus-0_13
- run: cargo clippy --features=prometheus-client-0_21
- run: cargo clippy --features=prometheus-client-0_22
- run: cargo clippy --features=opentelemetry-0_21

# Run the tests with each of the different metrics libraries
- run: cargo test --features=prometheus-exporter
- run: cargo test --features=prometheus-exporter,metrics-0_21
- run: cargo test --features=prometheus-exporter,prometheus-0_13
- run: cargo test --features=prometheus-exporter,prometheus-client-0_21,exemplars-tracing
- run: cargo test --features=prometheus-exporter,prometheus-client-0_21,exemplars-tracing-opentelemetry-0_22
- run: cargo test --features=prometheus-exporter,prometheus-client-0_22,exemplars-tracing
- run: cargo test --features=prometheus-exporter,prometheus-client-0_22,exemplars-tracing-opentelemetry-0_22
- run: cargo test --features=prometheus-exporter,opentelemetry-0_21

# Build the crate using the other optional features
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The following changes are made in order to bring the release in compliance with
as with the `prometheus` and `prometheus-client` crates, because the histogram buckets can now
be configured via the settings
- Upgraded `opentelemetry` to v0.20
- Upgraded `prometheus-client` to v0.22

### Deprecated

Expand Down
8 changes: 4 additions & 4 deletions autometrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ readme = "README.md"
metrics-0_21 = ["dep:metrics"]
opentelemetry-0_21 = ["opentelemetry/metrics", "dep:prometheus"]
prometheus-0_13 = ["dep:prometheus"]
prometheus-client-0_21 = ["dep:prometheus-client"]
prometheus-client-0_22 = ["dep:prometheus-client"]

# Deprecated feature flags
metrics = ["metrics-0_21"]
opentelemetry = ["opentelemetry-0_21"]
prometheus = ["prometheus-0_13"]
prometheus-client = ["prometheus-client-0_21"]
prometheus-client = ["prometheus-client-0_22"]
exemplars-tracing-opentelemetry = ["exemplars-tracing-opentelemetry-0_22"]

# Misc
Expand Down Expand Up @@ -106,7 +106,7 @@ opentelemetry-otlp = { version = "0.14.0", default-features = false, optional =
prometheus = { version = "0.13", default-features = false, optional = true }

# Used for prometheus-client feature
prometheus-client = { version = "0.21.1", optional = true }
prometheus-client = { version = "0.22", optional = true }

# Used for exemplars-tracing feature
tracing = { version = "0.1", optional = true }
Expand All @@ -124,7 +124,7 @@ criterion = "0.5"
http = "0.2"
opentelemetry = "0.21"
opentelemetry-stdout = { version = "0.2", features = ["trace"] }
prometheus-client = "0.21"
prometheus-client = "0.22"
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
tracing-subscriber = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions autometrics/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn main() {
#[cfg(feature = "prometheus")]
println!("cargo:warning=The `prometheus` feature is deprecated and will be removed in the next version. Please use `prometheus-0_13` instead.");
#[cfg(feature = "prometheus-client")]
println!("cargo:warning=The `prometheus-client` feature is deprecated and will be removed in the next version. Please use `prometheus-client-0_21` instead.");
println!("cargo:warning=The `prometheus-client` feature is deprecated and will be removed in the next version. Please use `prometheus-client-0_22` instead.");
#[cfg(feature = "exemplars-tracing-opentelemetry")]
println!("cargo:warning=The `exemplars-tracing-opentelemetry` feature is deprecated and will be removed in the next version. Please use `exemplars-tracing-opentelemetry-0_22` instead.");

Expand All @@ -19,7 +19,7 @@ pub fn main() {
metrics: { any(feature = "metrics", feature = "metrics-0_21") },
opentelemetry: { any(feature = "opentelemetry", feature = "opentelemetry-0_21") },
prometheus: { any(feature = "prometheus", feature = "prometheus-0_13") },
prometheus_client_feature: { any(feature = "prometheus-client", feature = "prometheus-client-0_21") },
prometheus_client_feature: { any(feature = "prometheus-client", feature = "prometheus-client-0_22") },
default_backend: { all(
prometheus_exporter,
not(any(metrics, opentelemetry, prometheus, prometheus_client_feature))
Expand Down
4 changes: 2 additions & 2 deletions autometrics/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ If you require more customization than these offered feature flags, enable just

> If you are exporting metrics yourself rather than using the `prometheus-exporter`, you must ensure that you are using the exact same version of the metrics library as `autometrics` (and it must come from `crates.io` rather than git or another source). If not, the autometrics metrics will not appear in your exported metrics.

- `opentelemetry-0_20` - use the [opentelemetry](https://crates.io/crates/opentelemetry) crate for producing metrics.
- `opentelemetry-0_21` - use the [opentelemetry](https://crates.io/crates/opentelemetry) crate for producing metrics.
- `metrics-0_21` - use the [metrics](https://crates.io/crates/metrics) crate for producing metrics
- `prometheus-0_13` - use the [prometheus](https://crates.io/crates/prometheus) crate for producing metrics
- `prometheus-client-0_21` - use the official [prometheus-client](https://crates.io/crates/prometheus-client) crate for producing metrics
- `prometheus-client-0_22` - use the official [prometheus-client](https://crates.io/crates/prometheus-client) crate for producing metrics

### Exemplars (for integrating metrics with traces)

Expand Down
2 changes: 1 addition & 1 deletion examples/exemplars-tracing-opentelemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"

[dependencies]
autometrics = { path = "../../autometrics", features = [
"prometheus-client-0_21",
"prometheus-client-0_22",
"prometheus-exporter",
"exemplars-tracing-opentelemetry-0_22",
] }
Expand Down
2 changes: 1 addition & 1 deletion examples/exemplars-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"

[dependencies]
autometrics = { path = "../../autometrics", features = [
"prometheus-client-0_21",
"prometheus-client-0_22",
"prometheus-exporter",
"exemplars-tracing"
] }
Expand Down