11use super :: { BatchLogProcessor , LogProcessor , LogRecord , SimpleLogProcessor , TraceContext } ;
2- use crate :: { export:: logs:: LogExporter , runtime:: RuntimeChannel , Resource } ;
2+ use crate :: { export:: logs:: LogExporter , runtime:: RuntimeChannel , Resource , Scope } ;
33use opentelemetry:: {
44 logs:: { LogError , LogResult } ,
55 otel_debug,
66 trace:: TraceContextExt ,
7- Context , InstrumentationScope ,
7+ Context ,
88} ;
99
1010#[ cfg( feature = "logs_level_enabled" ) ]
@@ -48,7 +48,7 @@ pub struct LoggerProvider {
4848impl opentelemetry:: logs:: LoggerProvider for LoggerProvider {
4949 type Logger = Logger ;
5050
51- fn logger_with_scope ( & self , scope : InstrumentationScope ) -> Self :: Logger {
51+ fn logger_with_scope ( & self , scope : Scope ) -> Self :: Logger {
5252 // If the provider is shutdown, new logger will refer a no-op logger provider.
5353 if self . inner . is_shutdown . load ( Ordering :: Relaxed ) {
5454 return Logger :: new ( scope, NOOP_LOGGER_PROVIDER . clone ( ) ) ;
@@ -217,12 +217,12 @@ impl Builder {
217217///
218218/// [`LogRecord`]: opentelemetry::logs::LogRecord
219219pub struct Logger {
220- scope : InstrumentationScope ,
220+ scope : Scope ,
221221 provider : LoggerProvider ,
222222}
223223
224224impl Logger {
225- pub ( crate ) fn new ( scope : InstrumentationScope , provider : LoggerProvider ) -> Self {
225+ pub ( crate ) fn new ( scope : Scope , provider : LoggerProvider ) -> Self {
226226 Logger { scope, provider }
227227 }
228228
@@ -232,7 +232,7 @@ impl Logger {
232232 }
233233
234234 /// Instrumentation library information of this logger.
235- pub fn instrumentation_scope ( & self ) -> & InstrumentationScope {
235+ pub fn instrumentation_scope ( & self ) -> & Scope {
236236 & self . scope
237237 }
238238}
@@ -327,7 +327,7 @@ mod tests {
327327 }
328328
329329 impl LogProcessor for ShutdownTestLogProcessor {
330- fn emit ( & self , _data : & mut LogRecord , _scope : & InstrumentationScope ) {
330+ fn emit ( & self , _data : & mut LogRecord , _scope : & Scope ) {
331331 self . is_shutdown
332332 . lock ( )
333333 . map ( |is_shutdown| {
@@ -706,7 +706,7 @@ mod tests {
706706 }
707707
708708 impl LogProcessor for LazyLogProcessor {
709- fn emit ( & self , _data : & mut LogRecord , _scope : & InstrumentationScope ) {
709+ fn emit ( & self , _data : & mut LogRecord , _scope : & Scope ) {
710710 // nothing to do.
711711 }
712712
@@ -737,7 +737,7 @@ mod tests {
737737 }
738738
739739 impl LogProcessor for CountingShutdownProcessor {
740- fn emit ( & self , _data : & mut LogRecord , _scope : & InstrumentationScope ) {
740+ fn emit ( & self , _data : & mut LogRecord , _scope : & Scope ) {
741741 // nothing to do
742742 }
743743
0 commit comments