CrawleeInstrumentation
Hierarchy
- InstrumentationBase<CrawleeInstrumentationConfig>
- CrawleeInstrumentation
Index
Constructors
constructor
Parameters
config: CrawleeInstrumentationConfig = {}
Returns CrawleeInstrumentation
Properties
externalreadonlyinheritedinstrumentationName
externalreadonlyinheritedinstrumentationVersion
Instrumentation Version
Methods
externalinheriteddisable
Returns void
externalinheritedenable
Returns void
externalinheritedgetConfig
Method to get instrumentation config
Returns CrawleeInstrumentationConfig
externalinheritedgetModuleDefinitions
- experimental
Get module definitions defined by init. This can be used for experimental compile-time instrumentation.
Returns InstrumentationModuleDefinition[]
an array of InstrumentationModuleDefinition
externalinheritedisEnabled
Returns boolean
externalinheritedsetConfig
Sets InstrumentationConfig to this plugin
Parameters
externalconfig: CrawleeInstrumentationConfig
Returns void
externalinheritedsetLoggerProvider
Sets LoggerProvider to this plugin
Parameters
externalloggerProvider: LoggerProvider
Returns void
externalinheritedsetMeterProvider
Sets MeterProvider to this plugin
Parameters
externalmeterProvider: MeterProvider
Returns void
publicsetTracerProvider
Shares the tracer with the exported
wrapWithSpanhelper, so that manually wrapped handlers end up in the same instrumentation scope as the automatic spans.This has to happen here rather than in the constructor. The constructor can only reach the tracer of the global API, and that is not necessarily the one this instrumentation ends up using - a
tracerProviderpassed toregisterInstrumentationsis never registered globally, and a duplicated@opentelemetry/apiin the dependency tree has its own global. Handing over a tracer from the wrong provider silences every span, including the automatic ones, and because it is notundefinedit also shadows the fallback inwrapWithSpan.Parameters
tracerProvider: TracerProvider
Returns void
Instrumentation Name