Skip to content

Commit 1c8f695

Browse files
dependabot[bot]adinauerclauderunningcode
authored
chore(deps): bump ktorClient from 3.0.0 to 3.6.1 (#6478)
* chore(deps): bump ktorClient from 3.0.0 to 3.6.1 Bumps `ktorClient` from 3.0.0 to 3.6.1. Updates `io.ktor:ktor-client-core` from 3.0.0 to 3.6.1 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/3.6.1/CHANGELOG.md) - [Commits](ktorio/ktor@3.0.0...3.6.1) Updates `io.ktor:ktor-client-java` from 3.0.0 to 3.6.1 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/3.6.1/CHANGELOG.md) - [Commits](ktorio/ktor@3.0.0...3.6.1) --- updated-dependencies: - dependency-name: io.ktor:ktor-client-core dependency-version: 3.6.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.ktor:ktor-client-java dependency-version: 3.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix(ktor): [Ktor 3.6 2] Preserve Ktor 3.0 runtime compatibility (#6517) * fix(ktor): Preserve Ktor 3.0 runtime compatibility Avoid inlining Ktor 3.6's AttributeKey factory. The inlined code references a TypeInfo constructor unavailable in older Ktor 3.x runtimes. Construct TypeInfo explicitly through its stable two-argument constructor instead. * test(ktor): [Ktor 3.6 3] Add Ktor 3.0 compatibility suite (#6520) * test(ktor): Add Ktor 3.0 compatibility suite Compile the production integration against the catalog Ktor version while compiling and running the existing tests against Ktor 3.0.0. Add the compatibility suite to check so inline API binary incompatibilities fail CI. * test(ktor): Simplify Ktor 3.0 suite configuration Use Ktor's enforced platform to pin all compatibility test artifacts to 3.0.0 instead of maintaining a custom resolution strategy. Reuse the standard test source directories so the suite follows source changes. Co-Authored-By: Claude <noreply@anthropic.com> * Update sentry-ktor-client/build.gradle.kts Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io>
1 parent 237a5fa commit 1c8f695

3 files changed

Lines changed: 33 additions & 3 deletions

File tree

‎gradle/libs.versions.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jetbrainsCompose = "1.6.11"
2121
kotlin = "2.3.21"
2222
kotlin-compatible-version = "1.9"
2323
ksp = "2.3.13"
24-
ktorClient = "3.0.0"
24+
ktorClient = "3.6.1"
2525
logback = "1.2.9"
2626
log4j2 = "2.26.1"
2727
nopen = "1.0.1"

‎sentry-ktor-client/build.gradle.kts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,31 @@ dependencies {
4747
testImplementation(libs.okhttp.mockwebserver)
4848
}
4949

50+
testing {
51+
suites {
52+
register<JvmTestSuite>("testKtor300") {
53+
useJUnit()
54+
dependencies {
55+
implementation(enforcedPlatform("io.ktor:ktor-bom:3.0.0"))
56+
}
57+
sources {
58+
java.setSrcDirs(sourceSets.test.get().java.srcDirs)
59+
resources.setSrcDirs(sourceSets.test.get().resources.srcDirs)
60+
}
61+
}
62+
}
63+
}
64+
65+
configurations.named("testKtor300Implementation") {
66+
extendsFrom(configurations.testImplementation.get())
67+
}
68+
69+
kotlin.target.compilations.named("testKtor300") {
70+
associateWith(kotlin.target.compilations.getByName("main"))
71+
}
72+
73+
tasks.check { dependsOn(testing.suites.named("testKtor300")) }
74+
5075
buildConfig {
5176
useJavaOutput()
5277
packageName("io.sentry.ktorClient")

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import io.ktor.client.request.*
77
import io.ktor.client.statement.*
88
import io.ktor.util.*
99
import io.ktor.util.pipeline.*
10+
import io.ktor.util.reflect.TypeInfo
1011
import io.sentry.BaggageHeader
1112
import io.sentry.BuildConfig
1213
import io.sentry.DataCategory
@@ -98,9 +99,13 @@ public val SentryKtorClientPlugin: ClientPlugin<SentryKtorClientPluginConfig> =
9899

99100
// Attributes
100101
// Request start time for breadcrumbs
101-
val requestStartTimestampKey = AttributeKey<SentryDate>("SentryRequestStartTimestamp")
102+
val requestStartTimestampKey =
103+
AttributeKey<SentryDate>(
104+
"SentryRequestStartTimestamp",
105+
TypeInfo(SentryDate::class, null),
106+
)
102107
// Span associated with the request
103-
val requestSpanKey = AttributeKey<ISpan>("SentryRequestSpan")
108+
val requestSpanKey = AttributeKey<ISpan>("SentryRequestSpan", TypeInfo(ISpan::class, null))
104109

105110
onRequest { request, _ ->
106111
val effectiveScopes = if (forceScopes) scopes else Sentry.getCurrentScopes()

0 commit comments

Comments
 (0)