Restate Typescript SDK
    Preparing search index...
    interface OpenTelemetryHookOptions {
        additionalAttemptAttributes?:
            | Attributes
            | ((ctx: OpenTelemetryHookContext) => Attributes | undefined);
        additionalRunAttributes?:
            | Attributes
            | (
                (
                    ctx: OpenTelemetryHookContext,
                    name: string,
                ) => Attributes | undefined
            );
        runSpans?: boolean;
        suppressSpanEventsDuringReplay?: boolean;
        tracer: Tracer | ((ctx: OpenTelemetryHookContext) => Tracer);
    }
    Index

    Properties

    additionalAttemptAttributes?:
        | Attributes
        | ((ctx: OpenTelemetryHookContext) => Attributes | undefined)

    Additional attempt span attributes to attach alongside the standard Restate attributes.

    additionalRunAttributes?:
        | Attributes
        | ((ctx: OpenTelemetryHookContext, name: string) => Attributes | undefined)

    Additional ctx.run() span attributes to attach alongside restate.run.name.

    runSpans?: boolean

    When true, create child spans for ctx.run() closures that actually execute. Replayed journaled runs are skipped by the hook system.

    true
    
    suppressSpanEventsDuringReplay?: boolean

    When true, suppress span events added to the attempt span while the invocation is replaying journaled work. Attributes are still recorded.

    This affects only the attempt span; ctx.run() spans are only created when the run closure actually executes.

    true
    
    tracer: Tracer | ((ctx: OpenTelemetryHookContext) => Tracer)

    Tracer used to create Restate spans.

    You can pass a single tracer instance, or resolve one per request (for example to vary the instrumentation scope by service).