-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Migrate from bugsnag to sentry #1471
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Timestamp: 2021-01-11 08:11:24 |
buildSrc/src/main/kotlin/Versions.kt
Outdated
@@ -2,6 +2,9 @@ object Versions { | |||
// https://github.com/bugsnag/bugsnag-java/releases | |||
const val BUGSNAG = "3.6.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove it?
I have read the CLA Document and I hereby sign the CLA |
recheck |
UUID.randomUUID().toString() | ||
} | ||
|
||
fun setCrashReportTag(key: String, value: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a setCrashReportTag(vararg tags: Pair<String, String>)
private const val ANALYTICS_FILE = "analytics-uuid" | ||
private const val DISABLED = "DISABLED" | ||
|
||
enum class CrashReportTag(val tagName: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are not iterating or switching, the object with constant values will fit better than the enum.
4e148d0
to
410310a
Compare
410310a
to
1a9bf76
Compare
else -> initializeCrashReportWrapper() | ||
} | ||
|
||
private fun analyticsFileExistAndIsDisabled(rootPath: String) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm...this name is not fully self-explanatory (for me). The logic here is to check if a user had disabled google analytics, flank should respect those settings.
How about isGoogleAnalyticsDisabled
? Maybe not exactly the same but something explains why we check that file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
@@ -0,0 +1,60 @@ | |||
package ftl.util |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo in the file name CreashReporter
-> CrashReporter
@@ -101,6 +103,14 @@ object GcStorage { | |||
) | |||
} | |||
|
|||
fun IArgs.uploadSessionId() = takeUnless { disableResultsUpload }?.let { | |||
upload( | |||
file = Path.of(localResultDir, SESSION_ID_FILE).toString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use Paths
in other places in the project. Your implementation is not wrong! I am just wondering if it is possible to use Paths
here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed! Thanks! 👍
Fixes #1318
Test Plan
revision
session_id.txt
in matrix pathsession_id.txt
whendisable-results-upload
not setChecklist