Skip to content

Commit a96c144

Browse files
authored
Update OpenTelemetry to 1.62.0, AB#3611236, Fixes AB#3611236 (#3125)
[AB#3611236](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3611236) Updates `opentelemetry-api` (and transitives) from 1.18.0 to 1.62.0. ## Changes - `gradle/versions.gradle` -- `openTelemetryVersion` 1.18.0 -> 1.62.0 - `BenchmarkSpan.kt` -- `setAttribute(key, value: T)` -> `value: T?` to match the `@Nullable` annotation on `Span.setAttribute(AttributeKey<T>, T)` in newer versions. - `common/build.gradle` -- pin `opentelemetry-extension-kotlin` to 1.18.0 via a new `openTelemetryExtensionKotlinVersion` variable. Newer `extension-kotlin` releases add a `strictly` `kotlin-stdlib` 2.x constraint that conflicts with the project's Kotlin 1.8 compiler. The pin is binary-compatible with `opentelemetry-api`/`-context` 1.62 -- `extension-kotlin` only calls stable `Context` APIs that are unchanged across 1.18 -> 1.62.
1 parent 906f026 commit a96c144

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ vNext
77
- [MINOR] Refactor Auth Tab integration to use provider-based strategy selection. Adds AuthTabStrategyProvider and BrowserLaunchStrategy with Custom Tabs fallback. Compatible with androidx.browser:browser:1.7.0.
88
- [MINOR] Wire onboarding telemetry hooks into AzureActiveDirectoryWebViewClient for page-transition step capture (broker install, MDM enrollment, Company Portal launch, MFA linking) and last-loaded-domain tracking (#3121)
99
- [MINOR] Propagate the onboarding telemetry blob through the broker failure path: add BaseException.onboardingBlob and round-trip it through MsalBrokerResultAdapter so callers can emit onboarding telemetry on failure outcomes. Also add an MsalBrokerResultAdapter overload that accepts an onboarding blob on the success path so the broker can attach the finalized blob to the success result bundle (#3123)
10+
- [PATCH] Update OpenTelemetry to 1.62.0 (#3125)
1011
- [MINOR] Add provisionResourceAccountCredentials API to DeviceRegistrationClientApplication with V0 protocol params/response and add IPPhone to AppRegistry (#3086)
1112
- [PATCH] Extend filter-then-clone optimization to deleteAccessTokensWithIntersectingScopes and add telemetry attributes (#3114)
1213
- [PATCH] Wire ClientDataInfo through AcquireTokenResult, exceptions (#3109)

common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ dependencies {
283283
})
284284

285285
implementation "io.opentelemetry:opentelemetry-api:$rootProject.ext.openTelemetryVersion"
286-
implementation("io.opentelemetry:opentelemetry-extension-kotlin:$rootProject.ext.openTelemetryVersion")
286+
implementation("io.opentelemetry:opentelemetry-extension-kotlin:$rootProject.ext.openTelemetryExtensionKotlinVersion")
287287
implementation "androidx.fragment:fragment:1.3.2"
288288
}
289289

common4j/src/main/com/microsoft/identity/common/java/opentelemetry/BenchmarkSpan.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class BenchmarkSpan(
127127

128128
override fun <T : Any?> setAttribute(
129129
key: AttributeKey<T>,
130-
value: T
130+
value: T?
131131
): Span? {
132132
statuses.add(Pair(key.toString(), System.nanoTime()))
133133
return originalSpan.setAttribute(key, value)

gradle/versions.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ ext {
7373
androidxAnnotationVersion = "1.4.0"
7474
spotBugsAnnotationVersion = "4.3.0"
7575
jcipAnnotationVersion = "1.0-1"
76-
openTelemetryVersion = "1.18.0"
76+
openTelemetryVersion = "1.62.0"
77+
// Pinned to 1.18.0 because newer versions add a 'strictly' kotlin-stdlib 2.x
78+
// constraint that conflicts with the project's Kotlin 1.8 compiler. Realign
79+
// once the project upgrades Kotlin to 2.x.
80+
openTelemetryExtensionKotlinVersion = "1.18.0"
7781
jetpackDataStoreVersion = "1.0.0"
7882
blockstoreVersion="16.2.0"
7983
lifecycleKtxVersion="2.5.1"

0 commit comments

Comments
 (0)