Skip to content

Commit 1103984

Browse files
Merge pull request #80 from openobserve/docs-1
updated the traces search api
2 parents 920e4fe + cf266e0 commit 1103984

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/api/traces/trace-search-api.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,25 @@ SELECT * FROM default WHERE trace_id = {trace_id} ORDER BY start_time
8686
8787
**Note:** Traces do not support full SQL queries in the traces interface, however, the search API supports SQL for trace data when needed for complex queries.
8888
89+
**Example:**
90+
```sql
91+
{
92+
"query": {
93+
"sql": "SELECT * FROM default WHERE trace_id = b1eeb579ae863bdf9408e7d64c02d5d1" ORDER BY start_time,
94+
"start_time": 1751443100969000,
95+
"end_time": 1751444000969000,
96+
"from": 0,
97+
"size": 25
98+
},
99+
"search_type": "ui",
100+
"timeout": 0
101+
}
102+
```
103+
**Note:**
104+
105+
- When `size` is set to `25`, only the first `25` spans for the trace are returned.
106+
- To retrieve all spans, set `size` to `-1`. In this case, you do not need to define the `from` parameter.
107+
89108
## Error Handling
90109
91110
Common HTTP Status Codes:

0 commit comments

Comments
 (0)