fix(api): remove sentry-okhttp integration

This keeps logging HTTP 500 errors despite me opting out of them

Fixes COMPOSE-LOBSTERS-2T
This commit is contained in:
Harsh Shandilya 2024-04-24 22:56:55 +05:30
parent 24a4d20a03
commit c8eaf8d769
3 changed files with 1 additions and 12 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright © 2022-2023 Harsh Shandilya.
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@ -27,5 +27,4 @@ dependencies {
implementation(libs.napier)
implementation(libs.okhttp.core)
implementation(libs.retrofit.kotlinxSerializationConverter)
implementation(libs.sentry.okhttp)
}

View file

@ -18,7 +18,6 @@ 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.okhttp.SentryOkHttpInterceptor
import java.net.Socket
import javax.net.SocketFactory
import okhttp3.Cache
@ -88,13 +87,5 @@ interface OkHttpModule {
fun provideHttpLoggingInterceptor(logger: HttpLoggingInterceptor.Logger): Interceptor {
return HttpLoggingInterceptor(logger).setLevel(HttpLoggingInterceptor.Level.BASIC)
}
@Provides
@IntoSet
fun provideSentryInterceptor(): Interceptor {
// Disable capturing of failed requests since there is no real upstream for this app,
// if something is going wrong it is almost always someone else's problem.
return SentryOkHttpInterceptor(captureFailedRequests = false)
}
}
}