-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): update Android SDK to v8.0.0 #2596
base: main
Are you sure you want to change the base?
Conversation
21e7032
to
dd3aed7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2596 +/- ##
==========================================
+ Coverage 88.78% 92.53% +3.74%
==========================================
Files 122 91 -31
Lines 4306 2986 -1320
==========================================
- Hits 3823 2763 -1060
+ Misses 483 223 -260 ☔ View full report in Codecov by Sentry. |
dd3aed7
to
4ebd0d2
Compare
- Bump Android SDK from v7.20.0 to v7.20.1 ([#2593](https://github.com/getsentry/sentry-dart/pull/2593)) | ||
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7201) | ||
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.0...7.20.1) | ||
- Bump Android SDK from v7.20.0 to v8.0.0 ([#2593](https://github.com/getsentry/sentry-dart/pull/2593), [#2596](https://github.com/getsentry/sentry-dart/pull/2596)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is breaking because it drops support for Android API 19.
Background:
Flutter SDK has also dropped support for API 19 but only since version 3.22.0 and we currently support 3.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaind do we have any urgency to work on v9 because of this? e.g is android replay going to keep continue supporting v7 - dunno how much we depend on further/future work by android replay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the android bump & this requirement for performance improvemnts, I'm thinking we should start working on 9.0.
While I'm not aware of any issues that would require as to update the Android SDK at the moment, it may be risky to release GA in FLutter SDK v8 when we can't get further Android SDK updates (or rather we can but it would be painful), in case any issue arises in the future.
It also sounds like a good time to combine the replay GA release in a new major version.
004f7f1
to
7601d6c
Compare
7601d6c
to
8e7e43d
Compare
Bumps flutter/scripts/update-android.sh from 7.20.1 to 8.0.0.
Auto-generated by a dependency updater.
Changelog
8.0.0
Summary
Version 8 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are:
Hub
has been replaced byScopes
Scope
types have been introduced, see "Behavioural Changes" for more details.Scope
lifecycle, see "Behavioural Changes" for more details.minSdk
level to 21 (Android 5.0)sentry-opentelemetry-agent
has been improved and now works in combination with the rest of Sentry. You may now mix and match OpenTelemetry and Sentry API for instrumenting your application.sentry-graphql-22
)Please take a look at our migration guide in docs.
Sentry Self-hosted Compatibility
This SDK version is compatible with a self-hosted version of Sentry
22.12.0
or higher. If you are using an older version of self-hosted Sentry (aka onpremise), you will need to upgrade. If you're usingsentry.io
no action is required.Breaking Changes
enableTracing
option (a.k.aenable-tracing
) has been removed from the SDK (#3776)tracesSampleRate
to a value >= 0.0 for enabling performance instead. The default value isnull
which means performance is disabled.synchronized
methods and blocks withReentrantLock
(AutoClosableReentrantLock
) (#3715)synchronized
before. Please make sure to use the same lock object as the parent class in that case.traceOrigins
option (io.sentry.traces.tracing-origins
in manifest) has been removed, please usetracePropagationTargets
(io.sentry.traces.trace-propagation-targets
in manifest`) instead (#3780)profilingEnabled
option (io.sentry.traces.profiling.enable
in manifest) has been removed, please useprofilesSampleRate
(io.sentry.traces.profiling.sample-rate
instead) instead (#3780)shutdownTimeout
option has been removed, please useshutdownTimeoutMillis
instead (#3780)profilingTracesIntervalMillis
option for Android has been removed (#3780)io.sentry.session-tracking.enable
manifest option has been removed (#3780)Sentry.traceHeaders()
method has been removed, please useSentry.getTraceparent()
instead (#3718)Sentry.reportFullDisplayed()
method has been removed, please useSentry.reportFullyDisplayed()
instead (#3717)User.other
has been removed, please usedata
instead (#3780)SdkVersion.getIntegrations()
has been removed, please usegetIntegrationSet
instead (#3780)SdkVersion.getPackages()
has been removed, please usegetPackageSet()
instead (#3780)Device.language
has been removed, please uselocale
instead (#3780)TraceContext.user
andTraceContextUser
class have been removed, please useuserId
onTraceContext
instead (#3780)TransactionContext.fromSentryTrace()
has been removed, please useSentry.continueTrace()
instead (#3780)SentryDataFetcherExceptionHandler
has been removed, please useSentryGenericDataFetcherExceptionHandler
in combination withSentryInstrumentation
instead (#3780)sentry-android-okhttp
has been removed in favor ofsentry-okhttp
, removing android dependency from the module (#3510)Contexts
no longer extendsConcurrentHashMap
, instead we offer a selected set of methods.AndroidTransactionProfiler
constructors has been removed, please use a different one (#3780)Session
constructor now takes aString
instead of aUUID
for thesessionId
parameter.Session.getSessionId()
now returns aString
instead of aUUID
.SpanStatus.OK
(#3869)instrumenter
option should no longer be needed as our new OpenTelemetry integration now works in combination with the rest of SentryBehavioural Changes
Scope
types in the SDK, allowing for better control over what data is attached where. Previously there was a stack of scopes that was pushed and popped. Instead we now fork scopes for a given lifecycle and then restore the previous scopes. SinceHub
is gone, it is also never cloned anymore. Separation of data now happens through the different scope types while making it easier to manipulate exactly what you need without having to attach data at the right time to have it apply where wanted.Sentry.init
has been called. It can be manipulated usingSentry.configureScope(ScopeType.GLOBAL, (scope) -> { ... })
.Sentry.configureScope(ScopeType.ISOLATION, (scope) -> { ... })
. The SDK automatically forks isolation scope in certain cases like incoming requests, CRON jobs, SpringAsync
and more.Sentry.configureScope(ScopeType.CURRENT, (scope) -> { ... })
.Sentry.popScope
has been deprecated, please call.close()
on the token returned bySentry.pushScope
instead or use it in a way described in more detail in our migration guide.Sentry.configureScope()
as well as API likeSentry.setTag()
CURRENT
scopeISOLATION
scopeScope
can now be ordered by overriding thegetOrder
method on implementations ofEventProcessor
. NOTE: This order only applies to event processors onScope
but notSentryOptions
at the moment. Feel free to request this if you need it.Hub
is deprecated in favor ofScopes
, alongside someHub
relevant APIs. More details can be found in our migration guide.isSendDefaultPii
istrue
(#3919)sentry-samples/sentry-samples-android
example on how to configure CMake and consumesentry.h
"{{auto}}"
ifsendDefaultPii
is enabled (#4072)Features
sentry-opentelemetry-agent
has been completely reworked and now plays nicely with the rest of the Java SDKScopes
(used to beHub
) propagation as well as performance instrumentation (i.e. more spans).OtelSpanFactory
instead ofDefaultSpanFactory
which is done automatically by the auto init of the Java Agent.Sampler
which uses Sentry sampling configurationContext
for storing SentryScopes
(which is similar to what used to be calledHub
) and thus relies on OpenTelemetry forContext
propagation.sentry-opentelemetry-agentless-spring
module (#4000)OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=none
env vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.sentry-opentelemetry-agentless
module (#3961)-Dotel.java.global-autoconfigure.enabled=true
on thejava
command, when starting your application.OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=none
env vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.OpenTelemetryUtil.applyOpenTelemetryOptions
now takes an enum instead of a boolean for its modeopenTelemetryMode
option (#3994)AUTO
meaning the SDK will figure out how to best configure itself for use with OpenTelemetryOFF
(#3995)AGENT
when usingsentry-opentelemetry-agent
AGENTLESS
when usingsentry-opentelemetry-agentless
AGENTLESS_SPRING
when usingsentry-opentelemetry-agentless-spring
ignoredTransactions
option to filter out transactions by name (#3871)SENTRY_IGNORED_TRANSACTIONS=POST /person/,GET /pers.*
options.setIgnoredTransactions(...)
sentry.properties
, e.g.ignored-transactions=POST /person/,GET /pers.*
application.properties
, e.g.sentry.ignored-transactions=POST /person/,GET /pers.*
scopeBindingMode
toSpanOptions
(#4004)AUTO
meaning the SDK will decide whether the span should be bound to the current scope. It will not bind transactions to scope usingAUTO
, it will only bind spans where the parent span is on the current scope.ON
sets the new span on the current scope.OFF
does not set the new span on the scope.ignoredSpanOrigins
option for ignoring spans coming from certain integrationsgraphql-java
v22 via a new modulesentry-graphql-22
(#3740)graphql-java
v21 or earlier, you can use thesentry-graphql
modulegraphql-java
v22 and newer please use thesentry-graphql-22
moduleSentryInstrumenter
bean directly for Spring (Boot) if there is none yet instead of usingGraphQlSourceBuilderCustomizer
to add the instrumentation (#3744)SentryGraphqlInstrumentation.BeforeSpanCallback
which is then used bySentryInstrumenter
ThreadLocalAccessor
for Spring Boot 3 WebFlux by default (#4023)environment
toCheckinUtils.withCheckIn
(3889)globalHubMode
to options (#3805)globalHubMode
used to only be a param onSentry.init
. To make it easier to be used in e.g. Desktop environments, we now additionally added it as an option on SentryOptions that can also be set viasentry.properties
.Sentry.init
and the option are set, the option will win. By default the option is set tonull
meaning whatever is passed toSentry.init
takes effect.forceInit=true
(force-init
for.properties
files) to ensure a call to Sentry.init / SentryAndroid.init takes effect<meta-data android:name="io.sentry.force-init" android:value="true" />
to ensure Sentry Android auto init is not easily overwrittenapplication/x-www-form-urlencoded
requests in Spring (#3731)application/json
requeststransaction.data
inextras
anymoresentry-samples-spring-boot-jakarta-opentelemetry
) (#3856)sentry-samples-spring-boot-jakarta-opentelemetry-noagent
) (#3856)sentry-samples-console-opentelemetry-noagent
) (#3856)Fixes
sentry-trace
header (#3942)sentry-trace
header that only contains trace ID and span ID but no sampled flag (-1
,-0
suffix) means the receiving system can make its own sampling decisionsentry-trace
header fromPropagationContext
we now copy thesampled
flag.TransactionContext.fromPropagationContext
when there is no parent sampling decision, keep the decisionnull
so a new sampling decision is made instead of defaulting tofalse
close
on previous Sentry instance when re-initializing (#3750)SpanStatus.OK
(#3869)ContentCachingRequestWrapper
instead of our own Wrapper to also cache parameters (#3641)shutdownTimeoutMillis
(defaulting to 2s) instead of being able to terminate immediately.continueTrace
and also do not inject tracing headers if the integration has been added toignoredSpanOrigins
DiskFlushNotification
hint flushed when rate limited (#3892)UncaughtExceptionHandlerIntegration
waited for the full flush timeout duration (default 15s) when rate limited.op
with auto generated content for OpenTelemetry spans with span kindINTERNAL
(#3906)enable-spotlight
andspotlight-connection-url
to external options and check if spotlight is enabled when deciding whether to inspect an OpenTelemetry span for connecting to splotlight (#3709)Contexts.setTrace
has been markedNotNull
(#3721)null
would cause an exception.SpanOptions
(#3722)SentryLogbackInitializer
is now public (#3723)send-default-pii
andmax-request-body-size
fromsentry.properties
(#3534)TracesSampler
is now only created once inSentryOptions
instead of creating a new one for everyHub
(which is nowScopes
). This means we're now creating fewerSecureRandom
instances.Internal
SentryClient
constructor public (#4045)Changes in pre-releases
These changes have been made during development of
8.0.0
. You may skip this section. We just put it here for sake of completeness.Extract OpenTelemetry
URL_PATH
span attribute into description (#3933)Replace OpenTelemetry
ContextStorage
wrapper withContextStorageProvider
(#3938)Context
whereasContextStorageProvider
is automatically invoked at the correct time.Send
otel.kind
to Sentry (#3907)Spring Boot now automatically detects if OpenTelemetry is available and makes use of it (#3846)
OpenTelemetry
bean that is created byopentelemetry-spring-boot-starter
instead ofGlobalOpenTelemetry
Spring Boot now automatically detects our OpenTelemetry agent if its auto init is disabled (#3848)
sentry-opentelemetry-extra
module has been removed again, most classes have been moved tosentry-opentelemetry-bootstrap
which is loaded into the bootstrap classloader (i.e.null
) when our Java agent is used. The rest has been moved intosentry-opentelemetry-agentcustomization
and is loaded into the agent classloader when our Java agent is used.sentry-opentelemetry-bootstrap
andsentry-opentelemetry-agentcustomization
modules can be used without the agent as well, in which case all classes are loaded into the application classloader. Check out oursentry-samples-spring-boot-jakarta-opentelemetry-noagent
sample.GlobalOpenTelemetry
Automatically set span factory based on presence of OpenTelemetry (#3858)
SentrySpanFactoryHolder
has been removed as it is no longer required.Replace deprecated
SimpleInstrumentation
withSimplePerformantInstrumentation
for graphql 22 (#3974)We now hold a strong reference to the underlying OpenTelemetry span when it is created through Sentry API (#3997)
Defer sampling decision by setting
sampled
tonull
inPropagationContext
when using OpenTelemetry in case of an incoming defer samplingsentry-trace
header. (#3945)Build
PropagationContext
fromSamplingDecision
made bySentrySampler
instead of parsing headers and potentially ignoring a sampling decision in case asentry-trace
header comes in with deferred sampling decision. (#3947)The Sentry OpenTelemetry Java agent now makes sure Sentry
Scopes
storage is initialized even if the agents auto init is disabled (#3848)Fix
startChild
for span that is not in current OpenTelemetryContext
(#3862)Context
lead to multiple transactions being created (one for the transaction and another per span created).Add
auto.graphql.graphql22
to ignored span origins when using OpenTelemetry (#3828)Use OpenTelemetry span name as fallback for transaction name (#3557)
Add OpenTelemetry span data to Sentry span (#3593)
No longer selectively copy OpenTelemetry attributes to Sentry spans / transactions
data
(#3663)Remove
PROCESS_COMMAND_ARGS
(process.command_args
) OpenTelemetry span attribute as it can be very large (#3664)Use RECORD_ONLY sampling decision if performance is disabled (#3659)
Sentry OpenTelemetry Java Agent now sets Instrumenter to SENTRY (used to be OTEL) (#3697)
Set span origin in
ActivityLifecycleIntegration
on span options instead of after creating the span / transaction (#3702)Honor ignored span origins in
SentryTracer.startChild
(#3704)Use span id of remote parent (#3548)
Attach active span to scope when using OpenTelemetry (#3549)
Record dropped spans in client report when sampling out OpenTelemetry spans (#3552)
Retrieve the correct current span from
Scope
/Scopes
when using OpenTelemetry (#3554)Support spans that are split into multiple batches (#3539)
Partially fix bootstrap class loading (#3543)
Scopes
being active inside each OpenTelemetryContext
due to using context keys from more than one class loader.The Spring Boot 3 WebFlux sample now uses our GraphQL v22 integration (#3828)
Do not ignore certain span origins for OpenTelemetry without agent (#3856)
span.startChild
now uses.makeCurrent()
by default (#3544)Do not set the exception group marker when there is a suppressed exception (#4056)
Dependencies
Migration Guide / Deprecations
Please take a look at our migration guide in docs.
Hub
has been deprecated, we're replacing the following:IHub
has been replaced byIScopes
, however you should be able to simply passIHub
instances to code expectingIScopes
, allowing for an easier migration.HubAdapter.getInstance()
has been replaced byScopesAdapter.getInstance()
.clone()
method onIHub
/IScopes
has been deprecated, please use.pushScope()
or.pushIsolationScope()
instead.getCurrentHub()
and.setCurrentHub()
have also been replaced.Sentry.popScope
has been replaced by calling.close()
on the token returned bySentry.pushScope()
andSentry.pushIsolationScope()
. The token can also be used in atry
block like this:as well as:
SentrySpanProcessor
,SentryPropagator
,OpenTelemetryLinkErrorEventProcessor
). Please take a look at docs on how to setup OpenTelemetry in v8.You may also use
LifecycleHelper.close(token)
, e.g. in case you need to pass the token around for closing later.Changes from
rc.4
If you have been using
8.0.0-rc.4
of the Java SDK, here's the new changes that have been included in the8.0.0
release:SentryClient
constructor public (#4045)"{{auto}}"
if sendDefaultPii is enabled (#4072)7.20.0
Features
To enable Replay use the
sessionReplay.sessionSampleRate
orsessionReplay.onErrorSampleRate
options.Fixes
Internal
SdkVersion
for replay events (#4014)Breaking changes
experimental
to the mainoptions
object (#4017)7.19.1
Fixes
GestureRecorder
(#4001)Internal
7.19.0
Fixes
IndexOutOfBoundsException
when tracking window changesIllegalStateException
when adding/removing draw listener for a dead viewConcurrentModificationException
when registering window listeners and stoppingWindowRecorder
/GestureRecorder
Dependencies
7.18.1
Fixes
7.18.0
Features
beforeSendReplay
callback (#3855)Fixes
Dependencies
7.17.0
Features
Random
instance per thread to improve SDK performance (#3835)Fixes
7.16.0
Features
Fixes
enableTracing
option (#3777)java.util.Random
and replacejava.security.SecureRandom
usages (#3783)Log
calls on app startup (#3793)Breaking changes
addIntegrationToSdkVersion(Ljava/lang/Class;)V
has been removed from the core (io.sentry:sentry
) package. Please make sure all of the packages (e.g.io.sentry:sentry-android-core
,io.sentry:sentry-android-fragment
,io.sentry:sentry-okhttp
and others) are all aligned and using the same version to prevent theNoSuchMethodError
exception.7.16.0-alpha.1
Features
Fixes
enableTracing
option (#3777)java.util.Random
and replacejava.security.SecureRandom
usages (#3783)Log
calls on app startup (#3793)7.15.0
Features
feedback
envelope header item type (#3687)android:tag="sentry-mask|sentry-unmask"
in XML orview.setTag("sentry-mask|sentry-unmask")
in code tags<tag android:id="id/sentry_privacy" android:value="mask|unmask"/>
in XML orview.setTag(io.sentry.android.replay.R.id.sentry_privacy, "mask|unmask")
in codeview.sentryReplayMask()
orview.sentryReplayUnmask()
extension functionsView
s of a certain type by adding fully-qualified classname to one of the listsoptions.experimental.sessionReplay.addMaskViewClass()
oroptions.experimental.sessionReplay.addUnmaskViewClass()
. Note, that all of the view subclasses/subtypes will be masked/unmasked as wellTextView
s and their subclasses (RadioButton
,EditText
, etc.):options.experimental.sessionReplay.addMaskViewClass("android.widget.TextView")
Modifier.sentryReplayMask()
andModifier.sentryReplayUnmask()
modifiersWebView
,VideoView
andandroidx.media3.ui.PlayerView
by default (#3775)Fixes
TextView
s with Spans (#3682)Calendar.getInstance
usage in Breadcrumbs constructor (#3736)SentryOptions
members to avoid ANRs on app start (#3749)Breaking changes:
options.experimental.sessionReplay.errorSampleRate
was renamed tooptions.experimental.sessionReplay.onErrorSampleRate
(#3637)io.sentry.session-replay.error-sample-rate
was renamed toio.sentry.session-replay.on-error-sample-rate
(#3637)redactAllText
andredactAllImages
tomaskAllText
andmaskAllImages
(#3741)7.14.0
Features
Fixes
buffer
replay type for the entire replay when converting from buffer mode to session modebuffer
modeRejectedExecutionException
when redacting a screenshotFileNotFoundException
when persisting segment valuesChores
ReplayShadowMediaCodec
and refactor tests using custom encoder (#3612)7.13.0
Features
Fixes
session
mode at 1 hour deadlineDependencies
7.12.1
Fixes
7.12.0
Features
Session Replay Public Beta (#3339)
To enable Replay use the
sessionReplay.sessionSampleRate
orsessionReplay.errorSampleRate
experimental options.To learn more visit Sentry's Mobile Session Replay documentation page.
7.11.0
Features
Fixes
User.segment
. Use a custom tag or context instead. (#3511)Dependencies
7.10.0
Features
Fixes
span.frame_delay
calculation for early app start spans (#3427)ShutdownHookIntegration
and the VM is shutting down (#3456)7.9.0
Features
Fixes
7.8.0
Features
Fixes
7.7.0
Features
Fixes
Fix java.lang.ClassNotFoundException: org.springframework.web.servlet.HandlerExceptionResolver
in Spring Boot Servlet mode without WebMVC (#3333)7.6.0
Features
Use the Metrics API to track processing time, download sizes, user signups, and conversion rates and correlate them back to tracing data in order to get deeper insights and solve issues faster. Our API supports counters, distributions, sets, gauges and timers, and it's easy to get started: