Checks

Get the trace set-up for a monitor

The exact steps to make a tool send OpenTelemetry traces, metrics and logs to this monitor: what to write and where, the shell to run, a test span to send and where it lands, and what the tool cannot do. One block per tool (Claude Code, Codex CLI, Gemini CLI, Cursor, a Python agent, a Node agent, any OpenTelemetry SDK, an OpenTelemetry Collector), plus the tracing section of the protocol prompt, written for an agent to carry out itself.

This is what the MCP get_trace_setup tool returns. It never contains a key: the blocks name the tracing key by a placeholder, and POST /api/v1/checks/{id}/ingest-keys mints one.

404 if the check does not exist in the authenticated project (no existence oracle).

get/api/v1/checks/{id}/trace-setup

Request

  • Base URL: https://app.lastping.dev
  • URL: https://app.lastping.dev/api/v1/checks/{id}/trace-setup
  • Auth: API key in header X-Api-Key

Query parameters

tool'claude-code' | 'codex' | 'gemini' | 'antigravity' | 'cursor' | 'python' | 'node' | 'otel-sdk' | 'collector'

One tool's block and the prompt tailored to it. Omit for every block.

Response

The set-up for this monitor.

toolstring required

The tool asked for, or an empty string when every block was returned.

promptstring required

The tracing section of the protocol prompt, written to an agent: tailored to tool when one was given, otherwise the form that names every block. Paste it into the agent, or let an agent connected over MCP read it from get_trace_setup.

Example response

{
  "tool": "claude-code",
  "blocks": [
    {
      "title": "Claude Code",
      "files": [
        {
          "path": "~/.claude/settings.json",
          "language": "json"
        }
      ],
      "bang_command": "sh ~/.lastping/setup-claude-code.sh",
      "bang_script": {
        "path": "~/.claude/settings.json",
        "language": "json"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.