API Documentation
API Reference
- Inventory
- Resource
- Monitor
- Incident
- Integration
- Organization
- User
- POSTQuery logs
- POSTQuery metrics
- POSTQuery traces
API Reference
Query traces
Retrieve traces based on the specified filters.
POST
/
query
/
traces
curl --request POST \
--url https://api.alerty.ai/query/traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"start_time": "2023-01-01T00:00:00Z",
"end_time": "2023-01-02T00:00:00Z",
"service_name": "<string>",
"span_name": "<string>",
"limit": 100
}'
[
{
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>",
"span_id": "<string>",
"parent_span_id": "<string>",
"trace_state": "<string>",
"span_name": "<string>",
"span_kind": "<string>",
"service_name": "<string>",
"resource_attributes": {},
"scope_name": "<string>",
"scope_version": "<string>",
"span_attributes": {},
"duration": 123,
"status_code": "<string>",
"status_message": "<string>",
"events": [
{
"timestamp": "2023-11-07T05:31:56Z",
"name": "<string>",
"attributes": {}
}
],
"links": [
{
"trace_id": "<string>",
"span_id": "<string>",
"trace_state": "<string>",
"attributes": {}
}
]
}
]
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Traces retrieved
The response is of type object[]
.
curl --request POST \
--url https://api.alerty.ai/query/traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"start_time": "2023-01-01T00:00:00Z",
"end_time": "2023-01-02T00:00:00Z",
"service_name": "<string>",
"span_name": "<string>",
"limit": 100
}'
[
{
"timestamp": "2023-11-07T05:31:56Z",
"trace_id": "<string>",
"span_id": "<string>",
"parent_span_id": "<string>",
"trace_state": "<string>",
"span_name": "<string>",
"span_kind": "<string>",
"service_name": "<string>",
"resource_attributes": {},
"scope_name": "<string>",
"scope_version": "<string>",
"span_attributes": {},
"duration": 123,
"status_code": "<string>",
"status_message": "<string>",
"events": [
{
"timestamp": "2023-11-07T05:31:56Z",
"name": "<string>",
"attributes": {}
}
],
"links": [
{
"trace_id": "<string>",
"span_id": "<string>",
"trace_state": "<string>",
"attributes": {}
}
]
}
]
Assistant
Responses are generated using AI and may contain mistakes.