Skip to content

docs(api): get spans #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions api-reference/dwh/get_spans.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "Get Spans"
api: "GET https://api.traceloop.com/api/v2/warehouse/spans"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
api: "GET https://api.traceloop.com/api/v2/warehouse/spans"
api: "GET https://api.traceloop.com/v2/warehouse/spans"

---

Get raw spans from the traceloop's datawarehouse, filtered by specific attributes.


## Request Parameters

<ParamField query="from_timestamp" type="int64">
From timestamp in milliseconds.
</ParamField>

<ParamField query="limit" type="int">
Maximum number of results to return. Default is 50, maximum is 1000.
</ParamField>

<ParamField query="cursor" type="int">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent types: cursor is defined as int but next_cursor in the response is a string. Clarify if this conversion is intentional.

Pagination cursor. Default is 0.
</ParamField>

<ParamField query="workflow" type="string">
Filter spans by workflow name.
</ParamField>

## Response

<ResponseField name="data" type="SpanDto[]">
Array of span data objects.
</ResponseField>

<ResponseField name="page_size" type="int">
Number of items returned in the current page.
</ResponseField>

<ResponseField name="total_results" type="int64">
Total number of results available.
</ResponseField>

<ResponseField name="next_cursor" type="string">
Cursor for the next page of results.
</ResponseField>
8 changes: 5 additions & 3 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@
"group": "API Reference",
"pages": ["api-reference/introduction"]
},
{
"group": "Data Warehouse",
"pages": ["api-reference/dwh/get_spans"]
},
{
"group": "Tracing",
"pages": [
Expand All @@ -182,9 +186,7 @@
},
{
"group": "Costs",
"pages": [
"api-reference/costs/property_costs"
]
"pages": ["api-reference/costs/property_costs"]
}
],
"redirects": [
Expand Down