POST
/
v2
/
spans

This is an advanced feature. We recommend exploring our SDKs and other integrations first before implementing a direct integration with our API endpoint. The most common use case for this endpoint is to send errors and tracked events from mobile and iOS devices.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-PzProd
boolean
required

Specifies whether this data is coming from a production source or not.

X-PzBucket
string
required

The name of the dataset you'd like to associate this data to. Not required, but highly recommended.

Body

application/json · object[]
id
string
required

The spanId. A valid span id is an 8-byte array with at least one non-zero byte.

traceId
string
required

All spans must have a traceId attached to them.

spanId
string

Spans can be organized in a tree structure. This property represents the id of the parent span, if one exists. A good example of where this hierarchy is useful is a database call made to service a REST API call from the client.

type
string
required

The type of the span call. For example, this could be API, DB, etc.

value
string
required

The value of the span. For example this could be the route that was called, ie. /api/user/name

start
string
required

The start timestamp of the event in JSON format (ie. 2023-11-25T13:08:50.782Z)

end
string
required

The end timestamp of the event in JSON format (ie. 2023-11-25T13:08:50.782Z)

error
string

If an error occurred during this span, you may log the error here. For example this value could be 500 - NullPointerException

properties
object

Any properties you would like to attach to the span, structured as a string key value map.