List Trace Item Attributes

GET /api/0/organizations/{organization_id_or_slug}/trace-items/attributes/

List the attribute keys available on a given trace item dataset (spans, logs, trace metrics, etc.), with optional substring and structured filtering.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization the resource belongs to.

Query Parameters:

statsPeriod (string)

The period of time for the query, will override the start & end parameters, a number followed by one of:

  • d for days
  • h for hours
  • m for minutes
  • s for seconds
  • w for weeks

For example, 24h, to mean query data starting from 24 hours ago to now.

start (string)

The start of the period of time for the query, expected in ISO-8601 format. For example, 2001-12-14T12:34:56.7890.

end (string)

The end of the period of time for the query, expected in ISO-8601 format. For example, 2001-12-14T12:34:56.7890.

dataset (string)
choices:
  • logs
  • preprod
  • processing_errors
  • spans
  • tracemetrics

The trace item dataset to list attributes for. One of itemType or dataset is required.

itemType (string)
choices:
  • logs
  • preprod
  • processing_errors
  • spans
  • tracemetrics

Deprecated alias of dataset. Use dataset instead.

attributeType (array(string))
choices:
  • boolean
  • number
  • string

Filter to attributes of one or more types. Defaults to all types.

substringMatch (string)

Restrict results to attribute names containing this substring (case-sensitive).

query (string)

Sentry search syntax to filter trace items before computing attributes.

cursor (string)

A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.

Scopes

<auth_token> requires one of the following scopes:
  • org:admin
  • org:read
  • org:write
Copied
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/trace-items/attributes/ \
 -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
Copied
[ { "key": "device.class", "name": "device.class", "attributeSource": { "source_type": "sentry" }, "attributeType": "string" }, { "key": "tags[Batch Size,number]", "name": "Batch Size", "attributeSource": { "source_type": "user" }, "attributeType": "number" } ]
Was this helpful?