Skip to main content
POST
/
v1
/
traces
Receive traces
curl --request POST \
  --url https://gateway-api.unomiq.com/v1/traces \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "resourceSpans": [
    {
      "resource": {
        "attributes": [
          {
            "key": "service.name",
            "value": {
              "stringValue": "my-service"
            }
          },
          {
            "key": "service.version",
            "value": {
              "stringValue": "1.0.0"
            }
          }
        ]
      },
      "scopeSpans": [
        {
          "scope": {
            "name": "my-instrumentation-library",
            "version": "1.0.0"
          },
          "spans": [
            {
              "traceId": "5B8EFFF798038103D269B633813FC60C",
              "spanId": "EEE19B7EC3C1B174",
              "parentSpanId": "EEE19B7EC3C1B173",
              "name": "GET /api/users",
              "kind": 2,
              "startTimeUnixNano": "1544712660000000000",
              "endTimeUnixNano": "1544712661000000000",
              "attributes": [
                {
                  "key": "http.method",
                  "value": {
                    "stringValue": "GET"
                  }
                },
                {
                  "key": "http.url",
                  "value": {
                    "stringValue": "https://api.example.com/users"
                  }
                },
                {
                  "key": "http.status_code",
                  "value": {
                    "intValue": 200
                  }
                }
              ],
              "status": {
                "code": 0
              }
            }
          ]
        }
      ]
    }
  ]
}
'
{
"partialSuccess": {
"rejectedSpans": 0,
"errorMessage": ""
}
}

Authorizations

Authorization
string
header
required

OAuth2/OIDC JWT token with required claims:

  • sub: User ID (mapped to unomiq_user.id)
  • otel-collector/app_id: App ID (mapped to unomiq_app.id, custom claim)

Headers

Content-Type
enum<string>
required

Content type of the request body

Available options:
application/json

Body

application/json

OTLP ExportTraceServiceRequest. The request body follows the standard OTLP/HTTP JSON format. See https://opentelemetry.io/docs/specs/otlp/#otlphttp-request for the full schema.

resourceSpans
object[]

Array of ResourceSpans as defined by the OTLP specification

Response

Traces accepted successfully

OTLP ExportTraceServiceResponse. See https://opentelemetry.io/docs/specs/otlp/#otlphttp-response for the full schema.

partialSuccess
object