Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TracedFunction

Package version

An interface representing a function that is traced.

A traced function will automatically create and close tracing ' spans as needed and will handle setting the status / errors as a result of calling the underlying callback.

use createTraceFunction to add tracing to a block of code.

internal

Hierarchy

  • TracedFunction

Callable

  • __call<TOptions, TReturn>(operationName: string, options: TOptions, cb: (options: TOptions, span: Span) => Promise<TReturn>): Promise<TReturn>
  • An interface representing a function that is traced.

    A traced function will automatically create and close tracing ' spans as needed and will handle setting the status / errors as a result of calling the underlying callback.

    use createTraceFunction to add tracing to a block of code.

    internal

    Type parameters

    • TOptions: OperationOptions

    • TReturn

    Parameters

    • operationName: string
    • options: TOptions
    • cb: (options: TOptions, span: Span) => Promise<TReturn>
        • (options: TOptions, span: Span): Promise<TReturn>
        • Parameters

          • options: TOptions
          • span: Span

          Returns Promise<TReturn>

    Returns Promise<TReturn>

Generated using TypeDoc