Skip to content

Commit

Permalink
adding caller to error metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGHSeg committed Nov 22, 2024
1 parent eb2860a commit ef81220
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ open class Analytics protected constructor(
Telemetry.INVOKE_ERROR_METRIC, t.stackTraceToString()) {
it["error"] = t.toString()
it["message"] = "Exception in Analytics Scope"
it["caller"] = t.stackTrace[0].toString()
}
}
override val analyticsScope = CoroutineScope(SupervisorJob() + exceptionHandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class HTTPClient(
it["error"] = e.toString()
it["writekey"] = writeKey
it["message"] = "Malformed url"
it["caller"] = e.stackTrace[0].toString()
}
throw error
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ internal fun Analytics.fetchSettings(
it["error"] = ex.toString()
it["writekey"] = writeKey
it["message"] = "Error retrieving settings"
it["caller"] = ex.stackTrace[0].toString()
}
configuration.defaultSettings
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ internal class Mediator(internal var plugins: CopyOnWriteArrayList<Plugin> = Cop
it["plugin"] = "${plugin.type}-${plugin.javaClass}"
}
it["writekey"] = plugin.analytics.configuration.writeKey
it["message"] ="Exception executing plugin"
it["message"] = "Exception executing plugin"
it["caller"] = t.stackTrace[0].toString()
}
}
}
Expand All @@ -87,6 +88,7 @@ internal class Mediator(internal var plugins: CopyOnWriteArrayList<Plugin> = Cop
}
it["writekey"] = plugin.analytics.configuration.writeKey
it["message"] = "Exception executing plugin"
it["caller"] = t.stackTrace[0].toString()
}
}
}
Expand Down

0 comments on commit ef81220

Please sign in to comment.