Exception Attributes

4 attributes in this category. 4 stable

Stable Attributes

exception.escaped

boolean PII: False OTel: True

SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.

Example true
Raw JSON
{
  "key": "exception.escaped",
  "brief": "SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.",
  "type": "boolean",
  "pii": {
    "key": "false"
  },
  "is_in_otel": true,
  "example": true
}

exception.message

string PII: Maybe OTel: True

The error message.

Example ENOENT: no such file or directory
Raw JSON
{
  "key": "exception.message",
  "brief": "The error message.",
  "type": "string",
  "pii": {
    "key": "maybe"
  },
  "is_in_otel": true,
  "example": "ENOENT: no such file or directory"
}

exception.stacktrace

string PII: Maybe OTel: True

A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.

Example Exception in thread "main" java.lang.RuntimeException: Test exception at com.example.GenerateTrace.methodB(GenerateTrace.java:13) at com.example.GenerateTrace.methodA(GenerateTrace.java:9) at com.example.GenerateTrace.main(GenerateTrace.java:5)
Raw JSON
{
  "key": "exception.stacktrace",
  "brief": "A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.",
  "type": "string",
  "pii": {
    "key": "maybe"
  },
  "is_in_otel": true,
  "example": "Exception in thread \"main\" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)"
}

exception.type

string PII: Maybe OTel: True

The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.

Example OSError
Raw JSON
{
  "key": "exception.type",
  "brief": "The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.",
  "type": "string",
  "pii": {
    "key": "maybe"
  },
  "is_in_otel": true,
  "example": "OSError"
}