Skip to main content
Version: Next

CrawleeInstrumentation

Hierarchy

Index

Constructors

constructor

Properties

externalreadonlyinheritedinstrumentationName

instrumentationName: string

Instrumentation Name

externalreadonlyinheritedinstrumentationVersion

instrumentationVersion: string

Instrumentation Version

Methods

externalinheriteddisable

  • disable(): void
  • Returns void

externalinheritedenable

  • enable(): void
  • Returns void

externalinheritedgetConfig

externalinheritedgetModuleDefinitions

  • getModuleDefinitions(): InstrumentationModuleDefinition[]
  • experimental

    Get module definitions defined by init. This can be used for experimental compile-time instrumentation.


    Returns InstrumentationModuleDefinition[]

    an array of InstrumentationModuleDefinition

externalinheritedisEnabled

  • isEnabled(): boolean
  • Returns boolean

externalinheritedsetConfig

  • setConfig(config): void
  • Sets InstrumentationConfig to this plugin


    Parameters

    Returns void

externalinheritedsetLoggerProvider

  • setLoggerProvider(loggerProvider): void
  • Sets LoggerProvider to this plugin


    Parameters

    • externalloggerProvider: LoggerProvider

    Returns void

externalinheritedsetMeterProvider

  • setMeterProvider(meterProvider): void
  • Sets MeterProvider to this plugin


    Parameters

    • externalmeterProvider: MeterProvider

    Returns void

publicsetTracerProvider

  • setTracerProvider(tracerProvider): void
  • Shares the tracer with the exported wrapWithSpan helper, 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 tracerProvider passed to registerInstrumentations is never registered globally, and a duplicated @opentelemetry/api in 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 not undefined it also shadows the fallback in wrapWithSpan.


    Parameters

    • tracerProvider: TracerProvider

    Returns void