Investigate Cost Spike
investigate_cost_spikeCompare recent LLM spending with a baseline and rank the models or services contributing most to the spike.
Instructions
Investigate an LLM cost spike: compare a recent window against a baseline and rank which models/services contributed most to the change.
On-request/pull-based analysis, not a push alert - mirrors SigNoz's own "investigate telemetry cost" skill. Call this when you suspect (or want to check for) a cost increase, rather than polling get_llm_usage by hand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of traces to analyze per window (default: 1000) | |
| top_n | No | Maximum ranked contributors to return per breakdown (default: 5, max: 50) | |
| recent_end | Yes | Recent window end time in ISO 8601 format | |
| baseline_end | No | Baseline window end (ISO 8601) | |
| recent_start | Yes | Recent window start time in ISO 8601 format | |
| service_name | No | Filter by service name (applied to both windows) | |
| gen_ai_system | No | Filter by LLM provider (applied to both windows) | |
| baseline_start | No | Baseline window start (ISO 8601). If omitted along with baseline_end, auto-computed as the same duration immediately preceding recent_start. | |
| gen_ai_request_model | No | Filter by requested model name (applied to both windows) | |
| gen_ai_response_model | No | Filter by actual model used (applied to both windows) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |