Skip to content

feat(telemetry): track error details for all tool calls in Segment #844

@MQ37

Description

@MQ37

Problem

The MCP Tool Call Segment event has a failure_detail field for the actual error message, but only the call-actor tool and the central tool-call catch in src/mcp/server.ts populate it. Other tool failure paths (get-actor-run, fetch-apify-docs) send the event with failure_detail empty — so in Segment we can see that those tools failed, but not why.

Fix

Populate failure_detail (and failure_category where missing) on every tool error path so the Segment event carries the error message consistently across all tools, matching what call-actor already does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-aiIssues owned by the AI team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions