Skip to content

Commit 81d5a06

Browse files
authored
chore(prometheus): restore crate to workspace (#3500)
1 parent 5a07ce1 commit 81d5a06

5 files changed

Lines changed: 16 additions & 47 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ members = [
88
"stress",
99
]
1010
resolver = "2"
11-
# Avoid applying patch to force use of workspace members for this
12-
# not actively maintained crate
13-
exclude = ["opentelemetry-prometheus"]
1411

1512
[profile.bench]
1613
# https://doc.rust-lang.org/cargo/reference/profiles.html#debug

opentelemetry-prometheus/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## vNext
44

5+
- Un-deprecate `opentelemetry-prometheus` and remove stale discontinuation notices. [#3288](https://github.com/open-telemetry/opentelemetry-rust/issues/3288)
6+
- Set MSRV to 1.81.0 to match the `prometheus` dependency requirement.
7+
58
## v0.31.1
69

710
- Remove `protobuf` dependency from `prometheus`

opentelemetry-prometheus/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "opentelemetry-prometheus"
33
version = "0.31.1"
4-
description = "Prometheus exporter for OpenTelemetry (This crate is discontinued and is no longer maintained)"
4+
description = "Prometheus exporter for OpenTelemetry"
55
homepage = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-prometheus"
66
repository = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-prometheus"
77
readme = "README.md"
@@ -13,25 +13,25 @@ categories = [
1313
keywords = ["opentelemetry", "prometheus", "metrics", "async"]
1414
license = "Apache-2.0"
1515
edition = "2021"
16-
rust-version = "1.75.0"
16+
rust-version = "1.81.0"
1717

1818
[package.metadata.docs.rs]
1919
all-features = true
2020
rustdoc-args = ["--cfg", "docsrs"]
2121

2222
[dependencies]
23-
once_cell = { version = "1.13" }
24-
opentelemetry = { version = "0.31", default-features = false, features = ["metrics", "internal-logs"] }
25-
opentelemetry_sdk = { version = "0.31", default-features = false, features = ["metrics", "experimental_metrics_custom_reader"] }
23+
once_cell = { workspace = true }
24+
opentelemetry = { workspace = true, features = ["metrics", "internal-logs"] }
25+
opentelemetry_sdk = { workspace = true, features = ["metrics", "experimental_metrics_custom_reader"] }
2626
prometheus = { version = "0.14", default-features = false }
27-
tracing = { version = ">=0.1.40", default-features = false, optional = true } # optional for opentelemetry internal logging
27+
tracing = { workspace = true, optional = true } # optional for opentelemetry internal logging
2828

2929
[dev-dependencies]
30-
opentelemetry-semantic-conventions = { version = "0.31" }
31-
http-body-util = { version = "0.1" }
32-
hyper = { version = "1.3", features = ["full"] }
33-
hyper-util = { version = "0.1", features = ["full"] }
34-
tokio = { version = "1", features = ["full"] }
30+
opentelemetry-semantic-conventions = { workspace = true }
31+
http-body-util = { workspace = true }
32+
hyper = { workspace = true, features = ["full"] }
33+
hyper-util = { workspace = true, features = ["full"] }
34+
tokio = { workspace = true, features = ["full"] }
3535

3636
[features]
3737
default = ["internal-logs"]

opentelemetry-prometheus/README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,7 @@
44

55
[splash]: https://raw.githubusercontent.com/open-telemetry/opentelemetry-rust/main/assets/logo-text.png
66

7-
[`Prometheus`] integration for applications instrumented with [`OpenTelemetry`].
8-
9-
**Warning: This crate is no longer recommended for use.**
10-
11-
Development of the Prometheus exporter has been discontinued. See the related
12-
[issue](https://github.com/open-telemetry/opentelemetry-rust/issues/2451). This
13-
crate depends on the unmaintained `protobuf` crate and has unresolved security
14-
vulnerabilities. Version 0.29 will be the final release.
15-
16-
For Prometheus integration, we strongly recommend using the [OTLP] exporter
17-
instead. Prometheus [natively supports
18-
OTLP](https://prometheus.io/docs/guides/opentelemetry/#enable-the-otlp-receiver),
19-
providing a more stable and actively maintained solution.
20-
21-
[OTLP]: https://docs.rs/opentelemetry-otlp/latest/opentelemetry_otlp/
7+
[`Prometheus`] integration for applications instrumented with [`OpenTelemetry`].
228

239
[![Crates.io: opentelemetry-prometheus](https://img.shields.io/crates/v/opentelemetry-prometheus.svg)](https://crates.io/crates/opentelemetry-prometheus)
2410
[![Documentation](https://docs.rs/opentelemetry-prometheus/badge.svg)](https://docs.rs/opentelemetry-prometheus)

opentelemetry-prometheus/src/lib.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
//! An OpenTelemetry exporter for [Prometheus] metrics.
22
//!
3-
//! <div class="warning">
4-
//! <strong>Warning: This crate is no longer recommended for use.</strong><br><br>
5-
//! Development of the Prometheus exporter has been discontinued. See the related
6-
//! [issue](https://github.com/open-telemetry/opentelemetry-rust/issues/2451).
7-
//! This crate depends on the unmaintained `protobuf` crate and has unresolved
8-
//! security vulnerabilities. Version 0.29 will be the final release.
9-
//!
10-
//! For Prometheus integration, we strongly recommend using the [OTLP] exporter instead.
11-
//! Prometheus [natively supports OTLP](https://prometheus.io/docs/guides/opentelemetry/#enable-the-otlp-receiver),
12-
//! providing a more stable and actively maintained solution.
13-
//! </div>
14-
//!
153
//! [Prometheus]: https://prometheus.io
16-
//! [OTLP]: https://docs.rs/opentelemetry-otlp/latest/opentelemetry_otlp/
174
//!
185
//! ```
196
//! use opentelemetry::{metrics::MeterProvider, KeyValue};
@@ -96,11 +83,7 @@
9683
unreachable_pub,
9784
unused
9885
)]
99-
#![cfg_attr(
100-
docsrs,
101-
feature(doc_cfg),
102-
deny(rustdoc::broken_intra_doc_links)
103-
)]
86+
#![cfg_attr(docsrs, feature(doc_cfg), deny(rustdoc::broken_intra_doc_links))]
10487
#![doc(
10588
html_logo_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-rust/main/assets/logo.svg"
10689
)]

0 commit comments

Comments
 (0)