Skip to content

Commit f3044e1

Browse files
committed
improve
1 parent e8671f2 commit f3044e1

File tree

4 files changed

+3
-23
lines changed

4 files changed

+3
-23
lines changed

sentry-ktor-client/api/sentry-ktor-client.api

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ public final class io/sentry/ktorClient/SentryKtorClientPluginConfig {
77
public fun <init> ()V
88
public final fun getBeforeSpan ()Lio/sentry/ktorClient/SentryKtorClientPluginConfig$BeforeSpanCallback;
99
public final fun getCaptureFailedRequests ()Z
10-
public final fun getEnabled ()Z
1110
public final fun getFailedRequestStatusCodes ()Ljava/util/List;
1211
public final fun getFailedRequestTargets ()Ljava/util/List;
1312
public final fun getScopes ()Lio/sentry/IScopes;
1413
public final fun setBeforeSpan (Lio/sentry/ktorClient/SentryKtorClientPluginConfig$BeforeSpanCallback;)V
1514
public final fun setCaptureFailedRequests (Z)V
16-
public final fun setEnabled (Z)V
1715
public final fun setFailedRequestStatusCodes (Ljava/util/List;)V
1816
public final fun setFailedRequestTargets (Ljava/util/List;)V
1917
public final fun setScopes (Lio/sentry/IScopes;)V
@@ -24,8 +22,7 @@ public abstract interface class io/sentry/ktorClient/SentryKtorClientPluginConfi
2422
}
2523

2624
public class io/sentry/ktorClient/SentryKtorClientPluginContextHook : io/ktor/client/plugins/api/ClientHook {
27-
public fun <init> (Lio/sentry/IScopes;Z)V
28-
protected final fun getEnabled ()Z
25+
public fun <init> (Lio/sentry/IScopes;)V
2926
protected final fun getScopes ()Lio/sentry/IScopes;
3027
public synthetic fun install (Lio/ktor/client/HttpClient;Ljava/lang/Object;)V
3128
public fun install (Lio/ktor/client/HttpClient;Lkotlin/jvm/functions/Function2;)V

sentry-ktor-client/src/main/java/io/sentry/ktorClient/SentryKtorClientPlugin.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.sentry.ktorClient
22

33
import io.ktor.client.HttpClient
4-
import io.ktor.client.engine.okhttp.OkHttpConfig
54
import io.ktor.client.plugins.api.*
65
import io.ktor.client.plugins.api.ClientPlugin
76
import io.ktor.client.request.*
@@ -25,9 +24,7 @@ import io.sentry.util.Platform
2524
import io.sentry.util.PropagationTargetsUtils
2625
import io.sentry.util.SpanUtils
2726
import io.sentry.util.TracingUtils
28-
import java.lang.reflect.Field
2927
import kotlinx.coroutines.withContext
30-
import okhttp3.OkHttpClient
3128

3229
/** Configuration for the Sentry Ktor client plugin. */
3330
public class SentryKtorClientPluginConfig {
@@ -196,9 +193,8 @@ public val SentryKtorClientPlugin: ClientPlugin<SentryKtorClientPluginConfig> =
196193
* Context hook to manage scopes during request handling. Forks the current scope and uses
197194
* [SentryContext] to ensure that the whole pipeline runs within the correct scopes.
198195
*/
199-
public open class SentryKtorClientPluginContextHook(
200-
protected val scopes: IScopes,
201-
) : ClientHook<suspend (suspend () -> Unit) -> Unit> {
196+
public open class SentryKtorClientPluginContextHook(protected val scopes: IScopes) :
197+
ClientHook<suspend (suspend () -> Unit) -> Unit> {
202198
private val phase = PipelinePhase("SentryKtorClientPluginContext")
203199

204200
override fun install(client: HttpClient, handler: suspend (suspend () -> Unit) -> Unit) {

sentry-ktor-client/src/main/resources/META-INF.proguard/sentry-ktor-client.pro

Lines changed: 0 additions & 9 deletions
This file was deleted.

sentry-ktor-client/src/test/java/io/sentry/ktorClient/SentryKtorClientPluginTest.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package io.sentry.ktorClient
33
import io.ktor.client.HttpClient
44
import io.ktor.client.engine.HttpClientEngine
55
import io.ktor.client.engine.java.Java
6-
import io.ktor.client.engine.okhttp.OkHttpConfig
7-
import io.ktor.client.engine.okhttp.OkHttpEngine
86
import io.ktor.client.request.get
97
import io.ktor.client.request.post
108
import io.ktor.client.request.setBody
@@ -28,7 +26,6 @@ import io.sentry.SpanStatus
2826
import io.sentry.TransactionContext
2927
import io.sentry.exception.SentryHttpClientException
3028
import io.sentry.mockServerRequestTimeoutMillis
31-
import io.sentry.okhttp.SentryOkHttpInterceptor
3229
import java.util.concurrent.TimeUnit
3330
import kotlin.Unit
3431
import kotlin.test.Test
@@ -37,7 +34,6 @@ import kotlin.test.assertNotNull
3734
import kotlin.test.assertNull
3835
import kotlin.test.assertTrue
3936
import kotlinx.coroutines.runBlocking
40-
import okhttp3.OkHttpClient
4137
import okhttp3.mockwebserver.MockResponse
4238
import okhttp3.mockwebserver.MockWebServer
4339
import okhttp3.mockwebserver.SocketPolicy

0 commit comments

Comments
 (0)