Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed May 23, 2024
1 parent 6a444d3 commit 4564ed6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
- Removed dependency on `ordered-float`.

- **Breaking** [1726](https://github.com/open-telemetry/opentelemetry-rust/pull/1726)
Update `LogProcessor::emit() method to take mutable reference to LogData. This is breaking
Update `LogProcessor::emit()` method to take mutable reference to LogData. This is breaking
change for LogProcessor developers. If the processor needs to invoke the exporter
asynchronously, it should clone the data to ensure it can be safely processed without
lifetime issues. Any changes made to the log data in this method will be reflected in
the next log processor in the chain, as well as to the exporter.

- **Breaking** [1726](https://github.com/open-telemetry/opentelemetry-rust/pull/1726)
Update `LogExporter::export() method to accepts a batch of log data, which can be either a
reference or owned `LogData`. If the exporter needs to process the log data
asynchronously, it should clone the log data to ensure it can be safely processed without
lifetime issues.
Update `LogExporter::export()` method to accepts a slice of reference of `LogData`.
If the exporter needs to process the log data asynchronously, it should clone the log data
to ensure it can be safely processed without lifetime issues.

## v0.23.0

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/export/logs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::fmt::Debug;
/// `LogExporter` defines the interface that log exporters should implement.
#[async_trait]
pub trait LogExporter: Send + Sync + Debug {
/// Exports a batch of [`LogData`].
/// Exports a batch of reference to `LogData`.
async fn export<'a>(&mut self, batch: &'a [&'a LogData]) -> LogResult<()>;

/// Shuts down the exporter.
Expand Down

0 comments on commit 4564ed6

Please sign in to comment.