chore(deps): update Java SDK to v8.6.0 #350
Merged
+31
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps scripts/update-java.sh from 7.18.1 to 8.6.0.
Auto-generated by a dependency updater.
Changelog
8.6.0
Behavioral Changes
Sentry.init/SentryAndroid.initthe SDK now checks if all Sentry Java / Android SDK dependencies have the same version.Features
MANIFEST.MFto Sentry JARs (#4272)Fixes
SentryOptions(#4262)ARGB_8888for screenshots (#4282)MANIFEST.MFofsentry-opentelemetry-agentnow hasImplementation-Versionset to the raw version (#4291)8.6.0Sentry-Version-Nameattribute looks likesentry-8.5.0-otel-2.10.0Sentry.flushcomment (#4305)Internal
platformto SentryEnvelopeItemHeader (#4287)androidplatform to ProfileChunk envelope item headerDependencies
8.5.0
Features
Add native stack frame address information and debug image metadata to ANR events (#4061)
Add Continuous Profiling Support (#3710)
To enable Continuous Profiling use the
Sentry.startProfilerandSentry.stopProfilerexperimental APIs. Sampling rate can be set throughoptions.profileSessionSampleRate, which defaults to null (disabled).Note: Both
options.profilesSamplerandoptions.profilesSampleRatemust not be set to enable Continuous Profiling.To learn more visit Sentry's Continuous Profiling documentation page.
Fixes
SpringServletTransactionNameProvideras fallback for Spring WebMVC (#4263)SpringMvcTransactionNameProviderwhich would provide the route as transaction name.SpringServletTransactionNameProvidernext, which returns the URL of the request.Behavioral Changes
device.nameis not reported anymore via the device context, even ifoptions.isSendDefaultPiiis enabled (#4179)Dependencies
8.4.0
Fixes
nullon many APIs instead of expecting a nonnullvalue (#4245)setTag,setData,setExtra,setContextpreviously caused aNullPointerExceptionwhen invoked with eithernullkey or value.nullis passed and no longer throwsNullPointerExceptionnullis passed, the SDK willnullkey is passed, returningnullfor non void methodsnullRequestby subsequent interceptors won't be consideredThrowableto Sentry as it's not availableOpenTelemetryAppender, please consider upgrading to v2SamplingContextnow has agetAttributemethod that grants access to OpenTelemetry span attributes via their String key (e.g.http.request.method)http.clientfor spanopif not a root span (#4257)CopyOnWriteArrayList(#4247)SentryTracer.getLatestActiveSpanwhich would have previously copied all child span references. This may have causedOutOfMemoryErroron certain devices due to high frequency of calling the method.Features
openTelemetrySpan.recordException). We can now send those to Sentry as errors.capture-open-telemetry-events=trueinsentry.propertiesto enable itsentry.capture-open-telemetry-events=truein Springsapplication.propertiesto enable itsentry.captureOpenTelemetryEvents: truein Springsapplication.ymlto enable itBehavioural Changes
java.net.URIfor parsing URLs inUrlUtils(#4210)Internal
Dependencies
8.3.0
Features
requestin payload (#4102)contexts/otel/attributesof the event.ignoredErrorsoption is now configurable via the manifest propertyio.sentry.traces.ignored-errors(#4178)enableTraceIdGenerationto the AndroidOptions. This allows Hybrid SDKs to "freeze" and control the trace and connect errors on different layers of the application (4188)sentry.keep-transactions-open-for-async-responses=trueinapplication.propertiesorsentry.keepTransactionsOpenForAsyncResponses: trueinapplication.ymlSentryHandlerfor disabling external config (#4208)Fixes
ignoredErrors,ignoredTransactionsandignoredCheckInsSentryOptions.setTracePropagationTargetsis no longer marked internal (#4170)tracePropagationTargetsin OpenTelemetry propagator (#4191)tracePropagationTargetsbefore attachingsentry-traceandbaggageheaders to outgoing requestsignoredErrors,ignoredTransactionsandignoredCheckInsbeing unset by external options likesentry.propertiesor ENV vars (#4207)enableExternalConfiguration), which is the default for many integrations, the values set onSentryOptionspassed toSentry.initwould be lostBehavioural Changes
io.sentry.spring.jakarta.webflux.ReactorUtilsis now deprecated, please useio.sentry.reactor.SentryReactorUtilsin the newsentry-reactormodule instead (#4155)apidependency when usingsentry-spring-boot-jakarta(Spring Boot 3) orsentry-spring-jakarta(Spring 6).Therefore, if you're using one of those modules, changing your imports will suffice.
8.2.0
Breaking Changes
Features
Appcontext (#3193)withSentryObservableEffectmethod overload that acceptsSentryNavigationListeneras a parameter (#4143)SentryNavigationListenerinstance across fragments and composables to preserve the tracebaggageheader on outgoing requestssampleRatethat is sent to Sentry and attached to thebaggageheader on outgoing requests (#4158)sampleRateortracesSamplercallback, it now updates thesampleRatein Dynamic Sampling Context.Fixes
OtelContextScopesStoragecannot be found (#4127)java.lang.ClassNotFoundException: io.sentry.opentelemetry.OtelContextScopesStoragewas shown in the log if the class could not be found.FileNotFoundExceptionwhen trying to read/write.ongoing_segmentfileIllegalStateExceptionwhen registeringonDrawListener.modulemetadata (#3936)Dependencies
8.1.0
Features
options.ignoredErrorsto filter out errors that match a certain String or Regex (#4083)event.message,event.formatted, and{event.throwable.class.name}: {event.throwable.message}sentry.properties, e.g.ignored-errors=Some error,Another .*SENTRY_IGNORED_ERRORS=Some error,Another .*application.properties, e.g.sentry.ignored-errors=Some error,Another .*Fixes
requestdetails to transactions created through OpenTelemetry (#4098)java.lang.ClassNotFoundExceptiondebug logs when searching for OpenTelemetry marker classes (#4091)io.sentry.opentelemetry.agent.AgentMarker,io.sentry.opentelemetry.agent.AgentlessMarkerandio.sentry.opentelemetry.agent.AgentlessSpringMarker.UserInteractionIntegration(#4051)Behavioural Changes
TempSensorBreadcrumbsIntegrationPhoneStateBreadcrumbsIntegrationSystemEventsBreadcrumbsIntegrationCurrent list of the broadcast events can be found here. If you'd like to subscribe for more events, consider overriding the
SystemEventsBreadcrumbsIntegrationas follows:If you would like to keep some of the default broadcast events as breadcrumbs, consider opening a GitHub issue.
typetosuppressedfor suppressed exceptions (#4125)Dependencies
3.4.2(#4081)8.0.0
Summary
Version 8 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are:
Hubhas been replaced byScopesScopetypes have been introduced, see "Behavioural Changes" for more details.Scopelifecycle, see "Behavioural Changes" for more details.minSdklevel to 21 (Android 5.0)sentry-opentelemetry-agenthas been improved and now works in combination with the rest of Sentry. You may now combine OpenTelemetry and Sentry for instrumenting your application.Scopesthrough reactive libraries like RxJava.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.0or higher. If you are using an older version of self-hosted Sentry (aka onpremise), you will need to upgrade. If you're usingsentry.iono action is required.Breaking Changes
enableTracingoption (a.k.aenable-tracing) has been removed from the SDK (#3776)tracesSampleRateto a value >= 0.0 for enabling performance instead. The default value isnullwhich means performance is disabled.synchronizedmethods and blocks withReentrantLock(AutoClosableReentrantLock) (#3715)synchronizedbefore. Please make sure to use the same lock object as the parent class in that case.traceOriginsoption (io.sentry.traces.tracing-originsin manifest) has been removed, please usetracePropagationTargets(io.sentry.traces.trace-propagation-targetsin manifest`) instead (#3780)profilingEnabledoption (io.sentry.traces.profiling.enablein manifest) has been removed, please useprofilesSampleRate(io.sentry.traces.profiling.sample-rateinstead) instead (#3780)shutdownTimeoutoption has been removed, please useshutdownTimeoutMillisinstead (#3780)profilingTracesIntervalMillisoption for Android has been removed (#3780)io.sentry.session-tracking.enablemanifest 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.otherhas been removed, please usedatainstead (#3780)SdkVersion.getIntegrations()has been removed, please usegetIntegrationSetinstead (#3780)SdkVersion.getPackages()has been removed, please usegetPackageSet()instead (#3780)Device.languagehas been removed, please uselocaleinstead (#3780)TraceContext.userandTraceContextUserclass have been removed, please useuserIdonTraceContextinstead (#3780)TransactionContext.fromSentryTrace()has been removed, please useSentry.continueTrace()instead (#3780)SentryDataFetcherExceptionHandlerhas been removed, please useSentryGenericDataFetcherExceptionHandlerin combination withSentryInstrumentationinstead (#3780)sentry-android-okhttphas been removed in favor ofsentry-okhttp, removing android dependency from the module (#3510)Contextsno longer extendsConcurrentHashMap, instead we offer a selected set of methods.AndroidTransactionProfilerconstructors has been removed, please use a different one (#3780)Sessionconstructor now takes aStringinstead of aUUIDfor thesessionIdparameter.Session.getSessionId()now returns aStringinstead of aUUID.SpanStatus.OK(#3869)instrumenteroption should no longer be needed as our new OpenTelemetry integration now works in combination with the rest of SentryBehavioural Changes
Scopetypes 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. SinceHubis 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.inithas 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, SpringAsyncand more.Sentry.configureScope(ScopeType.CURRENT, (scope) -> { ... }).Sentry.popScopehas been deprecated, please call.close()on the token returned bySentry.pushScopeinstead or use it in a way described in more detail in our migration guide.Sentry.configureScope()as well as API likeSentry.setTag()CURRENTscopeISOLATIONscopeScopecan now be ordered by overriding thegetOrdermethod on implementations ofEventProcessor. NOTE: This order only applies to event processors onScopebut notSentryOptionsat the moment. Feel free to request this if you need it.Hubis deprecated in favor ofScopes, alongside someHubrelevant APIs. More details can be found in our migration guide.isSendDefaultPiiistrue(#3919)sentry-samples/sentry-samples-androidexample on how to configure CMake and consumesentry.h"{{auto}}"ifsendDefaultPiiis enabled (#4072)Features
sentry-opentelemetry-agenthas 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).OtelSpanFactoryinstead ofDefaultSpanFactorywhich is done automatically by the auto init of the Java Agent.Samplerwhich uses Sentry sampling configurationContextfor storing SentryScopes(which is similar to what used to be calledHub) and thus relies on OpenTelemetry forContextpropagation.sentry-opentelemetry-agentless-springmodule (#4000)OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=noneenv vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.sentry-opentelemetry-agentlessmodule (#3961)-Dotel.java.global-autoconfigure.enabled=trueon thejavacommand, when starting your application.OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=noneenv vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.OpenTelemetryUtil.applyOpenTelemetryOptionsnow takes an enum instead of a boolean for its modeopenTelemetryModeoption (#3994)AUTOmeaning the SDK will figure out how to best configure itself for use with OpenTelemetryOFF(#3995)AGENTwhen usingsentry-opentelemetry-agentAGENTLESSwhen usingsentry-opentelemetry-agentlessAGENTLESS_SPRINGwhen usingsentry-opentelemetry-agentless-springignoredTransactionsoption 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.*scopeBindingModetoSpanOptions(#4004)AUTOmeaning 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.ONsets the new span on the current scope.OFFdoes not set the new span on the scope.ignoredSpanOriginsoption for ignoring spans coming from certain integrationsgraphql-javav22 via a new modulesentry-graphql-22(#3740)graphql-javav21 or earlier, you can use thesentry-graphqlmodulegraphql-javav22 and newer please use thesentry-graphql-22moduleSentryInstrumenterbean directly for Spring (Boot) if there is none yet instead of usingGraphQlSourceBuilderCustomizerto add the instrumentation (#3744)SentryGraphqlInstrumentation.BeforeSpanCallbackwhich is then used bySentryInstrumenterThreadLocalAccessorfor Spring Boot 3 WebFlux by default (#4023)environmenttoCheckinUtils.withCheckIn(3889)globalHubModeto options (#3805)globalHubModeused 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.initand the option are set, the option will win. By default the option is set tonullmeaning whatever is passed toSentry.inittakes effect.forceInit=true(force-initfor.propertiesfiles) 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-urlencodedrequests in Spring (#3731)application/jsonrequeststransaction.datainextrasanymoresentry-samples-spring-boot-jakarta-opentelemetry) (#3856)sentry-samples-spring-boot-jakarta-opentelemetry-noagent) (#3856)sentry-samples-console-opentelemetry-noagent) (#3856)Fixes
sentry-traceheader (#3942)sentry-traceheader that only contains trace ID and span ID but no sampled flag (-1,-0suffix) means the receiving system can make its own sampling decisionsentry-traceheader fromPropagationContextwe now copy thesampledflag.TransactionContext.fromPropagationContextwhen there is no parent sampling decision, keep the decisionnullso a new sampling decision is made instead of defaulting tofalsecloseon previous Sentry instance when re-initializing (#3750)SpanStatus.OK(#3869)ContentCachingRequestWrapperinstead of our own Wrapper to also cache parameters (#3641)shutdownTimeoutMillis(defaulting to 2s) instead of being able to terminate immediately.continueTraceand also do not inject tracing headers if the integration has been added toignoredSpanOriginsDiskFlushNotificationhint flushed when rate limited (#3892)UncaughtExceptionHandlerIntegrationwaited for the full flush timeout duration (default 15s) when rate limited.opwith auto generated content for OpenTelemetry spans with span kindINTERNAL(#3906)enable-spotlightandspotlight-connection-urlto external options and check if spotlight is enabled when deciding whether to inspect an OpenTelemetry span for connecting to splotlight (#3709)Contexts.setTracehas been markedNotNull(#3721)nullwould cause an exception.SpanOptions(#3722)SentryLogbackInitializeris now public (#3723)send-default-piiandmax-request-body-sizefromsentry.properties(#3534)TracesSampleris now only created once inSentryOptionsinstead of creating a new one for everyHub(which is nowScopes). This means we're now creating fewerSecureRandominstances.Internal
SentryClientconstructor 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_PATHspan attribute into description (#3933)Replace OpenTelemetry
ContextStoragewrapper withContextStorageProvider(#3938)ContextwhereasContextStorageProvideris automatically invoked at the correct time.Send
otel.kindto Sentry (#3907)Spring Boot now automatically detects if OpenTelemetry is available and makes use of it (#3846)
OpenTelemetrybean that is created byopentelemetry-spring-boot-starterinstead ofGlobalOpenTelemetrySpring Boot now automatically detects our OpenTelemetry agent if its auto init is disabled (#3848)
sentry-opentelemetry-extramodule has been removed again, most classes have been moved tosentry-opentelemetry-bootstrapwhich is loaded into the bootstrap classloader (i.e.null) when our Java agent is used. The rest has been moved intosentry-opentelemetry-agentcustomizationand is loaded into the agent classloader when our Java agent is used.sentry-opentelemetry-bootstrapandsentry-opentelemetry-agentcustomizationmodules 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-noagentsample.GlobalOpenTelemetryAutomatically set span factory based on presence of OpenTelemetry (#3858)
SentrySpanFactoryHolderhas been removed as it is no longer required.Replace deprecated
SimpleInstrumentationwithSimplePerformantInstrumentationfor 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
sampledtonullinPropagationContextwhen using OpenTelemetry in case of an incoming defer samplingsentry-traceheader. (#3945)Build
PropagationContextfromSamplingDecisionmade bySentrySamplerinstead of parsing headers and potentially ignoring a sampling decision in case asentry-traceheader comes in with deferred sampling decision. (#3947)The Sentry OpenTelemetry Java agent now makes sure Sentry
Scopesstorage is initialized even if the agents auto init is disabled (#3848)Fix
startChildfor span that is not in current OpenTelemetryContext(#3862)Contextlead to multiple transactions being created (one for the transaction and another per span created).Add
auto.graphql.graphql22to 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
ActivityLifecycleIntegrationon 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/Scopeswhen using OpenTelemetry (#3554)Support spans that are split into multiple batches (#3539)
Partially fix bootstrap class loading (#3543)
Scopesbeing active inside each OpenTelemetryContextdue 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.startChildnow 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.
Hubhas been deprecated, we're replacing the following:IHubhas been replaced byIScopes, however you should be able to simply passIHubinstances to code expectingIScopes, allowing for an easier migration.HubAdapter.getInstance()has been replaced byScopesAdapter.getInstance()