Spans
Spans are tasks that your code runs over a period of time (ie. a network / API call)
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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Specifies whether this data is coming from a production source or not.
The name of the dataset you'd like to associate this data to. Not required, but highly recommended.
Body
The end timestamp of the event in JSON format (ie. 2023-11-25T13:08:50.782Z
)
The spanId
. A valid span id is an 8-byte array with at least one non-zero byte.
The start timestamp of the event in JSON format (ie. 2023-11-25T13:08:50.782Z
)
All spans must have a traceId
attached to them.
The type of the span call. For example, this could be API
, DB
, etc.
The value of the span. For example this could be the route that was called, ie. /api/user/name
If an error occurred during this span, you may log the error here. For example this value could be 500 - NullPointerException
Any properties you would like to attach to the span, structured as a string key value map.
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.
Was this page helpful?