Application error events
Exception (error) tracking captures any unhandled exceptions within the application.
All tracked events are self-describing events that follow the application_error
schema.
application_error
EventSchema URIiglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-2
Tracker compatibility
Web: ✅Mobile: ✅Tracked automatically: ✅
Example
{
"programmingLanguage": "JAVA",
"message": "java.lang.OutOfMemoryError error raised",
"exceptionName": "java.lang.OutOfMemoryError",
"isFatal": true,
"threadName": "main",
"threadId": 1,
"lineNumber": 10,
"className": "android.graphics.BitmapFactory",
"stackTrace": "java.lang.OutOfMemoryError"
}
Schema
- Table
- JSON schema
Property | Description |
---|---|
programmingLanguage string | Required. Must be one of: JAVA , SCALA , KOTLIN , GROOVY , RUBY , GOLANG , JAVASCRIPT , PHP , PYTHON , OBJECTIVEC , SWIFT , C , CPLUSPLUS , CSHARP , ACTIONSCRIPT , LUA , RUST , HASKELL , CLOJURE , ERLANG , ELIXIR , CRYSTAL , PONY , NIM |
message string | Required. |
threadName string | Optional. |
threadId integer | Optional. |
stackTrace string | Optional. |
causeStackTrace string | Optional. |
lineNumber integer | Optional. |
className string | Optional. |
exceptionName string | Optional. |
isFatal boolean | Optional. |
lineColumn integer | Optional. |
fileName string | Optional. |
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for an application error",
"self": {
"vendor": "com.snowplowanalytics.snowplow",
"name": "application_error",
"format": "jsonschema",
"version": "1-0-2"
},
"type": "object",
"properties": {
"programmingLanguage": {
"type": "string",
"enum": [
"JAVA",
"SCALA",
"KOTLIN",
"GROOVY",
"RUBY",
"GOLANG",
"JAVASCRIPT",
"PHP",
"PYTHON",
"OBJECTIVEC",
"SWIFT",
"C",
"CPLUSPLUS",
"CSHARP",
"ACTIONSCRIPT",
"LUA",
"RUST",
"HASKELL",
"CLOJURE",
"ERLANG",
"ELIXIR",
"CRYSTAL",
"PONY",
"NIM"
]
},
"message": {
"type": "string",
"maxLength": 2048
},
"threadName": {
"type": [
"string",
"null"
],
"maxLength": 1024
},
"threadId": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 2147483647
},
"stackTrace": {
"type": [
"string",
"null"
],
"maxLength": 8192
},
"causeStackTrace": {
"type": [
"string",
"null"
],
"maxLength": 8192
},
"lineNumber": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 2147483647
},
"className": {
"type": [
"string",
"null"
],
"maxLength": 1024
},
"exceptionName": {
"type": [
"string",
"null"
],
"maxLength": 1024
},
"isFatal": {
"type": [
"boolean",
"null"
]
},
"lineColumn": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 2147483647
},
"fileName": {
"type": [
"string",
"null"
],
"maxLength": 1024
}
},
"required": [
"programmingLanguage",
"message"
],
"additionalProperties": false
}
Warehouse query
- Snowflake
- BigQuery
- Databricks
- Redshift & Postgres
select
unstruct_event_com_snowplowanalytics_snowplow_application_error_1 application_error_1
from
atomic.events
where
events.collector_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'application_error'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
select
unstruct_event_com_snowplowanalytics_snowplow_application_error_1_0_2
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'application_error'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
select
unstruct_event_com_snowplowanalytics_snowplow_application_error_1
from
atomic.events events
where
events.collector_tstamp > timestampadd(HOUR, -1, current_timestamp())
and events.event = 'unstruct'
and events.event_name = 'application_error'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
and unstruct_event_com_snowplowanalytics_snowplow_application_error_1 is not null
select
"application_error_1".*
from
atomic.events events
join atomic.com_snowplowanalytics_snowplow_application_error_1 "application_error_1"
on "application_error_1".root_id = events.event_id and "application_error_1".root_tstamp = events.collector_tstamp
where
events.collector_tstamp > getdate() - interval '1 hour'
and "application_error_1".root_tstamp > getdate() - interval '1 hour'
and events.event = 'unstruct'
and events.event_name = 'application_error'
and events.event_vendor = 'com.snowplowanalytics.snowplow'
How to track?
Both our Web and mobile trackers provide an automatic exception tracking feature. Visit the following links to learn more about error tracking: