search_spans_tool
Search individual OpenTelemetry spans by service, operation, duration, errors, LLM provider/model, or tags to analyze specific operations and tool calls.
Instructions
Search for individual OpenTelemetry spans with optional filters.
Unlike search_traces, this returns individual spans rather than grouped traces, which is useful for analyzing specific operations or finding spans with certain characteristics (e.g., LLM tool calls with traceloop.span.kind == tool).
Args: service_name: Filter by service name operation_name: Filter by operation/span name start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format min_duration_ms: Minimum span duration in milliseconds max_duration_ms: Maximum span duration in milliseconds gen_ai_system: Filter by LLM provider (e.g., openai, anthropic) gen_ai_request_model: Filter by requested model name (e.g., "gpt-4") gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613") has_error: Filter spans with errors tags: Additional tag filters as key-value pairs filters: Generic filter conditions - list of filter objects with: - field: Field name in dotted notation (e.g., "traceloop.span.kind") - operator: Comparison operator - value: Single value for most operators - values: List of values for "in", "not_in", "between" operators - value_type: Type of value(s) - "string", "number", or "boolean" limit: Maximum number of spans to return (1-1000, default: 100)
Returns: JSON string with span summaries
Example filter to find LLM tool calls: {"field": "traceloop.span.kind", "operator": "equals", "value": "tool", "value_type": "string"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | ||
| limit | No | ||
| filters | No | ||
| end_time | No | ||
| has_error | No | ||
| start_time | No | ||
| service_name | No | ||
| gen_ai_system | No | ||
| operation_name | No | ||
| max_duration_ms | No | ||
| min_duration_ms | No | ||
| gen_ai_request_model | No | ||
| gen_ai_response_model | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |