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.
Event: application_error
Schema for an application error
Schema URI:iglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-2
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 properties definition
- Table
- JSON schema
Property | Type | Description | Required? |
---|---|---|---|
programmingLanguage | 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" | โ | |
threadName | ["string","null"] | โ | |
threadId | ["integer","null"] | โ | |
stackTrace | ["string","null"] | โ | |
causeStackTrace | ["string","null"] | โ | |
lineNumber | ["integer","null"] | โ | |
className | ["string","null"] | โ | |
exceptionName | ["string","null"] | โ | |
isFatal | ["boolean","null"] | โ | |
lineColumn | ["integer","null"] | โ | |
fileName | ["string","null"] | โ |
{
"$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
}
โ How to query the event in the warehouse?
- 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: