File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
src/main/java/io/sentry/ktorClient
sentry-samples/sentry-samples-ktor-client/src/main/java/io/sentry/samples/ktorClient Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ kotlin { explicitApi() }
2121dependencies {
2222 api(projects.sentry)
2323
24- api (kotlin(Config .kotlinStdLib, KotlinCompilerVersion .VERSION ))
24+ implementation (kotlin(Config .kotlinStdLib, KotlinCompilerVersion .VERSION ))
2525 api(projects.sentryKotlinExtensions)
2626
2727 compileOnly(libs.jetbrains.annotations)
Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ internal object SentryKtorClientUtils {
5050 cookies = if (scopes.options.isSendDefaultPii) response.headers[" Set-Cookie" ] else null
5151 headers = getHeaders(scopes, response.headers)
5252 statusCode = response.status.value
53- bodySize = response.bodyAsBytes().size.toLong()
53+ try {
54+ bodySize = response.bodyAsBytes().size.toLong()
55+ } catch (_: Throwable ) {}
5456 }
5557
5658 event.request = sentryRequest
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ import kotlinx.coroutines.runBlocking
1111
1212fun main () {
1313 Sentry .init { options ->
14- options.dsn =
15- " https://b9ca97be3ff8f1cef41dffdcb1e5100b@o447951.ingest.us.sentry.io/4508683222843393"
14+ options.dsn = " https://502f25099c204a2fbf4cb16edc5975d1@o447951.ingest.sentry.io/5428563"
1615 options.isDebug = true
1716 options.isSendDefaultPii = true
1817 options.tracesSampleRate = 1.0
You can’t perform that action at this time.
0 commit comments