mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 05:57:03 +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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue