mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 03:37:05 +05:30
feat(core): manually wire in Sentry OkHttp integration
This commit is contained in:
parent
6e291a8df1
commit
a5be35a667
3 changed files with 10 additions and 0 deletions
|
@ -22,8 +22,10 @@ dependencies {
|
|||
api(libs.okhttp.loggingInterceptor)
|
||||
|
||||
implementation(platform(libs.okhttp.bom))
|
||||
implementation(platform(libs.sentry.bom))
|
||||
implementation(libs.dagger)
|
||||
implementation(libs.napier)
|
||||
implementation(libs.okhttp.core)
|
||||
implementation(libs.retrofit.kotlinxSerializationConverter)
|
||||
implementation(libs.sentry.okhttp)
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import dagger.multibindings.IntoSet
|
|||
import dev.msfjarvis.claw.core.network.DelegatingSocketFactory
|
||||
import dev.msfjarvis.claw.core.network.NapierLogger
|
||||
import dev.msfjarvis.claw.core.network.UserAgentInterceptor
|
||||
import io.sentry.android.okhttp.SentryOkHttpInterceptor
|
||||
import java.net.Socket
|
||||
import javax.net.SocketFactory
|
||||
import okhttp3.Cache
|
||||
|
@ -87,5 +88,11 @@ interface OkHttpModule {
|
|||
fun provideHttpLoggingInterceptor(logger: HttpLoggingInterceptor.Logger): Interceptor {
|
||||
return HttpLoggingInterceptor(logger).setLevel(HttpLoggingInterceptor.Level.BASIC)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@IntoSet
|
||||
fun provideSentryInterceptor(): Interceptor {
|
||||
return SentryOkHttpInterceptor()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver" }
|
|||
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
|
||||
retrofit-kotlinxSerializationConverter = "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0"
|
||||
sentry-bom = { module = "io.sentry:sentry-bom", version.ref = "sentry-sdk" }
|
||||
sentry-okhttp = { module = "io.sentry:sentry-android-okhttp", version.ref = "sentry-sdk" }
|
||||
slack-compose-lints = "com.slack.lint.compose:compose-lint-checks:1.2.0"
|
||||
sqldelight-androidDriver = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }
|
||||
sqldelight-extensions-coroutines = { module = "app.cash.sqldelight:coroutines-extensions-jvm", version.ref = "sqldelight" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue