Skip to main content
Version: Next

ClassMethodToInstrument

One class method to wrap in a span, and the module that has to be loaded for it to exist.

Index

Properties

className

className: string

The class name to patch.

methodName

methodName: string

The method name to patch.

moduleName

moduleName: string

The Crawlee package the class is exported from, for example @crawlee/basic.

optionalspanName

spanName?: string | (this, ...args) => string

The name of the span. Defaults to className.methodName.

When given a function, it is called with the arguments of the patched method, and this is the instance the method was called on. The arguments are any because they are whatever the patched method receives.

optionalspanOptions

spanOptions?: SpanOptions | (this, ...args) => SpanOptions

The attributes of the span. Follows the same calling convention as ClassMethodToInstrument.spanName.