Skip to content

Commit 50dba6d

Browse files
Remove unnecessary artificial slowness #3266 (comment)
1 parent efc20c6 commit 50dba6d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

examples/logs-advanced/src/main.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use opentelemetry_appender_tracing::layer;
44
use opentelemetry_sdk::error::OTelSdkResult;
55
use opentelemetry_sdk::logs::{LogProcessor, SdkLogRecord, SdkLoggerProvider, SimpleLogProcessor};
66
use opentelemetry_sdk::Resource;
7-
use std::thread::sleep;
8-
use std::time::Duration;
97
use tracing::{error, info};
108
use tracing_subscriber::{prelude::*, EnvFilter};
119

@@ -106,9 +104,6 @@ impl<P: LogProcessor> EnrichmentLogProcessor<P> {
106104

107105
impl<P: LogProcessor> LogProcessor for EnrichmentLogProcessor<P> {
108106
fn emit(&self, data: &mut SdkLogRecord, instrumentation: &InstrumentationScope) {
109-
// Simulate an expensive enrichment step (e.g., fetching from a DB or service)
110-
sleep(Duration::from_secs(1));
111-
// Enrich the log record with a custom attribute using the public API
112107
data.add_attribute("enriched", true);
113108
self.delegate.emit(data, instrumentation);
114109
}

0 commit comments

Comments
 (0)