Skip to content

Commit 2e7bf29

Browse files
authored
Merge branch 'main' into fix/use-default-endpoint-for-empty-string
2 parents 3ecf829 + 8e47d84 commit 2e7bf29

File tree

28 files changed

+322
-186
lines changed

28 files changed

+322
-186
lines changed

docs/release_0.30.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Release Notes 0.30
2+
3+
OpenTelemetry Rust 0.30 introduces a few breaking changes to the
4+
`opentelemetry_sdk` crate in the `metrics` feature. These changes were essential
5+
to drive the Metrics SDK towards stability. With this release, the Metrics SDK
6+
is officially declared stable. The Metrics API was declared stable last year,
7+
and previously, the Logs API, SDK, and OTel-Appender-Tracing were also marked
8+
stable. Importantly, no breaking changes have been introduced to components
9+
already marked as stable.
10+
11+
It is worth noting that the `opentelemetry-otlp` crate remains in a
12+
Release-Candidate state and is not yet considered stable. With the API and SDK
13+
for Logs and Metrics now stable, the focus will shift towards further refining
14+
and stabilizing the OTLP Exporters in upcoming releases. Additionally,
15+
Distributed Tracing is expected to progress towards stability, addressing key
16+
interoperability challenges.
17+
18+
For detailed changelogs of individual crates, please refer to their respective
19+
changelog files. This document serves as a summary of the main changes.
20+
21+
## Key Changes
22+
23+
### Metrics SDK Improvements
24+
25+
1. **Stabilized "view" features**: Previously under an experimental feature
26+
flag, views can now be used to modify the name, unit, description, and
27+
cardinality limit of a metric. Advanced view capabilities, such as changing
28+
aggregation or dropping attributes, remain under the experimental feature
29+
flag.
30+
31+
2. **Cardinality capping**: Introduced the ability to cap cardinality and
32+
configure limits using views.
33+
34+
3. **Polished public API**: Refined the public API to hide implementation
35+
details from exporters, enabling future internal optimizations and ensuring
36+
consistency. Some APIs related to authoring custom metric readers have been
37+
moved behind experimental feature flags. These advanced use cases require
38+
more time to finalize the API surface before being included in the stable
39+
release.
40+
41+
### Context-Based Suppression
42+
43+
Added the ability to suppress telemetry based on Context. This feature prevents
44+
telemetry-induced-telemetry scenarios and addresses a long-standing issue. Note
45+
that suppression relies on proper context propagation. Certain libraries used in
46+
OTLP Exporters utilize `tracing` but do not adopt OpenTelemetry's context
47+
propagation. As a result, not all telemetry is automatically suppressed with
48+
this feature. Improvements in this area are expected in future releases.
49+
50+
## Next Release
51+
52+
In the [next
53+
release](https://github.com/open-telemetry/opentelemetry-rust/milestone/22), the
54+
focus will shift to OTLP Exporters and Distributed Tracing, specifically
55+
resolving
56+
[interoperability](https://github.com/open-telemetry/opentelemetry-rust/issues/2420)
57+
issues with `tokio-tracing` and other fixes required to drive Distributed
58+
Tracing towards stability.
59+
60+
## Acknowledgments
61+
62+
Thank you to everyone who contributed to this milestone. We welcome your
63+
feedback through GitHub issues or discussions in the OTel-Rust Slack channel
64+
[here](https://cloud-native.slack.com/archives/C03GDP0H023).
65+
66+
We are also excited to announce that [Anton Grübel](https://github.com/gruebel)
67+
and [Björn Antonsson](https://github.com/bantonsson) have joined the OTel Rust
68+
project as Approvers.

examples/metrics-advanced/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ Run the following, and the Metrics will be written out to stdout.
1212
```shell
1313
$ cargo run
1414
```
15-
16-
17-

examples/metrics-advanced/src/main.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,23 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
8585
.with_description("My histogram example description")
8686
.build();
8787

88-
// Record measurements using the histogram instrument.
89-
// This metric will have a cardinality limit of 2,
90-
// as set in the view. Because of this, only the first two
91-
// measurements will be recorded, and the rest will be folded
92-
// into the overflow attribute.
88+
// Record measurements using the histogram instrument. This metric will have
89+
// a cardinality limit of 2, as set in the view. Because of this, only the
90+
// first two distinct attribute combinations will be recorded, and the rest
91+
// will be folded into the overflow attribute. Any number of measurements
92+
// can be recorded as long as they use the same or already-seen attribute
93+
// combinations.
9394
histogram2.record(1.5, &[KeyValue::new("mykey1", "v1")]);
94-
9595
histogram2.record(1.2, &[KeyValue::new("mykey1", "v2")]);
9696

97+
// Repeatedly emitting measurements for "v1" and "v2" will not
98+
// trigger overflow, as they are already seen attribute combinations.
99+
histogram2.record(1.7, &[KeyValue::new("mykey1", "v1")]);
100+
histogram2.record(1.8, &[KeyValue::new("mykey1", "v2")]);
101+
102+
// Emitting measurements for new attribute combinations will trigger
103+
// overflow, as the cardinality limit of 2 has been reached.
104+
// All the below measurements will be folded into the overflow attribute.
97105
histogram2.record(1.23, &[KeyValue::new("mykey1", "v3")]);
98106

99107
histogram2.record(1.4, &[KeyValue::new("mykey1", "v4")]);
@@ -104,9 +112,9 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
104112

105113
histogram2.record(1.8, &[KeyValue::new("mykey1", "v7")]);
106114

107-
// Metrics are exported by default every 30 seconds when using stdout exporter,
115+
// Metrics are exported by default every 60 seconds when using stdout exporter,
108116
// however shutting down the MeterProvider here instantly flushes
109-
// the metrics, instead of waiting for the 30 sec interval.
117+
// the metrics, instead of waiting for the 60 sec interval.
110118
meter_provider.shutdown()?;
111119
Ok(())
112120
}

examples/metrics-basic/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ Run the following, and the Metrics will be written out to stdout.
1111
```shell
1212
$ cargo run
1313
```
14-
15-
16-

examples/metrics-basic/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ async fn main() -> Result<(), Box<dyn Error>> {
136136
})
137137
.build();
138138

139-
// Metrics are exported by default every 30 seconds when using stdout
139+
// Metrics are exported by default every 60 seconds when using stdout
140140
// exporter, however shutting down the MeterProvider here instantly flushes
141-
// the metrics, instead of waiting for the 30 sec interval. Shutdown returns
141+
// the metrics, instead of waiting for the 60 sec interval. Shutdown returns
142142
// a result, which is bubbled up to the caller The commented code below
143143
// demonstrates handling the shutdown result, instead of bubbling up the
144144
// error.

opentelemetry-appender-log/CHANGELOG.md

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

33
## vNext
44

5+
## 0.30.0
6+
7+
Released 2025-May-23
8+
9+
- Updated `opentelemetry` and `opentelemetry-semantic-conventions` dependencies to version 0.30.0.
10+
511
## 0.29.0
612

713
Released 2025-Mar-21

opentelemetry-appender-log/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "opentelemetry-appender-log"
3-
version = "0.29.0"
3+
version = "0.30.0"
44
description = "An OpenTelemetry appender for the log crate"
55
homepage = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-appender-log"
66
repository = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-appender-log"
@@ -15,12 +15,12 @@ autobenches = false
1515
bench = false
1616

1717
[dependencies]
18-
opentelemetry = { version = "0.29", path = "../opentelemetry", features = [
18+
opentelemetry = { version = "0.30", path = "../opentelemetry", features = [
1919
"logs",
2020
] }
2121
log = { workspace = true, features = ["kv", "std"] }
2222
serde = { workspace = true, optional = true, features = ["std"] }
23-
opentelemetry-semantic-conventions = { version = "0.29", path = "../opentelemetry-semantic-conventions", optional = true, features = [
23+
opentelemetry-semantic-conventions = { version = "0.30", path = "../opentelemetry-semantic-conventions", optional = true, features = [
2424
"semconv_experimental",
2525
] }
2626

opentelemetry-appender-tracing/CHANGELOG.md

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

33
## vNext
44

5+
## 0.30.0
6+
7+
Released 2025-May-23
8+
9+
- Updated `opentelemetry` dependency to version 0.30.0.
10+
11+
512
## 0.29.1
613

714
Released 2025-Mar-24

opentelemetry-appender-tracing/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "opentelemetry-appender-tracing"
3-
version = "0.29.1"
3+
version = "0.30.0"
44
edition = "2021"
55
description = "An OpenTelemetry log appender for the tracing crate"
66
homepage = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-appender-tracing"
@@ -13,12 +13,12 @@ autobenches = false
1313

1414
[dependencies]
1515
log = { workspace = true, optional = true }
16-
opentelemetry = { version = "0.29", path = "../opentelemetry", features = ["logs"] }
16+
opentelemetry = { version = "0.30", path = "../opentelemetry", features = ["logs"] }
1717
tracing = { workspace = true, features = ["std"]}
1818
tracing-core = { workspace = true }
1919
tracing-log = { workspace = true, optional = true }
2020
tracing-subscriber = { workspace = true, features = ["registry", "std"] }
21-
tracing-opentelemetry = { workspace = true, optional = true }
21+
# tracing-opentelemetry = { workspace = true, optional = true }
2222

2323
[dev-dependencies]
2424
log = { workspace = true }
@@ -37,7 +37,8 @@ pprof = { version = "0.14", features = ["flamegraph", "criterion"] }
3737
default = []
3838
experimental_metadata_attributes = ["dep:tracing-log"]
3939
spec_unstable_logs_enabled = ["opentelemetry/spec_unstable_logs_enabled"]
40-
experimental_use_tracing_span_context = ["tracing-opentelemetry"]
40+
# TODO: Enable this back in 0.30.1 after tracing-opentelemetry is released
41+
# experimental_use_tracing_span_context = ["tracing-opentelemetry"]
4142

4243

4344
[[bench]]

0 commit comments

Comments
 (0)