Telemetry & Webhooks
Relevant source files
The following files were used as context for generating this wiki page:
Telemetry and webhooks provide external triggering and internal monitoring capabilities for the superglue platform. Webhooks allow third-party systems to initiate deterministic workflows, while telemetry captures execution results, errors, and interaction logs for auditing and optimization.
Webhook Architecture
Webhooks serve as an entry point for external systems to trigger superglue tools. When a tool is saved, the system generates a unique webhook URL that accepts POST requests containing a JSON payload.
Webhook Execution Flow
The following sequence diagram illustrates how an external request triggers a tool execution and returns a response.
Webhook Configuration
Webhook triggers are available for saved tools. The URL follows a specific pattern using the tool ID and the organization's API key.
| Component | Description | Format |
|---|---|---|
| Endpoint URL | The target address for POST requests | https://api.superglue.cloud/v1/hooks/{toolId}?token={apiKey} |
| HTTP Method | Required verb for triggering | POST |
| Content-Type | Expected payload format | application/json |
| Security | Authentication method | URL Query Parameter (token) |
Sources: packages/web/src/lib/agent/agent-prompts.ts:145-146, packages/web/src/lib/agent/registries/tool-registry.ts:696-700
Telemetry and Run History
Telemetry monitors the lifecycle of tool executions across all request sources. The system tracks execution status, duration, and detailed step-level results to support debugging and performance analysis.
Request Sources
Telemetry categorizes executions by their origin to differentiate between manual, automated, and system-triggered runs.
- api: Standard REST API calls.
- frontend: Manual runs from the superglue web UI.
- scheduler: Recurring runs triggered by the cron engine.
- mcp: Executions requested by Model Context Protocol clients.
- cli: Runs initiated via the superglue command-line interface.
- tool-chain: Executions triggered as a result of a previous tool's completion.
- webhook: Inbound triggers from external services.
Sources: packages/core/api/response-helpers.ts:107-117, packages/web/src/lib/agent/agent-context.ts:257-270
Execution Statuses
Every run is assigned a status that reflects its current state in the processing pipeline.
| Status | Description |
|---|---|
RUNNING | The tool is currently executing steps. |
SUCCESS | All steps completed and the final output transform succeeded. |
FAILED | An error occurred during execution (API error, timeout, or transform failure). |
ABORTED | The run was manually stopped or terminated by the system. |
Sources: packages/core/api/response-helpers.ts:98-106, packages/web/src/lib/agent/agent-context.ts:245-255
Data Flow for Telemetry
The diagram below shows how execution data is collected and stored across the system.
Monitoring and Investigation
Users and AI agents interact with telemetry data through specific tools and contexts to resolve issues.
Agent Investigation Context
The agent uses telemetry data to explain failures in plain English. It analyzes the toolPayload (input), stepResults (intermediate data), and error fields to identify root causes.
- Webhook Analysis: Checks if the inbound payload matches the
inputSchema. - Scheduler Analysis: Looks for rate limits or expired credentials during recurring runs.
- Tool Chain Analysis: Verifies if data passed from upstream tools matches expected formats.
Sources: packages/web/src/lib/agent/agent-context.ts:272-300, packages/web/src/lib/agent/agent-prompts.ts:40-45
Interaction Logs
Interaction logs provide an append-only audit trail of UI actions taken on a specific tool. These logs allow the telemetry system to distinguish between:
- Manual tool runs vs. agent-triggered actions.
- Testing proposed changes vs. explicit confirmation.
- Partial approval of edits vs. total rejection.
Sources: packages/web/src/lib/agent/agent-prompts.ts:47-52, packages/web/src/lib/agent/registries/tool-registry.ts:550-560
Enterprise Edition (EE) Extensions
In the Enterprise Edition, telemetry and webhooks include advanced features managed under packages/core/api/ee/. These include:
- Metrics: Aggregated performance data across tools.
- Run-Results: Enhanced storage for high-volume execution data.
- Tool-History: Versioned history of tool configuration changes.
- API Key Scopes: Granular access control for webhook and API triggers.
Sources: CLAUDE.md:12-14