Type Alias TraceableConfig<Func>

TraceableConfig: {
    name: undefined | string;
    aggregator?: undefined | (args: any[]) => any;
    argsConfigPath?: undefined | [number] | [number, string];
    attachments?: undefined | Attachments;
    child_execution_order?: undefined | number;
    child_runs?: undefined | RunTree[];
    client?: undefined | Client;
    dotted_order?: undefined | string;
    end_time?: undefined | number;
    error?: undefined | string;
    execution_order?: undefined | number;
    extra?: undefined | KVMap;
    extractAttachments?:
        | undefined
        | (...args: Parameters<Func>) => [undefined | Attachments, KVMap];
    getInvocationParams?:
        | undefined
        | (...args: Parameters<Func>) => undefined | InvocationParamsSchema;
    id?: undefined | string;
    metadata?: undefined | KVMap;
    on_end?: undefined | (runTree: RunTree) => void;
    parent_run?: undefined | RunTree;
    parent_run_id?: undefined | string;
    processInputs?: undefined | (inputs: Readonly<KVMap>) => KVMap;
    processOutputs?: undefined | (outputs: Readonly<KVMap>) => KVMap;
    project_name?: undefined | string;
    reference_example_id?: undefined | string;
    replicas?: undefined | [string, undefined | KVMap][];
    run_type?: undefined | string;
    serialized?: undefined | object;
    start_time?: undefined | number;
    tags?: undefined | string[];
    trace_id?: undefined | string;
    tracer?: undefined | OTELTracer;
    tracingEnabled?: undefined | boolean;
}

Type Parameters

  • Func extends (...args: any[]) => any

Type declaration

  • name: undefined | string
  • Optionalaggregator?: undefined | (args: any[]) => any
  • OptionalargsConfigPath?: undefined | [number] | [number, string]
  • Optionalattachments?: undefined | Attachments
  • Optionalchild_execution_order?: undefined | number
  • Optionalchild_runs?: undefined | RunTree[]
  • Optionalclient?: undefined | Client
  • Optionaldotted_order?: undefined | string
  • Optionalend_time?: undefined | number
  • Optionalerror?: undefined | string
  • Optionalexecution_order?: undefined | number
  • Optionalextra?: undefined | KVMap
  • OptionalextractAttachments?: undefined | (...args: Parameters<Func>) => [undefined | Attachments, KVMap]

    Extract attachments from args and return remaining args.

  • OptionalgetInvocationParams?: undefined | (...args: Parameters<Func>) => undefined | InvocationParamsSchema

    Extract invocation parameters from the arguments of the traced function. This is useful for LangSmith to properly track common metadata like provider, model name and temperature.

  • Optionalid?: undefined | string
  • Optionalmetadata?: undefined | KVMap
  • Optionalon_end?: undefined | (runTree: RunTree) => void
  • Optionalparent_run?: undefined | RunTree
  • Optionalparent_run_id?: undefined | string
  • OptionalprocessInputs?: undefined | (inputs: Readonly<KVMap>) => KVMap

    Apply transformations to the inputs before logging. This function should NOT mutate the inputs. processInputs is not inherited by nested traceable functions.

  • OptionalprocessOutputs?: undefined | (outputs: Readonly<KVMap>) => KVMap

    Apply transformations to the outputs before logging. This function should NOT mutate the outputs. processOutputs is not inherited by nested traceable functions.

  • Optionalproject_name?: undefined | string
  • Optionalreference_example_id?: undefined | string
  • Optionalreplicas?: undefined | [string, undefined | KVMap][]
  • Optionalrun_type?: undefined | string
  • Optionalserialized?: undefined | object
  • Optionalstart_time?: undefined | number
  • Optionaltags?: undefined | string[]
  • Optionaltrace_id?: undefined | string
  • Optionaltracer?: undefined | OTELTracer
  • OptionaltracingEnabled?: undefined | boolean