Attributes

This document defines the format used by Sentry to represent attributes across different telemetry data types (Spans, Logs, Metrics).

Attributes are stored as key-value pairs where each value is an object with type information.

Copied
{
  "my_attribute": {
    "value": "some value",
    "type": "string"
  },
  "response_time": {
    "value": 123,
    "unit": "millisecond",
    "type": "integer"
  },
  "my_list": {
    "value": [1, 2, 3],
    "type": "array"
  }
}

PropertyTypeRequiredDescription
typestringYesThe data type of the attribute value.
valueanyYesThe actual attribute value, must match the specified type.
unitstringNoThe unit of the attribute value. See Units for a full list of supported units.

The following primitive types are supported:

  • string
  • boolean
  • integer (64-bit signed integer)
  • double (64-bit floating point number)

Note on Integers: Integers should be 64-bit signed integers. For 64-bit unsigned integers, use the string type to avoid overflow issues until unsigned integers are natively supported.

Sentry currently only supports ingesting homogeneous arrays of primitive types as attribute values, using the array type.

Objects and mixed/nested arrays are not supported and will be dropped, but will eventually be supported.

Units are currently not supported and not visible in the product.

  • nanosecond
  • microsecond
  • millisecond
  • second
  • minute
  • hour
  • day
  • week

  • bit
  • byte
  • kilobyte
  • kibibyte
  • megabyte
  • mebibyte
  • gigabyte
  • gibibyte
  • terabyte
  • tebibyte
  • petabyte
  • pebibyte
  • exabyte
  • exbibyte

  • ratio
  • percent

See Sentry Conventions for a full list of supported attributes.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").