mcp-use TypeScript API
    Preparing search index...

    Class ObservabilityManager

    Discovers, configures, and shuts down LangChain observability callbacks.

    Index
    • Add a callback to the custom callbacks list.

      Parameters

      • callback: BaseCallbackHandler

        The callback to add.

      Returns void

    • Clear all custom callbacks.

      Returns void

    • Flush all pending traces to observability platforms. Important for serverless environments and short-lived processes.

      Returns Promise<void>

    • Get the list of callbacks to use.

      Returns Promise<BaseCallbackHandler[]>

      List of callbacks - either custom callbacks if provided, or all available observability handlers.

    • Get the names of available handlers.

      Returns Promise<string[]>

      List of handler names (e.g., ["Langfuse", "Laminar"])

    • Get the current observability status including metadata and tags.

      Returns Promise<ObservabilityStatus>

      Object containing enabled status, callback count, handler names, metadata, and tags.

    • Check if any callbacks are available.

      Returns Promise<boolean>

      True if callbacks are available, False otherwise.

    • Shutdown all handlers gracefully (for serverless environments).

      Returns Promise<void>

    • String representation of the ObservabilityManager.

      Returns string