fix(deps): update io.sentry:sentry-bom to v8 #144
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.
This PR contains the following updates:
7.20.1
->8.0.0
Release Notes
getsentry/sentry-java (io.sentry:sentry-bom)
v8.0.0
Compare Source
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
)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, Spring@Async
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 "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 the "Migration Guide" section.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
inexras
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 marked@NotNull
(#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)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.