Skip to content

Commit 5c1fd73

Browse files
committed
Move changelog to SDK
1 parent 0ea817a commit 5c1fd73

File tree

2 files changed

+52
-54
lines changed

2 files changed

+52
-54
lines changed

opentelemetry-sdk/CHANGELOG.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595

9696
- Bump msrv to 1.75.0.
9797

98-
9998
- *Breaking* : [#2314](https://github.com/open-telemetry/opentelemetry-rust/pull/2314)
10099
- The LogRecord struct has been updated:
101100
- All fields are now pub(crate) instead of pub.
@@ -105,6 +104,58 @@
105104
- Upgrade the tracing crate used for internal logging to version 0.1.40 or later. This is necessary because the internal logging macros utilize the name field as
106105
metadata, a feature introduced in version 0.1.40. [#2418](https://github.com/open-telemetry/opentelemetry-rust/pull/2418)
107106

107+
- **Breaking** [#2436](https://github.com/open-telemetry/opentelemetry-rust/pull/2436)
108+
109+
`BatchLogProcessor` no longer requires an async runtime by default. Instead, a dedicated
110+
background thread is created to do the batch processing and exporting.
111+
112+
For users who prefer the previous behavior of relying on a specific
113+
`Runtime`, they can do so by enabling the feature flag
114+
**`experimental_logs_batch_log_processor_with_async_runtime`**.
115+
116+
1. *Default Implementation, requires no async runtime* (**Recommended**) The
117+
new default implementation does not require a runtime argument. Replace the
118+
builder method accordingly:
119+
- *Before:*
120+
```rust
121+
let logger_provider = LoggerProvider::builder()
122+
.with_log_processor(BatchLogProcessor::builder(exporter, runtime::Tokio).build())
123+
.build();
124+
```
125+
126+
- *After:*
127+
```rust
128+
let logger_provider = LoggerProvider::builder()
129+
.with_log_processor(BatchLogProcessor::builder(exporter).build())
130+
.build();
131+
```
132+
133+
2. *Async Runtime Support*
134+
If your application cannot spin up new threads or you prefer using async
135+
runtimes, enable the
136+
"experimental_logs_batch_log_processor_with_async_runtime" feature flag and
137+
adjust code as below.
138+
139+
- *Before:*
140+
```rust
141+
let logger_provider = LoggerProvider::builder()
142+
.with_log_processor(BatchLogProcessor::builder(exporter, runtime::Tokio).build())
143+
.build();
144+
```
145+
146+
- *After:*
147+
```rust
148+
let logger_provider = LoggerProvider::builder()
149+
.with_log_processor(BatchLogProcessorWithAsyncRuntime::builder(exporter, runtime::Tokio).build())
150+
.build();
151+
```
152+
153+
*Requirements:*
154+
- Enable the feature flag:
155+
`experimental_logs_batch_log_processor_with_async_runtime`.
156+
- Continue enabling one of the async runtime feature flags: `rt-tokio`,
157+
`rt-tokio-current-thread`, or `rt-async-std`.
158+
108159
## 0.27.1
109160

110161
Released 2024-Nov-27

opentelemetry/CHANGELOG.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -59,59 +59,6 @@ let counter = meter.u64_counter("my_counter").build();
5959
These changes shouldn't directly affect the users of OpenTelemetry crate, as these constructs are used in SDK and Exporters. If you are an author of an sdk component/plug-in, like an exporter etc. please use these types from sdk. Refer [CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/CHANGELOG.md) for more details, under same version section.
6060
- **Breaking** [2291](https://github.com/open-telemetry/opentelemetry-rust/pull/2291) Rename `logs_level_enabled flag` to `spec_unstable_logs_enabled`. Please enable this updated flag if the feature is needed. This flag will be removed once the feature is stabilized in the specifications.
6161

62-
- **Breaking** [#2436](https://github.com/open-telemetry/opentelemetry-rust/pull/2436)
63-
64-
`BatchLogProcessor` no longer requires an async runtime by default. Instead, a dedicated
65-
background thread is created to do the batch processing and exporting.
66-
67-
For users who prefer the previous behavior of relying on a specific
68-
`Runtime`, they can do so by enabling the feature flag
69-
**`experimental_logs_batch_log_processor_with_async_runtime`**.
70-
71-
1. *Default Implementation, requires no async runtime* (**Recommended**) The
72-
new default implementation does not require a runtime argument. Replace the
73-
builder method accordingly:
74-
- *Before:*
75-
```rust
76-
let logger_provider = LoggerProvider::builder()
77-
.with_log_processor(BatchLogProcessor::builder(exporter, runtime::Tokio).build())
78-
.build();
79-
```
80-
81-
- *After:*
82-
```rust
83-
let logger_provider = LoggerProvider::builder()
84-
.with_log_processor(BatchLogProcessor::builder(exporter).build())
85-
.build();
86-
```
87-
88-
2. *Async Runtime Support*
89-
If your application cannot spin up new threads or you prefer using async
90-
runtimes, enable the
91-
"experimental_logs_batch_log_processor_with_async_runtime" feature flag and
92-
adjust code as below.
93-
94-
- *Before:*
95-
```rust
96-
let logger_provider = LoggerProvider::builder()
97-
.with_log_processor(BatchLogProcessor::builder(exporter, runtime::Tokio).build())
98-
.build();
99-
```
100-
101-
- *After:*
102-
```rust
103-
let logger_provider = LoggerProvider::builder()
104-
.with_log_processor(BatchLogProcessorWithAsyncRuntime::builder(exporter, runtime::Tokio).build())
105-
.build();
106-
```
107-
108-
*Requirements:*
109-
- Enable the feature flag:
110-
`experimental_logs_batch_log_processor_with_async_runtime`.
111-
- Continue enabling one of the async runtime feature flags: `rt-tokio`,
112-
`rt-tokio-current-thread`, or `rt-async-std`.
113-
114-
11562
## v0.26.0
11663
Released 2024-Sep-30
11764

0 commit comments

Comments
 (0)