POST/v1/traces
Export OpenTelemetry traces
Requires an API token with LOGS:SEND. Supports gzip compression.
Body parameters
resourceSpans:array | nulloptional
resource:object | nulloptional
schemaUrl:string | nulloptional
scopeSpans:array | nulloptional
scope:object | nulloptional
schemaUrl:string | nulloptional
spans:array | nulloptional
traceId:string
spanId:string
parentSpanId:string | nulloptional
traceState:string | nulloptional
flags:integer | nulloptional
name:string
kind:integer | nulloptional
startTimeUnixNano:any
*anonymous*:stringoptional
*anonymous*:integeroptional
endTimeUnixNano:any
*anonymous*:stringoptional
*anonymous*:integeroptional
attributes:array | nulloptional
key:string
value:anyoptional
droppedAttributesCount:integer | nulloptional
events:array | nulloptional
timeUnixNano:any
*anonymous*:stringoptional
*anonymous*:integeroptional
name:string
attributes:array | nulloptional
key:string
value:anyoptional
droppedAttributesCount:integer | nulloptional
droppedEventsCount:integer | nulloptional
links:array | nulloptional
traceId:string
spanId:string
traceState:string | nulloptional
attributes:array | nulloptional
key:string
value:anyoptional
droppedAttributesCount:integer | nulloptional
flags:integer | nulloptional
droppedLinksCount:integer | nulloptional
status:object | nulloptional
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | OTLP full success, in the request encoding |
| 400 | Bad Request | Invalid OTLP export |
| 401 | Unauthorized | Missing or invalid API token |
| 403 | Forbidden | Requires an explicit LOGS:SEND grant |
| 405 | Method Not Allowed | Requires POST |
| 413 | Payload Too Large | Export or record exceeds a size limit |
| 415 | Unsupported Media Type | Unsupported content type or compression |
| 429 | Too Many Requests | Shared logs and traces ingestion allowance exceeded |
| 503 | Service Unavailable | Ingestion unavailable or delivery not confirmed |
Request
POST
/v1/tracescurl --request POST \
--url https://api.onlineornot.com/v1/traces \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"resourceSpans":[{"resource":{"attributes":[{"key":"string","value":null}],"droppedAttributesCount":4294967295},"schemaUrl":"string","scopeSpans":[{"scope":{"attributes":[{"key":"string","value":null}],"droppedAttributesCount":4294967295,"name":"string","version":"string"},"schemaUrl":"string","spans":[{"traceId":"string","spanId":"string","parentSpanId":"string","traceState":"string","flags":4294967295,"name":"string","kind":5,"startTimeUnixNano":"string","endTimeUnixNano":"string","attributes":[{"key":"string","value":null}],"droppedAttributesCount":4294967295,"events":[{"timeUnixNano":"string","name":"string","attributes":[{"key":"string","value":null}],"droppedAttributesCount":4294967295}],"droppedEventsCount":4294967295,"links":[{"traceId":"string","spanId":"string","traceState":"string","attributes":[{"key":"string","value":null}],"droppedAttributesCount":4294967295,"flags":4294967295}],"droppedLinksCount":4294967295,"status":{"code":2,"message":"string"}}]}]}]}'
Response
{}
Response Headers
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 429 | Retry-After | integer | Seconds until the next billing period |
GET/v1/traces
Search spans
Search spans by receipt time, optionally filtered to a trace ID. Traces and logs share the monthly ingestion allowance and 30-day retention.
Requires LOGS:READ.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Query parameters
from:string(date-time)
Inclusive server receipt time, in RFC 3339 format.
to:string(date-time)
Exclusive server receipt time, at most one hour after from.
limit:integeroptional
Default: 50
cursor:stringoptional
project_id:anyoptional
service:stringoptional
environment:stringoptional
trace_id:stringoptional
status_code:stringoptional
Accepted values: "0" | "1" | "2"
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Matching spans and a continuation cursor |
| 400 | Bad Request | Invalid or unbounded search request |
| 401 | Unauthorized | Missing or invalid credentials |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Project not found |
| 500 | Internal Server Error | Internal server error |
| 503 | Service Unavailable | Trace search unavailable |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]
Request
GET
/v1/tracescurl --request GET \
--url 'https://api.onlineornot.com/v1/traces?from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"spans": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": "string",
"received_at": "2019-08-24T14:15:22Z",
"trace_id": "string",
"span_id": "string",
"parent_span_id": "string",
"name": "string",
"service": "string",
"environment": "string",
"kind": 0,
"start_time_unix_nano": "string",
"end_time_unix_nano": "string",
"duration_ms": 0,
"status_code": 0,
"status_message": "string",
"trace_state": "string",
"flags": 0,
"attributes": {
"property1": {},
"property2": {}
},
"resource": {
"property1": {},
"property2": {}
},
"scope": {
"property1": {},
"property2": {}
},
"events": [
{}
],
"links": [
{}
],
"dropped_attributes_count": 0,
"dropped_events_count": 0,
"dropped_links_count": 0
}
],
"next_cursor": "string",
"scanned_bytes": 0
},
"success": true,
"errors": [],
"messages": []
}