Deliver OpenClaw observability data to Agent-lens and All-in-One Observability

更新时间:
复制 MD 格式

openclaw-exporter-to-langfuse is an observability plugin for OpenClaw that delivers Agent runtime data to the Agent-lens and All-in-One Observability platforms of ApsaraDB for ClickHouse, enabling full-stack monitoring of your Agent applications.

Observability capabilities

openclaw-exporter-to-langfuse provides two complementary capabilities:

Capability

Data pipeline

Delivery component

Primary use case

Viewing tool

Deliver to Agent-lens

OpenClaw → openclaw-exporter-to-langfuse → Langfuse

openclaw-exporter-to-langfuse

Analyze individual Agent call chains and LLM interaction results

Langfuse

Deliver to All-in-One Observability

OpenClaw → diagnostics-otel → otelcol-contrib → ClickHouse

otelcol-contrib

Analyze OpenClaw runtime metrics, Gateway logs, and overall health status

HyperDX

Open source repository: https://github.com/aliyun/openclaw-exporter-to-langfuse

Limits

  • openclaw-exporter-to-langfuse requires Node.js 18 or later.

  • All-in-One Observability delivery requires the diagnostics-otel plugin. Use OpenClaw v2026.2.19 or later.

  • otelcol-contrib uses ports 4317 and 4318 by default. Ensure these ports are available.

Prerequisites

  • An ApsaraDB for ClickHouse cluster is created with the following information:

    • VPC endpoint

    • Username (for example, openclaw) with read and write permissions

    • Password

  • Unified Observability is enabled for the ClickHouse cluster in the console.

  • The Agent Observability Suite (Agent-lens) is enabled for the ClickHouse cluster, and a project is created with the following information:

    • VPC endpoint

    • Public Key (in the format of pk-lf-xxx)

    • Secret Key (in the format of sk-lf-yyy)

  • OpenClaw is installed and running.

Considerations

  • By default, traces go to Agent-lens. Metrics and logs go to All-in-One Observability.

  • To send traces to All-in-One Observability, add --diag-traces true during installation.

  • Set the ClickHouse cluster time zone to UTC. A non-UTC time zone causes data display anomalies in Agent-lens.

Procedure

Install through OpenClaw

Use the OpenClaw conversational interface to install. OpenClaw auto-detects the local configuration path, installation directory, and runtime environment.

  1. Download the installation instructions

    Enter the following in the OpenClaw chat:

    Download the installation file (overwrite if it already exists): https://ck-langfuse-public.oss-cn-beijing.aliyuncs.com/openclaw-exporter-to-langfuse/INSTALLATION.md, and follow the prompts to install.

    OpenClaw returns the installation parameters.

  2. Configure and install

    Enter the following in the OpenClaw chat, replacing placeholders with your values:

    Install both openclaw-exporter-to-langfuse and otelcol-contrib.
    
    openclaw-exporter-to-langfuse configuration:
    endpoint = http://<LANGFUSE_ENDPOINT>:3000/api/public/otel/v1/traces
    pk = <PK>
    sk = <SK>
    serviceName = <SERVICE_NAME>
    debug = true
    
    otelcol-contrib configuration:
    ck-endpoint = http://<CK_ENDPOINT>:8123
    username = <USERNAME>
    password = <PASSWORD>

    Parameters:

    Parameter

    Description

    endpoint

    Langfuse trace endpoint. Replace <LANGFUSE_ENDPOINT> with the Agent-lens VPC endpoint.

    pk

    Public key of the Agent-lens project.

    sk

    Secret key of the Agent-lens project.

    serviceName

    Name of the Agent service. Identifies the data source.

    debug

    Enables debug logging. Set to true during initial setup or troubleshooting.

    ck-endpoint

    ClickHouse cluster endpoint. Replace <CK_ENDPOINT> with the cluster VPC endpoint.

    username

    Username for the ClickHouse cluster.

    password

    Password for the ClickHouse cluster.

    When OpenClaw returns a success message, both openclaw-exporter-to-langfuse and otelcol-contrib are configured.

  3. Verify the installation

    Enter the following in the OpenClaw chat:

    View the configuration of both components

    The expected output includes:

    • openclaw-exporter-to-langfuse (Langfuse plugin): enabled is true, with the configured endpoint, authorization, and serviceName values.

    • diagnostics-otel + otelcol-contrib (All-in-One Observability): diagnostics-otel is enabled with its endpoint, and otelcol-contrib is running with gRPC/HTTP receiver ports and ClickHouse endpoint.

    Both components showing as enabled with correct parameters confirms a successful installation.

Verify data synchronization

View traces in Agent-lens

  1. Log on to the Agent-lens console.

  2. Open the target project.

  3. Open the Traces page.

  4. Start an Agent conversation in OpenClaw.

  5. Verify that a new trace record appears.

New trace records appear in the Traces list. Click a trace to view the call chain tree (nodes such as enter_openclaw_system, invoke_agent_main, and tool_call), with latency, token consumption, input/output, and LLM interaction details per node.

Verify data in ClickHouse

Run the following SQL statements in ClickHouse to verify data ingestion:

SHOW DATABASES;

SHOW TABLES FROM clickobserve_service;

SELECT count() FROM clickobserve_service.otel_logs;

SELECT count() FROM clickobserve_service.otel_metrics_sum;

Analyze data in All-in-One Observability

  1. Log on to the All-in-One Observability console.

  2. Use AI Notebook to analyze data.

Example query:

Show OpenClaw error logs from the past 1 hour

AI Notebook interprets the query, generates SQL, and returns results with timestamps, sources, and log content.

FAQ

Traces are not visible in All-in-One Observability

By default, traces go only to Langfuse (Agent-lens). To also send them to All-in-One Observability, reinstall the plugin with:

--diag-traces true