Reference · Gateway API
Tracing — Gateway API
1 operation of the GebSecure Gateway API (0.1.0), generated from docs/openapi/gateway.json.
Base URL: https://gateway.gebsecure.com · OpenAPI 3.1.0 · contract version 0.1.0 · generated from docs/openapi/gateway.json.
POST /v1/traces/spans#
Report agent-side spans
- Endpoint:
POST https://gateway.gebsecure.com/v1/traces/spans - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication - SDK: TypeScript
reportSpans· Pythonreport_spans· GoReportSpans· JavareportSpans· .NETReportSpansAsync
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
spans |
array | yes | items 1–500 |
spans[].traceId |
string | yes | |
spans[].spanId |
string | yes | |
spans[].parentSpanId |
string | null | ||
spans[].name |
string | yes | length 1–200 |
spans[].kind |
"server" | "client" | "internal" | "producer" | "consumer" | default "internal" |
|
spans[].startTime |
string (date-time) | yes | |
spans[].durationMs |
number | yes | range 0–86400000 |
spans[].status |
"unset" | "ok" | "error" | default "unset" |
|
spans[].statusMessage |
string | null | ||
spans[].attributes |
map<string, string | number | boolean | null> | default {} |
|
spans[].events |
array | default []; items 0–64 |
|
spans[].events[].name |
string | yes | length 0–200 |
spans[].events[].time |
string (date-time) | yes | |
spans[].events[].attributes |
map<string, string | number | boolean | null> | default {} |
Responses
200— Default Response
Response body: ReportSpansResult
| Field | Type | Required | Notes |
|---|---|---|---|
accepted |
integer | yes | |
rejected |
integer | yes |
Errors are application/problem+json (error model).
bash
curl -X POST "$GEBSECURE_GATEWAY_URL/v1/traces/spans" \
-H "Authorization: Bearer $GEBSECURE_TOKEN" \
-H 'content-type: application/json' \
-d '{"spans":[{"traceId":"<string>","spanId":"<string>","name":"<string>","startTime":"<date-time>","durationMs":0}]}'