Langfuse JS/TS SDKs
    Preparing search index...

    Interface ObservationV2

    An observation from the v2 API with field-group-based selection. Core fields are always present. Other fields are included only when their field group is requested.

    interface ObservationV2 {
        bookmarked?: boolean;
        completionStartTime?: null | string;
        costDetails?: Record<string, number>;
        createdAt?: string;
        endTime: null | string;
        environment?: null | string;
        id: string;
        input?: unknown;
        internalModelId?: null | string;
        latency?: null | number;
        level?: ObservationLevel;
        metadata?: unknown;
        modelId?: null | string;
        modelParameters?: unknown;
        name?: null | string;
        output?: unknown;
        parentObservationId: null | string;
        projectId: string;
        promptId?: null | string;
        promptName?: null | string;
        promptVersion?: null | number;
        providedModelName?: null | string;
        public?: boolean;
        sessionId?: null | string;
        startTime: string;
        statusMessage?: null | string;
        timeToFirstToken?: null | number;
        totalCost?: null | number;
        traceId: null | string;
        type: string;
        updatedAt?: string;
        usageDetails?: Record<string, number>;
        userId?: null | string;
        version?: null | string;
    }
    Index

    Properties

    bookmarked?: boolean

    Whether the observation is bookmarked

    completionStartTime?: null | string

    The completion start time of the observation

    costDetails?: Record<string, number>

    The cost details of the observation. Key is the cost metric name, value is the cost in USD.

    createdAt?: string

    The creation timestamp of the observation

    endTime: null | string

    The end time of the observation

    environment?: null | string

    The environment from which this observation originated

    id: string

    The unique identifier of the observation

    input?: unknown

    The input data of the observation

    internalModelId?: null | string

    The internal model ID matched by Langfuse

    latency?: null | number

    The latency in seconds

    The level of the observation

    metadata?: unknown

    Additional metadata of the observation

    modelId?: null | string

    The matched model ID

    modelParameters?: unknown

    The parameters of the model used for the observation

    name?: null | string

    The name of the observation

    output?: unknown

    The output data of the observation

    parentObservationId: null | string

    The parent observation ID

    projectId: string

    The project ID this observation belongs to

    promptId?: null | string

    The prompt ID associated with the observation

    promptName?: null | string

    The prompt name associated with the observation

    promptVersion?: null | number

    The prompt version associated with the observation

    providedModelName?: null | string

    The model name as provided by the user

    public?: boolean

    Whether the observation is public

    sessionId?: null | string

    The session ID associated with the observation

    startTime: string

    The start time of the observation

    statusMessage?: null | string

    The status message of the observation

    timeToFirstToken?: null | number

    The time to first token in seconds

    totalCost?: null | number

    The total cost of the observation in USD

    traceId: null | string

    The trace ID associated with the observation

    type: string

    The type of the observation (e.g. GENERATION, SPAN, EVENT)

    updatedAt?: string

    The last update timestamp of the observation

    usageDetails?: Record<string, number>

    The usage details of the observation. Key is the usage metric name, value is the number of units consumed.

    userId?: null | string

    The user ID associated with the observation

    version?: null | string

    The version of the observation