Upload app id and clean version to bug reports (#2829)

* Upload app id and clean version to bug reports

* Add changelog
This commit is contained in:
Jorge Martin Espinosa 2024-05-10 12:15:33 +02:00 committed by GitHub
parent b95df7e6b4
commit 1f4b2d3ef3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

1
changelog.d/2829.bugfix Normal file
View file

@ -0,0 +1 @@
Add missing `app_id` and `Version` properties to bug reports.

View file

@ -161,6 +161,9 @@ class DefaultBugReporter @Inject constructor(
.addFormDataPart("sdk_sha", sdkMetadata.sdkGitSha)
.addFormDataPart("local_time", LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME))
.addFormDataPart("utc_time", LocalDateTime.ofInstant(Instant.now(), ZoneOffset.UTC).format(DateTimeFormatter.ISO_DATE_TIME))
.addFormDataPart("app_id", buildMeta.applicationId)
// Nightly versions have a custom version name suffix that we should remove for the bug report
.addFormDataPart("Version", buildMeta.versionName.replace("-nightly", ""))
currentTracingFilter?.let {
builder.addFormDataPart("tracing_filter", it)
}

View file

@ -154,6 +154,6 @@ class DefaultBugReporterTest {
}
companion object {
private const val EXPECTED_NUMBER_OF_PROGRESS_VALUE = 15
private const val EXPECTED_NUMBER_OF_PROGRESS_VALUE = 17
}
}