Skip to content
Closed
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
37 changes: 37 additions & 0 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,43 @@
Migration Guidance:
- These methods were intended for log appenders. Keep the clone of the provider handle, instead of depending on above methods.

- *Breaking* - `PeriodicReader` Updates

`PeriodicReader` no longer requires an async runtime by default. Instead, it now creates its own background thread for execution. This change allows metrics to be used in environments without async runtimes.

For users who prefer the previous behavior of relying on a specific `Runtime`, they can do so by enabling the feature flag **`experimental_metrics_periodicreader_with_async_runtime`**.

Migration Guide:

1. *Default Implementation, requires no async runtime* (**Recommended**)
The new default implementation does not require a runtime argument. Replace the builder method accordingly:
- *Before:*
```rust
let reader = PeriodicReader::builder(exporter, runtime::Tokio).build();
```
- *After:*
```rust
let reader = PeriodicReader::builder(exporter).build();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTLP Exporter has to default to HTTP and should use request-blocking client as default for this to work.
Add a todo here, to talk about what the user should be doing if they need to use tonic, similar to comments from #2394

```

2. *Async Runtime Support*
If your application cannot spin up new threads or you prefer using async runtimes, update your code and enable the required feature flags.

- *Before:*
```rust
let reader = PeriodicReader::builder(exporter, runtime::Tokio).build();
```
- *After:*
```rust
let reader = PeriodicReader::builder(exporter)
.with_runtime(runtime::Tokio)
.build();
```

*Requirements:*
- Enable the feature flag: `experimental_metrics_periodicreader_with_async_runtime`.
- Enable one of the async runtime feature flags: `rt-tokio`, `rt-tokio-current-thread`, or `rt-async-std`.

## 0.27.1

Released 2024-Nov-27
Expand Down
Loading