Skip to content

Commit cff5728

Browse files
cijothomasutpilla
andauthored
chore: Nit fix to doc about shutdown in logprocessor (#3217)
Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
1 parent fb06241 commit cff5728

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opentelemetry-sdk/src/logs/log_processor.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,17 @@ pub trait LogProcessor: Send + Sync + Debug {
5858
/// After shutdown returns the log processor should stop processing any logs.
5959
/// It's up to the implementation on when to drop the LogProcessor.
6060
///
61-
/// All implementors should implement this method.
61+
/// Implementors that manage resources (background threads, network connections,
62+
/// file handles, etc.) should override this method to properly clean up.
63+
/// Processors that wrap other processors should forward the shutdown call to
64+
/// the wrapped processor(s).
65+
/// Simple processors that only transform log data can use the default implementation.
6266
fn shutdown_with_timeout(&self, _timeout: Duration) -> OTelSdkResult {
6367
// It would have been better to make this method required, but that ship
6468
// sailed when the logs API was declared stable.
6569
otel_warn!(
6670
name: "LogProcessor.DefaultShutdownWithTimeout",
67-
message = format!("LogProcessor::shutdown_with_timeout should be implemented by all LogProcessor types")
71+
message = "LogProcessor is using default shutdown implementation. If this processor manages background threads, network connections, file handles, or other resources that need cleanup, implement `shutdown_with_timeout()` to properly release them. Simple processors that only transform log data can safely use this default."
6872
);
6973
Ok(())
7074
}

0 commit comments

Comments
 (0)