From 428b76176396dcc2b568627f71a5e8498367f623 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 04:22:38 +0000 Subject: [PATCH 1/2] 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](https://github.com/ktorio/ktor/compare/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](https://github.com/ktorio/ktor/compare/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] --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7784ec20d5..b48ed49077 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,7 +19,7 @@ jetbrainsCompose = "1.6.11" kotlin = "2.3.21" kotlin-compatible-version = "1.9" ksp = "2.3.13" -ktorClient = "3.0.0" +ktorClient = "3.6.1" logback = "1.2.9" log4j2 = "2.26.1" nopen = "1.0.1" From 4583d573e08abeadc0880091430813794972b90d Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Wed, 11 Nov 2026 12:05:44 +0100 Subject: [PATCH 2/2] 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 * Update sentry-ktor-client/build.gradle.kts Co-authored-by: Nelson Osacky --------- Co-authored-by: Claude Co-authored-by: Nelson Osacky --------- Co-authored-by: Claude Co-authored-by: Nelson Osacky --- sentry-ktor-client/build.gradle.kts | 25 +++++++++++++++++++ .../ktorClient/SentryKtorClientPlugin.kt | 9 +++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/sentry-ktor-client/build.gradle.kts b/sentry-ktor-client/build.gradle.kts index a28c11eab8..b4a5cecb05 100644 --- a/sentry-ktor-client/build.gradle.kts +++ b/sentry-ktor-client/build.gradle.kts @@ -44,6 +44,31 @@ dependencies { testImplementation(libs.okhttp.mockwebserver) } +testing { + suites { + register("testKtor300") { + useJUnit() + dependencies { + implementation(enforcedPlatform("io.ktor:ktor-bom:3.0.0")) + } + sources { + java.setSrcDirs(sourceSets.test.get().java.srcDirs) + resources.setSrcDirs(sourceSets.test.get().resources.srcDirs) + } + } + } +} + +configurations.named("testKtor300Implementation") { + extendsFrom(configurations.testImplementation.get()) +} + +kotlin.target.compilations.named("testKtor300") { + associateWith(kotlin.target.compilations.getByName("main")) +} + +tasks.check { dependsOn(testing.suites.named("testKtor300")) } + buildConfig { useJavaOutput() packageName("io.sentry.ktorClient") diff --git a/sentry-ktor-client/src/main/java/io/sentry/ktorClient/SentryKtorClientPlugin.kt b/sentry-ktor-client/src/main/java/io/sentry/ktorClient/SentryKtorClientPlugin.kt index 0e4538fb41..0109aeb9fb 100644 --- a/sentry-ktor-client/src/main/java/io/sentry/ktorClient/SentryKtorClientPlugin.kt +++ b/sentry-ktor-client/src/main/java/io/sentry/ktorClient/SentryKtorClientPlugin.kt @@ -7,6 +7,7 @@ import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.util.* import io.ktor.util.pipeline.* +import io.ktor.util.reflect.TypeInfo import io.sentry.BaggageHeader import io.sentry.BuildConfig import io.sentry.DataCategory @@ -98,9 +99,13 @@ public val SentryKtorClientPlugin: ClientPlugin = // Attributes // Request start time for breadcrumbs - val requestStartTimestampKey = AttributeKey("SentryRequestStartTimestamp") + val requestStartTimestampKey = + AttributeKey( + "SentryRequestStartTimestamp", + TypeInfo(SentryDate::class, null), + ) // Span associated with the request - val requestSpanKey = AttributeKey("SentryRequestSpan") + val requestSpanKey = AttributeKey("SentryRequestSpan", TypeInfo(ISpan::class, null)) onRequest { request, _ -> val effectiveScopes = if (forceScopes) scopes else Sentry.getCurrentScopes()