Langfuse JS/TS SDKs
    Preparing search index...

    Interface Observation

    interface Observation {
        completionStartTime?: string;
        costDetails?: Record<string, number>;
        endTime?: string;
        environment?: string;
        id: string;
        input?: unknown;
        level: ObservationLevel;
        metadata?: unknown;
        model?: string;
        modelParameters?: Record<string, MapValue>;
        name?: string;
        output?: unknown;
        parentObservationId?: string;
        promptId?: string;
        startTime: string;
        statusMessage?: string;
        traceId?: string;
        type: string;
        usage?: Usage;
        usageDetails?: Record<string, number>;
        version?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    completionStartTime?: string

    The completion start time of the observation

    costDetails?: Record<string, number>

    The cost details of the observation. Key is the name of the cost metric, value is the cost in USD. The total key is the sum of all (non-total) cost metrics or the total value ingested.

    endTime?: string

    The end time of the observation.

    environment?: string

    The environment from which this observation originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.

    id: string

    The unique identifier of the observation

    input?: unknown

    The input data of the observation

    The level of the observation

    metadata?: unknown

    Additional metadata of the observation

    model?: string

    The model used for the observation

    modelParameters?: Record<string, MapValue>

    The parameters of the model used for the observation

    name?: string

    The name of the observation

    output?: unknown

    The output data of the observation

    parentObservationId?: string

    The parent observation ID

    promptId?: string

    The prompt ID associated with the observation

    startTime: string

    The start time of the observation

    statusMessage?: string

    The status message of the observation

    traceId?: string

    The trace ID associated with the observation

    type: string

    The type of the observation

    usage?: Usage

    (Deprecated. Use usageDetails and costDetails instead.) The usage data of the observation

    usageDetails?: Record<string, number>

    The usage details of the observation. Key is the name of the usage metric, value is the number of units consumed. The total key is the sum of all (non-total) usage metrics or the total value ingested.

    version?: string

    The version of the observation