Metis — Log Span
log_spanRecord a completed span for retrospective timing data, such as query duration, in a single call with optional session and run identifiers.
Instructions
Record a completed span in one call (no separate start/end needed).
Useful for logging retrospective timing data (e.g. 'that DB query took 42ms').
Args:
name: Span label.
duration_ms: How long the work took in milliseconds.
kind: 'internal' | 'tool' | 'agent' | 'llm'. Default: 'internal'.
session_id: Session identifier. Optional.
run_id: FK to agent_runs. Optional.
parent_id: Parent span_id. Optional.
status: 'ok' | 'error'. Default: 'ok'.
tags: JSON string of metadata. Optional.
Returns the new span_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | internal | |
| name | Yes | ||
| tags | No | ||
| run_id | No | ||
| status | No | ok | |
| parent_id | No | ||
| session_id | No | ||
| duration_ms | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |