@proto-kit/api • Docs
Documentation / @proto-kit/api / ModularizedInstrumentation
Class: ModularizedInstrumentation
Extends
InstrumentationBase<object>
Constructors
new ModularizedInstrumentation()
new ModularizedInstrumentation(
instrumentations):ModularizedInstrumentation
Parameters
• instrumentations: (PushInstrumentation | PollInstrumentation)[]
Returns
Overrides
InstrumentationBase<{}>.constructor
Defined in
packages/api/src/metrics/ModularizedInstrumentation.ts:11
Properties
_config
protected_config:object
Inherited from
InstrumentationBase._config
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:10
_diag
protected_diag:DiagLogger
Inherited from
InstrumentationBase._diag
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:14
_massUnwrap()
protected_massUnwrap: <Nodule>(nodules,names) =>void
Type Parameters
• Nodule extends object
Parameters
• nodules: Nodule[]
• names: keyof Nodule[]
Returns
void
Inherited from
InstrumentationBase._massUnwrap
Defined in
node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.d.ts:17
_massWrap()
protected_massWrap: <Nodule,FieldName>(nodules,names,wrapper) =>void
Type Parameters
• Nodule extends object
• FieldName extends string | number | symbol
Parameters
• nodules: Nodule[]
• names: FieldName[]
• wrapper
Returns
void
Inherited from
InstrumentationBase._massWrap
Defined in
node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.d.ts:16
_unwrap()
protected_unwrap: <Nodule>(nodule,name) =>void
Type Parameters
• Nodule extends object
Parameters
• nodule: Nodule
• name: keyof Nodule
Returns
void
Inherited from
InstrumentationBase._unwrap
Defined in
node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.d.ts:15
_wrap()
protected_wrap: <Nodule,FieldName>(nodule,name,wrapper) =>void
Type Parameters
• Nodule extends object
• FieldName extends string | number | symbol
Parameters
• nodule: Nodule
• name: FieldName
• wrapper
Returns
void
Inherited from
InstrumentationBase._wrap
Defined in
node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.d.ts:14
instrumentationName
readonlyinstrumentationName:string
Instrumentation Name
Inherited from
InstrumentationBase.instrumentationName
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:8
instrumentationVersion
readonlyinstrumentationVersion:string
Instrumentation Version
Inherited from
InstrumentationBase.instrumentationVersion
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:9
Accessors
logger
Get Signature
get
protectedlogger():Logger
Returns
Logger
Inherited from
InstrumentationBase.logger
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:26
meter
Get Signature
get
protectedmeter():Meter
Returns
Meter
Inherited from
InstrumentationBase.meter
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:20
tracer
Get Signature
get
protectedtracer():Tracer
Returns
Tracer
Inherited from
InstrumentationBase.tracer
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:56
Methods
_runSpanCustomizationHook()
protected_runSpanCustomizationHook<SpanCustomizationInfoType>(hookHandler,triggerName,span,info):void
Execute span customization hook, if configured, and log any errors. Any semantics of the trigger and info are defined by the specific instrumentation.
Type Parameters
• SpanCustomizationInfoType
Parameters
• hookHandler: undefined | SpanCustomizationHook<SpanCustomizationInfoType>
The optional hook handler which the user has configured via instrumentation config
• triggerName: string
The name of the trigger for executing the hook for logging purposes
• span: Span
The span to which the hook should be applied
• info: SpanCustomizationInfoType
The info object to be passed to the hook, with useful data the hook may use
Returns
void
Inherited from
InstrumentationBase._runSpanCustomizationHook
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:72
_updateMetricInstruments()
_updateMetricInstruments():
void
Sets the new metric instruments with the current Meter.
Returns
void
Overrides
InstrumentationBase._updateMetricInstruments
Defined in
packages/api/src/metrics/ModularizedInstrumentation.ts:87
disable()
disable():
void
Returns
void
Inherited from
InstrumentationBase.disable
Defined in
node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.d.ts:22
enable()
enable():
void
Returns
void
Inherited from
InstrumentationBase.enable
Defined in
node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.d.ts:21
getConfig()
getConfig():
object
Method to get instrumentation config
Returns
object
Inherited from
InstrumentationBase.getConfig
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:45
getModuleDefinitions()
getModuleDefinitions():
InstrumentationModuleDefinition[]
Experimental
Get module definitions defined by init. This can be used for experimental compile-time instrumentation.
Returns
InstrumentationModuleDefinition[]
an array of InstrumentationModuleDefinition
Inherited from
InstrumentationBase.getModuleDefinitions
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:40
init()
init():
void
Init method in which plugin should define _modules and patches for methods.
Returns
void
Overrides
InstrumentationBase.init
Defined in
packages/api/src/metrics/ModularizedInstrumentation.ts:93
initialize()
initialize():
void
Returns
void
Defined in
packages/api/src/metrics/ModularizedInstrumentation.ts:43
isEnabled()
isEnabled():
boolean
Returns
boolean
Inherited from
InstrumentationBase.isEnabled
Defined in
node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.d.ts:23
setConfig()
setConfig(
config):void
Sets InstrumentationConfig to this plugin
Parameters
• config
Returns
void
Inherited from
InstrumentationBase.setConfig
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:50
setLoggerProvider()
setLoggerProvider(
loggerProvider):void
Sets LoggerProvider to this plugin
Parameters
• loggerProvider: LoggerProvider
Returns
void
Inherited from
InstrumentationBase.setLoggerProvider
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:31
setMeterProvider()
setMeterProvider(
meterProvider):void
Sets MeterProvider to this plugin
Parameters
• meterProvider: MeterProvider
Returns
void
Inherited from
InstrumentationBase.setMeterProvider
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:25
setTracerProvider()
setTracerProvider(
tracerProvider):void
Sets TraceProvider to this plugin
Parameters
• tracerProvider: TracerProvider
Returns
void
Inherited from
InstrumentationBase.setTracerProvider
Defined in
node_modules/@opentelemetry/instrumentation/build/src/instrumentation.d.ts:55
splitInstrumentations()
splitInstrumentations():
object
Returns
object
pollInstrumentations
pollInstrumentations:
PollInstrumentation[]
pushInstrumentations
pushInstrumentations:
PushInstrumentation[]
Defined in
packages/api/src/metrics/ModularizedInstrumentation.ts:26
start()
start():
Promise<void>
Returns
Promise<void>