Repository navigation
This release is based on OpenTelemetry Java Instrumentation 2.34.0 and
the OpenTelemetry Java Core (sdk/api/exporters) 1.68.0.
Note that many artifacts have the -alpha suffix attached to their version number, reflecting
that they are still alpha quality and will continue to have breaking changes. Please see the
VERSIONING.md for more details.
📣 Migration notes
-
The documented minimum supported versions did not build and have been corrected: Kotlin 2.1 (2.3 with
coroutines-library), AGP 8.12.0, Gradle 8.13,compileSdk37 and JDK 17 at build time. They are now verified on every pull request.androidx.coregoes back to 1.18.0, so AGP 8 works again; 1.7.0 to 1.8.1 required AGP 9.1. (#2077, #1526) -
Published modules now declare a
minCompileSdkof 36 in their AAR metadata, up from 34.android-agentandokhttp3-agentdeclare 37, which OkHttp 5.5 already required of their consumers. (#2077)
🛠️ Bug fixes
-
An exception thrown by a network attributes extractor (for example a custom one) no longer escapes into the connectivity callback. The network change event is still emitted with the attributes from the other extractors.
-
An exception thrown while tracing an activity lifecycle callback no longer escapes into the host app's lifecycle dispatch on the main thread. (#2233)
-
Exceptions thrown while emitting an ANR event (for example from a custom stack trace extractor) or while registering or removing slow rendering frame metrics listeners no longer escape into the host app or stop the periodic ANR polling. (#2233)
-
Network attributes now pick up
READ_PHONE_STATEwhen the app is granted it after the SDK started, instead of after the next network change or app restart. The network subtype is reported, and the carrier switches to the API 28+ details, from a later span or log. The permission is checked when spans and logs are created: at most once per 3 seconds in the first 30 seconds after startup, then at most once per 10 seconds. The carrier name can therefore change once during a session, and the network change instrumentation then emits anetwork.changeevent with the updated attributes. (#1216) -
A failure while loading or running one instrumentation no longer prevents the SDK from starting. An instrumentation or configurator that cannot be loaded through
ServiceLoader, an instrumentation that throws duringinstall()oruninstall(), and an OTel-ready listener that throws are now logged as warnings, and the remaining ones still run. (#2247, #2244, #2245, #2236) -
Any exception while setting up disk buffering, such as a
SecurityExceptionfrom the cache directory, now falls back to exporting without disk buffering. Previously only anIOExceptiondid, and other exceptions left the exporters unset. (#2246, #2236) -
Disk buffering no longer initializes storage, exporters and readers for signals that are disabled in the configuration. (#2221)
-
The SDK no longer crashes at startup on devices where the connectivity service is unavailable, such as Android Automotive or headless devices. (#2181)
-
The HttpURLConnection instrumentation no longer throws a
ClassCastExceptionfor non-HTTP connections such asJarURLConnection. (#2241) -
Calling
install()more than once, oruninstall()beforeinstall()or repeatedly, no longer duplicates callbacks, receivers or attribute extractors, or leaks them, in the activity lifecycle, ANR, crash, fragment, network change, power save mode and screen orientation instrumentations. The ANR instrumentation now creates its scheduler thread only when it is installed and shuts it down onuninstall(). (#2208, #2201, #2192, #2175, #2182, #2205, #2174) -
The slow rendering instrumentation no longer keeps strong references to activities, which could prevent them from being garbage collected. (#1192)
📈 Enhancements
-
Add
shouldRecordWebsocketEventForHost { ... }to the Android Agent'shttpTelemetryDSL to filter OkHttp WebSocket events by host before network export. WebSocket events now includeserver.address. HTTP spans, metrics and trace context propagation are unchanged. (#1686) -
Add
sessionProviderto thesession { ... }block of the Android Agent DSL to configure a customSessionProvider. (#2044) -
Add an incubating
startNewSession()API to the Android agent to start a replacement session linked to the previous one. The name and the return value may change. (#2141) -
The session ID and screen name attributes can now be disabled with
disableSessionId()anddisableScreenAttributes()in the Android Agent DSL, ordisableSessionId()inOtelRumConfig. The session ID can also be turned off withincludeSessionIdin thesession { ... }block. (#1966) -
The OkHttp3, OkHttp3 WebSocket and view click instrumentations now support
uninstall(). (#2134, #2135, #2155, #1128) -
Native crash recovery now stops after three failed attempts per read or cleanup phase, or after 24 hours. An exhausted snapshot read falls back to the marker-only event, and an exhausted marker read abandons the report without emitting an event. (#2121)
🙇 Thank you
This release was possible thanks to the following contributors:
@aranhave
@benjoseph-grafana
@breedx-splk
@brsgina
@codecov
@copilot-pull-request-reviewer
@fractalwrench
@hyunsuhahaha
@insaneodyssey26
@LikeTheSalad
@mesubash
@priettt
@robert-northmind
@RotBolt
@Sahil-Gulihar
@SahinurDEV
@wolfgangcodes
@Yash990-bit