File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed
examples/logs-advanced/src Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ use opentelemetry_appender_tracing::layer;
44use opentelemetry_sdk:: error:: OTelSdkResult ;
55use opentelemetry_sdk:: logs:: { LogProcessor , SdkLogRecord , SdkLoggerProvider , SimpleLogProcessor } ;
66use opentelemetry_sdk:: Resource ;
7- use std:: thread:: sleep;
8- use std:: time:: Duration ;
97use tracing:: { error, info} ;
108use tracing_subscriber:: { prelude:: * , EnvFilter } ;
119
@@ -106,9 +104,6 @@ impl<P: LogProcessor> EnrichmentLogProcessor<P> {
106104
107105impl < 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 }
You can’t perform that action at this time.
0 commit comments