|
2 | 2 |
|
3 | 3 | ## Unreleased |
4 | 4 |
|
| 5 | +### Behavioural Changes |
| 6 | + |
| 7 | +- (Android) The JNI layer for sentry-native has now been moved from sentry-java to sentry-native ([#3189](https://github.com/getsentry/sentry-java/pull/3189)) |
| 8 | + - This now includes prefab support for sentry-native, allowing you to link and access the sentry-native API within your native app code |
| 9 | + - Checkout the `sentry-samples/sentry-samples-android` example on how to configure CMake and consume `sentry.h` |
| 10 | + |
| 11 | +### Features |
| 12 | + |
| 13 | +- Our `sentry-opentelemetry-agent` has been completely reworked and now plays nicely with the rest of the Java SDK |
| 14 | + - NOTE: Not all features have been implemented yet for the OpenTelemetry agent. |
| 15 | + - You can add `sentry-opentelemetry-agent` to your setup by downloading the latest release and using it when starting up your application |
| 16 | + - `SENTRY_PROPERTIES_FILE=sentry.properties java -javaagent:sentry-opentelemetry-agent-x.x.x.jar -jar your-application.jar` |
| 17 | + - Please use `sentry.properties` or environment variables to configure the SDK as the agent is now in charge of initializing the SDK and options coming from things like logging integrations or our Spring Boot integration will not take effect. |
| 18 | + - You may find the [docs page](https://docs.sentry.io/platforms/java/tracing/instrumentation/opentelemetry/#using-sentry-opentelemetry-agent-with-auto-initialization) useful. While we haven't updated it yet to reflect the changes described here, the section about using the agent with auto init should still be vaild. |
| 19 | + - What's new about the Agent |
| 20 | + - When the OpenTelemetry Agent is used, Sentry API creates OpenTelemetry spans under the hood, handing back a wrapper object which bridges the gap between traditional Sentry API and OpenTelemetry. We might be replacing some of the Sentry performance API in the future. |
| 21 | + - This is achieved by configuring the SDK to use `OtelSpanFactory` instead of `DefaultSpanFactory` which is done automatically by the auto init of the Java Agent. |
| 22 | + - OpenTelemetry spans are now only turned into Sentry spans when they are finished so they can be sent to the Sentry server. |
| 23 | + - Now registers an OpenTelemetry `Sampler` which uses Sentry sampling configuration |
| 24 | + - Other Performance integrations automatically stop creating spans to avoid duplicate spans |
| 25 | + - The Sentry SDK now makes use of OpenTelemetry `Context` for storing Sentry `Scopes` (which is similar to what used to be called `Hub`) and thus relies on OpenTelemetry for `Context` propagation. |
| 26 | + - Classes used for the previous version of our OpenTelemetry support have been deprecated but can still be used manually. We're not planning to keep the old agent around in favor of less complexity in the SDK. |
| 27 | +- Add `ignoredSpanOrigins` option for ignoring spans coming from certain integrations |
| 28 | + - We pre-configure this to ignore Performance instrumentation for Spring and other integrations when using our OpenTelemetry Agent to avoid duplicate spans |
| 29 | +- Add data fetching environment hint to breadcrumb for GraphQL (#3413) ([#3431](https://github.com/getsentry/sentry-java/pull/3431)) |
| 30 | + |
| 31 | +### Fixes |
| 32 | + |
| 33 | +- `TracesSampler` is now only created once in `SentryOptions` instead of creating a new one for every `Hub` (which is now `Scopes`). This means we're now creating fewwer `SecureRandom` instances. |
| 34 | +- Move onFinishCallback before span or transaction is finished ([#3459](https://github.com/getsentry/sentry-java/pull/3459)) |
| 35 | +- Add timestamp when a profile starts ([#3442](https://github.com/getsentry/sentry-java/pull/3442)) |
| 36 | +- Move fragment auto span finish to onFragmentStarted ([#3424](https://github.com/getsentry/sentry-java/pull/3424)) |
| 37 | +- Remove profiling timeout logic and disable profiling on API 21 ([#3478](https://github.com/getsentry/sentry-java/pull/3478)) |
| 38 | +- Properly reset metric flush flag on metric emission ([#3493](https://github.com/getsentry/sentry-java/pull/3493)) |
| 39 | + |
| 40 | + |
| 41 | +### Dependencies |
| 42 | + |
| 43 | +- Bump Native SDK from v0.7.0 to v0.7.5 ([#3441](https://github.com/getsentry/sentry-java/pull/3189)) |
| 44 | + - [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#075) |
| 45 | + - [diff](https://github.com/getsentry/sentry-native/compare/0.7.0...0.7.5) |
| 46 | + |
| 47 | +## 8.0.0-alpha.1 |
| 48 | + |
| 49 | +Version 8 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are: |
| 50 | + |
| 51 | +- New `Scope` types have been introduced, see "Behavioural Changes" for more details. |
| 52 | +- Lifecycle tokens have been introduced to manage `Scope` lifecycle, see "Behavioural Changes" for more details. |
| 53 | +- `Hub` has been replaced by `Scopes` |
| 54 | + |
| 55 | +### Behavioural Changes |
| 56 | + |
| 57 | +- We're introducing some new `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. Since `Hub` 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. |
| 58 | + - Global scope is attached to all events created by the SDK. It can also be modified before `Sentry.init` has been called. It can be manipulated using `Sentry.configureScope(ScopeType.GLOBAL, (scope) -> { ... })`. |
| 59 | + - Isolation scope can be used e.g. to attach data to all events that come up while handling an incoming request. It can also be used for other isolation purposes. It can be manipulated using `Sentry.configureScope(ScopeType.ISOLATION, (scope) -> { ... })`. The SDK automatically forks isolation scope in certain cases like incoming requests, CRON jobs, Spring `@Async` and more. |
| 60 | + - Current scope is forked often and data added to it is only added to events that are created while this scope is active. Data is also passed on to newly forked child scopes but not to parents. |
| 61 | +- `Sentry.popScope` has been deprecated, please call `.close()` on the token returned by `Sentry.pushScope` instead or use it in a way described in more detail in "Migration Guide". |
| 62 | +- We have chosen a default scope that is used for `Sentry.configureScope()` as well as API like `Sentry.setTag()` |
| 63 | + - For Android the type defaults to `CURRENT` scope |
| 64 | + - For Backend and other JVM applicatons it defaults to `ISOLATION` scope |
| 65 | +- Event processors on `Scope` can now be ordered by overriding the `getOrder` method on implementations of `EventProcessor`. NOTE: This order only applies to event processors on `Scope` but not `SentryOptions` at the moment. Feel free to request this if you need it. |
| 66 | +- `Hub` is deprecated in favor of `Scopes`, alongside some `Hub` relevant APIs. More details can be found in the "Migration Guide" section. |
| 67 | + |
| 68 | +### Breaking Changes |
| 69 | + |
| 70 | +- `Contexts` no longer extends `ConcurrentHashMap`, instead we offer a selected set of methods. |
| 71 | + |
| 72 | +### Migration Guide / Deprecations |
| 73 | + |
| 74 | +- `Hub` has been deprecated, we're replacing the following: |
| 75 | + - `IHub` has been replaced by `IScopes`, however you should be able to simply pass `IHub` instances to code expecting `IScopes`, allowing for an easier migration. |
| 76 | + - `HubAdapter.getInstance()` has been replaced by `ScopesAdapter.getInstance()` |
| 77 | + - The `.clone()` method on `IHub`/`IScopes` has been deprecated, please use `.pushScope()` or `.pushIsolationScope()` instead |
| 78 | + - Some internal methods like `.getCurrentHub()` and `.setCurrentHub()` have also been replaced. |
| 79 | +- `Sentry.popScope` has been replaced by calling `.close()` on the token returned by `Sentry.pushScope()` and `Sentry.pushIsolationScope()`. The token can also be used in a `try` block like this: |
| 80 | + |
| 81 | +``` |
| 82 | +try (final @NotNull ISentryLifecycleToken ignored = Sentry.pushScope()) { |
| 83 | + // this block has its separate current scope |
| 84 | +} |
| 85 | +``` |
| 86 | + |
| 87 | +as well as: |
| 88 | + |
| 89 | + |
| 90 | +``` |
| 91 | +try (final @NotNull ISentryLifecycleToken ignored = Sentry.pushIsolationScope()) { |
| 92 | + // this block has its separate isolation scope |
| 93 | +} |
| 94 | +``` |
| 95 | + |
| 96 | +You may also use `LifecycleHelper.close(token)`, e.g. in case you need to pass the token around for closing later. |
| 97 | + |
| 98 | +### Features |
| 99 | + |
| 100 | +- Report exceptions returned by Throwable.getSuppressed() to Sentry as exception groups ([#3396] https://github.com/getsentry/sentry-java/pull/3396) |
| 101 | + |
| 102 | +## 7.10.0 |
| 103 | + |
| 104 | +### Features |
| 105 | + |
| 106 | +- Publish Gradle module metadata ([#3422](https://github.com/getsentry/sentry-java/pull/3422)) |
| 107 | + |
| 108 | +### Fixes |
| 109 | + |
| 110 | +- Fix faulty `span.frame_delay` calculation for early app start spans ([#3427](https://github.com/getsentry/sentry-java/pull/3427)) |
| 111 | +- Fix crash when installing `ShutdownHookIntegration` and the VM is shutting down ([#3456](https://github.com/getsentry/sentry-java/pull/3456)) |
| 112 | + |
| 113 | +## 7.9.0 |
| 114 | + |
| 115 | +### Features |
| 116 | + |
| 117 | +- Add start_type to app context ([#3379](https://github.com/getsentry/sentry-java/pull/3379)) |
| 118 | +- Add ttid/ttfd contribution flags ([#3386](https://github.com/getsentry/sentry-java/pull/3386)) |
| 119 | + |
| 120 | +### Fixes |
| 121 | + |
| 122 | +- (Internal) Metrics code cleanup ([#3403](https://github.com/getsentry/sentry-java/pull/3403)) |
| 123 | +- Fix Frame measurements in app start transactions ([#3382](https://github.com/getsentry/sentry-java/pull/3382)) |
| 124 | +- Fix timing metric value different from span duration ([#3368](https://github.com/getsentry/sentry-java/pull/3368)) |
| 125 | +- Do not always write startup crash marker ([#3409](https://github.com/getsentry/sentry-java/pull/3409)) |
| 126 | + - This may have been causing the SDK init logic to block the main thread |
| 127 | + |
| 128 | +## 7.8.0 |
| 129 | + |
| 130 | +### Features |
| 131 | + |
| 132 | +- Add description to OkHttp spans ([#3320](https://github.com/getsentry/sentry-java/pull/3320)) |
| 133 | +- Enable backpressure management by default ([#3284](https://github.com/getsentry/sentry-java/pull/3284)) |
| 134 | + |
| 135 | +### Fixes |
| 136 | + |
| 137 | +- Add rate limit to Metrics ([#3334](https://github.com/getsentry/sentry-java/pull/3334)) |
| 138 | +- Fix java.lang.ClassNotFoundException: org.springframework.web.servlet.HandlerMapping in Spring Boot Servlet mode without WebMVC ([#3336](https://github.com/getsentry/sentry-java/pull/3336)) |
| 139 | +- Fix normalization of metrics keys, tags and values ([#3332](https://github.com/getsentry/sentry-java/pull/3332)) |
| 140 | + |
| 141 | +## 7.7.0 |
| 142 | + |
5 | 143 | ### Features |
6 | 144 |
|
7 | 145 | - Add support for Spring Rest Client ([#3199](https://github.com/getsentry/sentry-java/pull/3199)) |
| 146 | +- Extend Proxy options with proxy type ([#3326](https://github.com/getsentry/sentry-java/pull/3326)) |
| 147 | + |
| 148 | +### Fixes |
| 149 | + |
| 150 | +- Fixed default deadline timeout to 30s instead of 300s ([#3322](https://github.com/getsentry/sentry-java/pull/3322)) |
| 151 | +- Fixed `Fix java.lang.ClassNotFoundException: org.springframework.web.servlet.HandlerExceptionResolver` in Spring Boot Servlet mode without WebMVC ([#3333](https://github.com/getsentry/sentry-java/pull/3333)) |
8 | 152 |
|
9 | 153 | ## 7.6.0 |
10 | 154 |
|
|
0 commit comments