Releases: getsentry/sentry-java
Releases · getsentry/sentry-java
8.0.0-beta.2
Breaking Changes
- Use String instead of UUID for SessionId (#3834)
- The
Session
constructor now takes aString
instead of aUUID
for thesessionId
parameter. Session.getSessionId()
now returns aString
instead of aUUID
.
- The
- The Android minSdk level for all Android modules is now 21 (#3852)
- The minSdk level for sentry-android-ndk changed from 19 to 21 (#3851)
- All status codes below 400 are now mapped to
SpanStatus.OK
(#3869)
Features
- Spring Boot now automatically detects if OpenTelemetry is available and makes use of it (#3846)
- This is only enabled if there is no OpenTelemetry agent available
- We prefer to use the OpenTelemetry agent as it offers more auto instrumentation
- In some cases the OpenTelemetry agent cannot be used, please see https://opentelemetry.io/docs/zero-code/java/spring-boot-starter/ for more details on when to prefer the Agent and when the Spring Boot starter makes more sense.
- In this mode the SDK makes use of the
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)
- This means Spring Boot config mechanisms can now be combined with our OpenTelemetry agent
- The
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. - The
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. - In this mode the SDK makes use of
GlobalOpenTelemetry
- Automatically set span factory based on presence of OpenTelemetry (#3858)
SentrySpanFactoryHolder
has been removed as it is no longer required.
- Add
ignoredTransactions
option to filter out transactions by name (#3871)- can be used via ENV vars, e.g.
SENTRY_IGNORED_TRANSACTIONS=POST /person/,GET /pers.*
- can also be set in options directly, e.g.
options.setIgnoredTransactions(...)
- can also be set in
sentry.properties
, e.g.ignored-transactions=POST /person/,GET /pers.*
- can also be set in Spring config
application.properties
, e.g.sentry.ignored-transactions=POST /person/,GET /pers.*
- can be used via ENV vars, e.g.
- Add a sample for showcasing Sentry with OpenTelemetry for Spring Boot 3 with our Java agent (
sentry-samples-spring-boot-jakarta-opentelemetry
) (#3856) - Add a sample for showcasing Sentry with OpenTelemetry for Spring Boot 3 without our Java agent (
sentry-samples-spring-boot-jakarta-opentelemetry-noagent
) (#3856) - Add a sample for showcasing Sentry with OpenTelemetry (
sentry-samples-console-opentelemetry-noagent
) (#3856) - Add
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
.- If both the param on
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.
- Lazy uuid generation for SentryId and SpanId (#3770)
- Faster generation of Sentry and Span IDs (#3818)
- Uses faster implementation to convert UUID to SentryID String
- Uses faster Random implementation to generate UUIDs
- Android 15: Add support for 16KB page sizes (#3851)
- See https://developer.android.com/guide/practices/page-sizes for more details
Fixes
- The Sentry OpenTelemetry Java agent now makes sure Sentry
Scopes
storage is initialized even if the agents auto init is disabled (#3848)- This is required for all integrations to work together with our OpenTelemetry Java agent if its auto init has been disabled and the SDKs init should be used instead.
- Do not ignore certain span origins for OpenTelemetry without agent (#3856)
- Fix
startChild
for span that is not in current OpenTelemetryContext
(#3862)- Starting a child span from a transaction that wasn't in the current
Context
lead to multiple transactions being created (one for the transaction and another per span created).
- Starting a child span from a transaction that wasn't in the current
- Add
auto.graphql.graphql22
to ignored span origins when using OpenTelemetry (#3828) - The Spring Boot 3 WebFlux sample now uses our GraphQL v22 integration (#3828)
- All status codes below 400 are now mapped to
SpanStatus.OK
(#3869)
Dependencies
Behavioural Changes
- (Android) Enable Performance V2 by default (#3824)
- With this change cold app start spans will include spans for ContentProviders, Application and Activity load.
7.17.0
Features
- Add meta option to set the maximum amount of breadcrumbs to be logged. (#3836)
- Use a separate
Random
instance per thread to improve SDK performance (#3835)
Fixes
- Using MaxBreadcrumb with value 0 no longer crashes. (#3836)
- Accept manifest integer values when requiring floating values (#3823)
- Fix standalone tomcat jndi issue (#3873)
- Using Sentry Spring Boot on a standalone tomcat caused the following error:
- Failed to bind properties under 'sentry.parsed-dsn' to io.sentry.Dsn
- Using Sentry Spring Boot on a standalone tomcat caused the following error:
7.17.0-alpha.1
Features
- Android 15: Add support for 16KB page sizes (#3620)
- See https://developer.android.com/guide/practices/page-sizes for more details
7.16.0
Features
- Add meta option to attach ANR thread dumps (#3791)
Fixes
- Cache parsed Dsn (#3796)
- fix invalid profiles when the transaction name is empty (#3747)
- Deprecate
enableTracing
option (#3777) - Vendor
java.util.Random
and replacejava.security.SecureRandom
usages (#3783) - Fix potential ANRs due to NDK scope sync (#3754)
- Fix potential ANRs due to NDK System.loadLibrary calls (#3670)
- Fix slow
Log
calls on app startup (#3793) - Fix slow Integration name parsing (#3794)
- Session Replay: Reduce startup and capture overhead (#3799)
- Load lazy fields on init in the background (#3803)
- Replace setOf with HashSet.add (#3801)
Breaking changes
- The method
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
- Add meta option to attach ANR thread dumps (#3791)
Fixes
- Cache parsed Dsn (#3796)
- fix invalid profiles when the transaction name is empty (#3747)
- Deprecate
enableTracing
option (#3777) - Vendor
java.util.Random
and replacejava.security.SecureRandom
usages (#3783) - Fix potential ANRs due to NDK scope sync (#3754)
- Fix potential ANRs due to NDK System.loadLibrary calls (#3670)
- Fix slow
Log
calls on app startup (#3793) - Fix slow Integration name parsing (#3794)
- Session Replay: Reduce startup and capture overhead (#3799)
8.0.0-beta.1
Breaking Changes
- Throw IllegalArgumentException when calling Sentry.init on Android (#3596)
- Metrics have been removed from the SDK (#3774)
- Metrics will return but we don't know in what exact form yet
enableTracing
option (a.k.aenable-tracing
) has been removed from the SDK (#3776)- Please set
tracesSampleRate
to a value >= 0.0 for enabling performance instead. The default value isnull
which means performance is disabled.
- Please set
- Change OkHttp sub-spans to span attributes (#3556)
- This will reduce the number of spans created by the SDK
- Replace
synchronized
methods and blocks withReentrantLock
(AutoClosableReentrantLock
) (#3715)- If you are subclassing any Sentry classes, please check if the parent class used
synchronized
before. Please make sure to use the same lock object as the parent class in that case.
- If you are subclassing any Sentry classes, please check if the parent class used
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)- One of the
AndroidTransactionProfiler
constructors has been removed, please use a different one (#3780)
Features
- Add init priority settings (#3674)
- You may now set
forceInit=true
(force-init
for.properties
files) to ensure a call to Sentry.init / SentryAndroid.init takes effect
- You may now set
- Add force init option to Android Manifest (#3675)
- Use
<meta-data android:name="io.sentry.force-init" android:value="true" />
to ensure Sentry Android auto init is not easily overwritten
- Use
- Attach request body for
application/x-www-form-urlencoded
requests in Spring (#3731)- Previously request body was only attached for
application/json
requests
- Previously request body was only attached for
- Set breadcrumb level based on http status (#3771)
- Support
graphql-java
v22 via a new modulesentry-graphql-22
(#3740)- If you are using
graphql-java
v21 or earlier, you can use thesentry-graphql
module - For
graphql-java
v22 and newer please use thesentry-graphql-22
module
- If you are using
- We now provide a
SentryInstrumenter
bean directly for Spring (Boot) if there is none yet instead of usingGraphQlSourceBuilderCustomizer
to add the instrumentation (#3744)- It is now also possible to provide a bean of type
SentryGraphqlInstrumentation.BeforeSpanCallback
which is then used bySentryInstrumenter
- It is now also possible to provide a bean of type
- Emit transaction.data inside contexts.trace.data (#3735)
- Also does not emit
transaction.data
inexras
anymore
- Also does not emit
Fixes
- Use OpenTelemetry span name as fallback for transaction name (#3557)
- In certain cases we were sending transactions as "" when using OpenTelemetry
- 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)
- Also fix check whether Performance is enabled when making a sampling decision in the OpenTelemetry sampler
- 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)- This allows spans to be filtered by span origin on creation
- Honor ignored span origins in
SentryTracer.startChild
(#3704) - Add
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) - Trace context on
Contexts.setTrace
has been marked@NotNull
(#3721)- Setting it to
null
would cause an exception. - Transactions are dropped if trace context is missing
- Setting it to
- Remove internal annotation on
SpanOptions
(#3722) SentryLogbackInitializer
is now public (#3723)- Fix order of calling
close
on previous Sentry instance when re-initializing (#3750)- Previously some parts of Sentry were immediately closed after re-init that should have stayed open and some parts of the previous init were never closed
Behavioural Changes
- (Android) Replace thread id with kernel thread id in span data (#3706)
Dependencies
- Bump OpenTelemetry to 1.41.0, OpenTelemetry Java Agent to 2.7.0 and Semantic Conventions to 1.25.0 (#3668)
7.15.0
Features
- Add support for
feedback
envelope header item type (#3687) - Add breadcrumb.origin field (#3727)
- Session Replay: Add options to selectively mask/unmask views captured in replay. The following options are available: (#3689)
android:tag="sentry-mask|sentry-unmask"
in XML orview.setTag("sentry-mask|sentry-unmask")
in code tags- if you already have a tag set for a view, you can set a tag by id:
<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 code
- if you already have a tag set for a view, you can set a tag by id:
view.sentryReplayMask()
orview.sentryReplayUnmask()
extension functions- mask/unmask
View
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 well- For example, (this is already a default behavior) to mask all
TextView
s and their subclasses (RadioButton
,EditText
, etc.):options.experimental.sessionReplay.addMaskViewClass("android.widget.TextView")
- If you're using code obfuscation, adjust your proguard-rules accordingly, so your custom view class name is not minified
- For example, (this is already a default behavior) to mask all
- Session Replay: Support Jetpack Compose masking (#3739)
- To selectively mask/unmask Composables, use
Modifier.sentryReplayMask()
andModifier.sentryReplayUnmask()
modifiers
- To selectively mask/unmask Composables, use
- Session Replay: Mask
WebView
,VideoView
andandroidx.media3.ui.PlayerView
by default (#3775)
Fixes
- Avoid stopping appStartProfiler after application creation (#3630)
- Session Replay: Correctly detect dominant color for
TextView
s with Spans (#3682) - Fix ensure Application Context is used even when SDK is initialized via Activity Context (#3669)
- Fix potential ANRs due to
Calendar.getInstance
usage in Breadcrumbs constructor (#3736) - Fix potential ANRs due to default integrations (#3778)
- Lazily initialize heavy
SentryOptions
members to avoid ANRs on app start (#3749)
Breaking changes:
options.experimental.sessionReplay.errorSampleRate
was renamed tooptions.experimental.sessionReplay.onErrorSampleRate
(#3637)- Manifest option
io.sentry.session-replay.error-sample-rate
was renamed toio.sentry.session-replay.on-error-sample-rate
(#3637) - Change
redactAllText
andredactAllImages
tomaskAllText
andmaskAllImages
(#3741)
7.15.0-alpha.1
Features
- Add support for setting sentry-native handler_strategy (#3671)
Dependencies
- Bump
sentry-native
SDK tod11359b
of feat/inproc_handler_strategy- See the following issue for more details: getsentry/sentry-native#1026
7.14.0 (Stable)
Features
- Session Replay: Gesture/touch support for Flutter (#3623)
Fixes
- Fix app start spans missing from Pixel devices (#3634)
- Avoid ArrayIndexOutOfBoundsException on Android cpu data collection (#3598)
- Fix lazy select queries instrumentation (#3604)
- Session Replay: buffer mode improvements (#3622)
- Align next segment timestamp with the end of the buffered segment when converting from buffer mode to session mode
- Persist
buffer
replay type for the entire replay when converting from buffer mode to session mode - Properly store screen names for
buffer
mode
- Session Replay: fix various crashes and issues (#3628)
- Fix video not being encoded on Pixel devices
- Fix SIGABRT native crashes on Xiaomi devices when encoding a video
- Fix
RejectedExecutionException
when redacting a screenshot - Fix
FileNotFoundException
when persisting segment values
Chores
- Introduce
ReplayShadowMediaCodec
and refactor tests using custom encoder (#3612)
7.13.0
Features
- Session Replay: (#3565) (#3609)
- Capture remaining replay segment for ANRs on next app launch
- Capture remaining replay segment for unhandled crashes on next app launch
Fixes
- Session Replay: (#3565) (#3609)
- Fix stopping replay in
session
mode at 1 hour deadline - Never encode full frames for a video segment, only do partial updates. This further reduces size of the replay segment
- Use propagation context when no active transaction for ANRs
- Fix stopping replay in
Dependencies
- Bump Spring Boot to 3.3.2 (#3541)