Langfuse JS/TS SDKs
    Preparing search index...

    Interface GetObservationsRequest

    {}
    
    interface GetObservationsRequest {
        environment?: string | string[];
        filter?: string;
        fromStartTime?: string;
        level?: ObservationLevel;
        limit?: number;
        name?: string;
        page?: number;
        parentObservationId?: string;
        toStartTime?: string;
        traceId?: string;
        type?: string;
        userId?: string;
        version?: string;
    }
    Index

    Properties

    environment?: string | string[]

    Optional filter for observations where the environment is one of the provided values.

    filter?: string

    JSON string containing an array of filter conditions. When provided, this takes precedence over legacy filter parameters (userId, name, sessionId, tags, version, release, environment, fromTimestamp, toTimestamp). Each filter condition has the following structure:

    [
    {
    "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "boolean", "null"
    "column": string, // Required. Column to filter on
    "operator": string, // Required. Operator based on type:
    // - datetime: ">", "<", ">=", "<="
    // - string: "=", "contains", "does not contain", "starts with", "ends with"
    // - stringOptions: "any of", "none of"
    // - categoryOptions: "any of", "none of"
    // - arrayOptions: "any of", "none of", "all of"
    // - number: "=", ">", "<", ">=", "<="
    // - stringObject: "=", "contains", "does not contain", "starts with", "ends with"
    // - numberObject: "=", ">", "<", ">=", "<="
    // - boolean: "=", "<>"
    // - null: "is null", "is not null"
    "value": any, // Required (except for null type). Value to compare against. Type depends on filter type
    "key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata
    }
    ]
    fromStartTime?: string

    Retrieve only observations with a start_time on or after this datetime (ISO 8601).

    Optional filter for observations with a specific level (e.g. "DEBUG", "DEFAULT", "WARNING", "ERROR").

    limit?: number

    Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit.

    name?: string
    page?: number

    Page number, starts at 1.

    parentObservationId?: string
    toStartTime?: string

    Retrieve only observations with a start_time before this datetime (ISO 8601).

    traceId?: string
    type?: string
    userId?: string
    version?: string

    Optional filter to only include observations with a certain version.