Function trace

  • Wraps the code with telemetry and provides a span for configuration.

    Type Parameters

    • T

    Parameters

    • telemetry: {
          contextManager: ContextManager<any>;
          tracer: Tracer<any>;
      }

      telemetry configuration. If undefined, the callback will be executed without telemetry.

    • spanKind: SpanKind

      kind of the span: Producer, Consumer, Internal

    • queueName: string

      queue name

    • operation: string

      operation name (such as add, process, etc)

    • destination: string

      destination name (normally the queue name)

    • callback: ((span?, dstPropagationMetadata?) => T | Promise<T>)

      code to wrap with telemetry

        • (span?, dstPropagationMetadata?): T | Promise<T>
        • Parameters

          • Optional span: Span<any>
          • Optional dstPropagationMetadata: string

          Returns T | Promise<T>

    • Optional srcPropagationMetadata: string

    Returns Promise<T>

Generated using TypeDoc