Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @opentelemetry/instrumentation

Index

Type aliases

InstrumentationOption

InstrumentationOption: typeof InstrumentationBase | typeof InstrumentationBase[] | Instrumentation | Instrumentation[]

Functions

isWrapped

  • isWrapped(func: any): boolean

registerInstrumentations

  • It will register instrumentations and plugins

    Parameters

    Returns () => void

    returns function to unload instrumentation and plugins that were registered

      • (): void
      • It will register instrumentations and plugins

        Returns void

        returns function to unload instrumentation and plugins that were registered

safeExecuteInTheMiddle

  • safeExecuteInTheMiddle<T>(execute: () => T, onFinish: (e: Error | undefined, result: T | undefined) => void, preventThrowingError?: boolean): T
  • function to execute patched function and being able to catch errors

    Type parameters

    • T

    Parameters

    • execute: () => T

      function to be executed

        • (): T
        • Returns T

    • onFinish: (e: Error | undefined, result: T | undefined) => void

      callback to run when execute finishes

        • (e: Error | undefined, result: T | undefined): void
        • Parameters

          • e: Error | undefined
          • result: T | undefined

          Returns void

    • Optional preventThrowingError: boolean

    Returns T

safeExecuteInTheMiddleAsync

  • safeExecuteInTheMiddleAsync<T>(execute: () => T, onFinish: (e: Error | undefined, result: T | undefined) => void, preventThrowingError?: boolean): Promise<T>
  • Async function to execute patched function and being able to catch errors

    Type parameters

    • T

    Parameters

    • execute: () => T

      function to be executed

        • (): T
        • Returns T

    • onFinish: (e: Error | undefined, result: T | undefined) => void

      callback to run when execute finishes

        • (e: Error | undefined, result: T | undefined): void
        • Parameters

          • e: Error | undefined
          • result: T | undefined

          Returns void

    • Optional preventThrowingError: boolean

    Returns Promise<T>

Generated using TypeDoc