get_traces
Fetch traces from Langfuse analytics with flexible filtering by time, cost, user, tags, and environment to analyze usage patterns and performance.
Instructions
Fetch traces with flexible filtering options.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Start timestamp (ISO 8601) | |
| to | No | End timestamp (ISO 8601) | |
| limit | No | Maximum number of traces to return (default: 25) | |
| orderBy | No | Field to order by (default: timestamp) | |
| orderDirection | No | Order direction (default: desc) | |
| userId | No | Filter by user ID | |
| name | No | Filter by trace name (substring match) | |
| tags | No | Filter by tags | |
| environment | No | Filter by environment | |
| minCost | No | Minimum cost filter | |
| maxCost | No | Maximum cost filter |
Input Schema (JSON Schema)
{
"properties": {
"environment": {
"description": "Filter by environment",
"type": "string"
},
"from": {
"description": "Start timestamp (ISO 8601)",
"format": "date-time",
"type": "string"
},
"limit": {
"description": "Maximum number of traces to return (default: 25)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"maxCost": {
"description": "Maximum cost filter",
"type": "number"
},
"minCost": {
"description": "Minimum cost filter",
"type": "number"
},
"name": {
"description": "Filter by trace name (substring match)",
"type": "string"
},
"orderBy": {
"description": "Field to order by (default: timestamp)",
"enum": [
"timestamp",
"totalCost",
"totalTokens"
],
"type": "string"
},
"orderDirection": {
"description": "Order direction (default: desc)",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"tags": {
"description": "Filter by tags",
"items": {
"type": "string"
},
"type": "array"
},
"to": {
"description": "End timestamp (ISO 8601)",
"format": "date-time",
"type": "string"
},
"userId": {
"description": "Filter by user ID",
"type": "string"
}
},
"type": "object"
}