Skip to content

Commit 36b0487

Browse files
authored
Merge branch 'main' into rz/fix/persisting-scope-observer
2 parents 2df48a5 + 0b8cee0 commit 36b0487

File tree

295 files changed

+9227
-3833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+9227
-3833
lines changed

.craft.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
minVersion: 0.29.3
22
changelogPolicy: auto
33
targets:
4-
- name: symbol-collector
5-
includeNames: /libsentry(-android)?\.so/
6-
batchType: android
7-
bundleIdPrefix: sentry-android-ndk-
84
- name: maven
95
includeNames: /^sentry.*$/
106
gradleCliPath: ./gradlew
@@ -61,3 +57,5 @@ targets:
6157
maven:io.sentry:sentry-apollo-3:
6258
maven:io.sentry:sentry-android-sqlite:
6359
maven:io.sentry:sentry-android-replay:
60+
maven:io.sentry:sentry-apollo-4:
61+
maven:io.sentry:sentry-reactor:

.github/ISSUE_TEMPLATE/bug_report_android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 🐞 Bug Report - Android
22
description: Tell us about something that's not working the way we (probably) intend.
33
labels: ["Platform: Android", "Type: Bug"]
4+
type: Bug
45
body:
56
- type: dropdown
67
id: integration

.github/ISSUE_TEMPLATE/bug_report_java.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 🐞 Bug Report - Java
22
description: Tell us about something that's not working the way we (probably) intend.
33
labels: ["Platform: Java", "Type: Bug"]
4+
type: Bug
45
body:
56
- type: dropdown
67
id: integration

.github/ISSUE_TEMPLATE/feature_android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 💡 Feature Request - Android
22
description: Tell us about a problem our SDK could solve but doesn't.
33
labels: ["Platform: Android", "Type: Feature Request"]
4+
type: Feature
45
body:
56
- type: textarea
67
id: problem

.github/ISSUE_TEMPLATE/feature_java.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 💡 Feature Request - Java
22
description: Tell us about a problem our SDK could solve but doesn't.
33
labels: ["Platform: Java", "Type: Feature Request"]
4+
type: Feature
45
body:
56
- type: textarea
67
id: problem

.github/workflows/system-tests-backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
102102
- name: Start server and run integration test for sentry-cli commands
103103
run: |
104-
test/system-test-run.sh "${{ matrix.sample }}" "${{ matrix.agent }}" "${{ matrix.agent-auto-init }}"
104+
test/system-test-run.sh "${{ matrix.sample }}" "${{ matrix.agent }}" "${{ matrix.agent-auto-init }}" "0"
105105
106106
- name: Upload test results
107107
if: always()

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ distributions/
2020
sentry-spring-boot-starter-jakarta/src/main/resources/META-INF/spring.factories
2121
sentry-samples/sentry-samples-spring-boot-jakarta/spy.log
2222
spy.log
23+
buildSrc/.kotlin/

CHANGELOG.md

Lines changed: 97 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,82 @@
44

55
### Fixes
66

7-
- `SentryOptions.setTracePropagationTargets` is no longer marked internal ([#4170](https://github.com/getsentry/sentry-java/pull/4170))
7+
- The SDK now handles `null` on many APIs instead of expecting a non `null` value ([#4245](https://github.com/getsentry/sentry-java/pull/4245))
8+
- Certain APIs like `setTag`, `setData`, `setExtra`, `setContext` previously caused a `NullPointerException` when invoked with either `null` key or value.
9+
- The SDK now tries to have a sane fallback when `null` is passed and no longer throws `NullPointerException`
10+
- If `null` is passed, the SDK will
11+
- do nothing if a `null` key is passed, returning `null` for non void methods
12+
- remove any previous value if the new value is set to `null`
13+
- Add support for setting in-app-includes/in-app-excludes via AndroidManifest.xml ([#4240](https://github.com/getsentry/sentry-java/pull/4240))
14+
- Modifications to OkHttp requests are now properly propagated to the affected span / breadcrumbs ([#4238](https://github.com/getsentry/sentry-java/pull/4238))
15+
- Please ensure the SentryOkHttpInterceptor is added last to your OkHttpClient, as otherwise changes to the `Request` by subsequent interceptors won't be considered
16+
- Fix "class ch.qos.logback.classic.spi.ThrowableProxyVO cannot be cast to class ch.qos.logback.classic.spi.ThrowableProxy" ([#4206](https://github.com/getsentry/sentry-java/pull/4206))
17+
- In this case we cannot report the `Throwable` to Sentry as it's not available
18+
- If you are using OpenTelemetry v1 `OpenTelemetryAppender`, please consider upgrading to v2
19+
- Pass OpenTelemetry span attributes into TracesSampler callback ([#4253](https://github.com/getsentry/sentry-java/pull/4253))
20+
- `SamplingContext` now has a `getAttribute` method that grants access to OpenTelemetry span attributes via their String key (e.g. `http.request.method`)
21+
- Fix AbstractMethodError when using SentryTraced for Jetpack Compose ([#4255](https://github.com/getsentry/sentry-java/pull/4255))
822
- Reduce excessive CPU usage when serializing breadcrumbs to disk for ANRs ([#4181](https://github.com/getsentry/sentry-java/pull/4181))
923

24+
### Features
25+
26+
- The SDK now automatically propagates the trace-context to the native layer. This allows to connect errors on different layers of the application. ([#4137](https://github.com/getsentry/sentry-java/pull/4137))
27+
- Capture OpenTelemetry span events ([#3564](https://github.com/getsentry/sentry-java/pull/3564))
28+
- OpenTelemetry spans may have exceptions attached to them (`openTelemetrySpan.recordException`). We can now send those to Sentry as errors.
29+
- Set `capture-open-telemetry-events=true` in `sentry.properties` to enable it
30+
- Set `sentry.capture-open-telemetry-events=true` in Springs `application.properties` to enable it
31+
- Set `sentry.captureOpenTelemetryEvents: true` in Springs `application.yml` to enable it
32+
33+
### Behavioural Changes
34+
35+
- Use `java.net.URI` for parsing URLs in `UrlUtils` ([#4210](https://github.com/getsentry/sentry-java/pull/4210))
36+
- This could affect grouping for issues with messages containing URLs that fall in known corner cases that were handled incorrectly previously (e.g. email in URL path)
37+
38+
### Internal
39+
40+
- Also use port when checking if a request is made to Sentry DSN ([#4231](https://github.com/getsentry/sentry-java/pull/4231))
41+
- For our OpenTelemetry integration we check if a span is for a request to Sentry
42+
- We now also consider the port when performing this check
43+
44+
### Dependencies
45+
46+
- Bump Native SDK from v0.7.20 to v0.8.1 ([#4137](https://github.com/getsentry/sentry-java/pull/4137))
47+
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0810)
48+
- [diff](https://github.com/getsentry/sentry-native/compare/v0.7.20...0.8.1)
49+
50+
## 8.3.0
51+
52+
### Features
53+
54+
- Add HTTP server request headers from OpenTelemetry span attributes to sentry `request` in payload ([#4102](https://github.com/getsentry/sentry-java/pull/4102))
55+
- You have to explicitly enable each header by adding it to the [OpenTelemetry config](https://opentelemetry.io/docs/zero-code/java/agent/instrumentation/http/#capturing-http-request-and-response-headers)
56+
- Please only enable headers you actually want to send to Sentry. Some may contain sensitive data like PII, cookies, tokens etc.
57+
- We are no longer adding request/response headers to `contexts/otel/attributes` of the event.
58+
- The `ignoredErrors` option is now configurable via the manifest property `io.sentry.traces.ignored-errors` ([#4178](https://github.com/getsentry/sentry-java/pull/4178))
59+
- A list of active Spring profiles is attached to payloads sent to Sentry (errors, traces, etc.) and displayed in the UI when using our Spring or Spring Boot integrations ([#4147](https://github.com/getsentry/sentry-java/pull/4147))
60+
- This consists of an empty list when only the default profile is active
61+
- Added `enableTraceIdGeneration` to the AndroidOptions. This allows Hybrid SDKs to "freeze" and control the trace and connect errors on different layers of the application ([4188](https://github.com/getsentry/sentry-java/pull/4188))
62+
- Move to a single NetworkCallback listener to reduce number of IPC calls on Android ([#4164](https://github.com/getsentry/sentry-java/pull/4164))
63+
- Add GraphQL Apollo Kotlin 4 integration ([#4166](https://github.com/getsentry/sentry-java/pull/4166))
64+
- Add support for async dispatch requests to Spring Boot 2 and 3 ([#3983](https://github.com/getsentry/sentry-java/pull/3983))
65+
- To enable it, please set `sentry.keep-transactions-open-for-async-responses=true` in `application.properties` or `sentry.keepTransactionsOpenForAsyncResponses: true` in `application.yml`
66+
- Add constructor to JUL `SentryHandler` for disabling external config ([#4208](https://github.com/getsentry/sentry-java/pull/4208))
67+
68+
### Fixes
69+
70+
- Filter strings that cannot be parsed as Regex no longer cause an SDK crash ([#4213](https://github.com/getsentry/sentry-java/pull/4213))
71+
- This was the case e.g. for `ignoredErrors`, `ignoredTransactions` and `ignoredCheckIns`
72+
- We now simply don't use such strings for Regex matching and only use them for String comparison
73+
- `SentryOptions.setTracePropagationTargets` is no longer marked internal ([#4170](https://github.com/getsentry/sentry-java/pull/4170))
74+
- Session Replay: Fix crash when a navigation breadcrumb does not have "to" destination ([#4185](https://github.com/getsentry/sentry-java/pull/4185))
75+
- Session Replay: Cap video segment duration to maximum 5 minutes to prevent endless video encoding in background ([#4185](https://github.com/getsentry/sentry-java/pull/4185))
76+
- Check `tracePropagationTargets` in OpenTelemetry propagator ([#4191](https://github.com/getsentry/sentry-java/pull/4191))
77+
- If a URL can be retrieved from OpenTelemetry span attributes, we check it against `tracePropagationTargets` before attaching `sentry-trace` and `baggage` headers to outgoing requests
78+
- If no URL can be retrieved we always attach the headers
79+
- Fix `ignoredErrors`, `ignoredTransactions` and `ignoredCheckIns` being unset by external options like `sentry.properties` or ENV vars ([#4207](https://github.com/getsentry/sentry-java/pull/4207))
80+
- Whenever parsing of external options was enabled (`enableExternalConfiguration`), which is the default for many integrations, the values set on `SentryOptions` passed to `Sentry.init` would be lost
81+
- Even if the value was not set in any external configuration it would still be set to an empty list
82+
1083
### Behavioural Changes
1184

1285
- The class `io.sentry.spring.jakarta.webflux.ReactorUtils` is now deprecated, please use `io.sentry.reactor.SentryReactorUtils` in the new `sentry-reactor` module instead ([#4155](https://github.com/getsentry/sentry-java/pull/4155))
@@ -115,7 +188,11 @@ Version 8 of the Sentry Android/Java SDK brings a variety of features and fixes.
115188
- New `Scope` types have been introduced, see "Behavioural Changes" for more details.
116189
- Lifecycle tokens have been introduced to manage `Scope` lifecycle, see "Behavioural Changes" for more details.
117190
- Bumping `minSdk` level to 21 (Android 5.0)
118-
- Our `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.
191+
- Our `sentry-opentelemetry-agent` has been improved and now works in combination with the rest of Sentry. You may now combine OpenTelemetry and Sentry for instrumenting your application.
192+
- You may now use both OpenTelemetry SDK and Sentry SDK to capture transactions and spans. They can also be mixed and end up on the same transaction.
193+
- OpenTelemetry extends the Sentry SDK by adding spans for numerous integrations, like Ktor, Vert.x and MongoDB. Please check [the OpenTelemetry GitHub repository](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation) for a full list.
194+
- OpenTelemetry allows propagating trace information from and to additional libraries, that Sentry did not support before, for example gRPC.
195+
- OpenTelemetry also has broader support for propagating the Sentry `Scopes` through reactive libraries like RxJava.
119196
- The SDK is now compatible with Spring Boot 3.4
120197
- We now support GraphQL v22 (`sentry-graphql-22`)
121198
- Metrics have been removed
@@ -406,6 +483,24 @@ If you have been using `8.0.0-rc.4` of the Java SDK, here's the new changes that
406483
- We are planning to improve this in the future but opted for this fix first.
407484
- Fix swallow NDK loadLibrary errors ([#4082](https://github.com/getsentry/sentry-java/pull/4082))
408485

486+
## 7.22.1
487+
488+
### Fixes
489+
490+
- Fix Ensure app start type is set, even when ActivityLifecycleIntegration is not running ([#4216](https://github.com/getsentry/sentry-java/pull/4216))
491+
- Fix properly reset application/content-provider timespans for warm app starts ([#4244](https://github.com/getsentry/sentry-java/pull/4244))
492+
493+
## 7.22.0
494+
495+
### Fixes
496+
497+
- Session Replay: Fix various crashes and issues ([#4135](https://github.com/getsentry/sentry-java/pull/4135))
498+
- Fix `FileNotFoundException` when trying to read/write `.ongoing_segment` file
499+
- Fix `IllegalStateException` when registering `onDrawListener`
500+
- Fix SIGABRT native crashes on Motorola devices when encoding a video
501+
- (Jetpack Compose) Modifier.sentryTag now uses Modifier.Node ([#4029](https://github.com/getsentry/sentry-java/pull/4029))
502+
- This allows Composables that use this modifier to be skippable
503+
409504
## 7.21.0
410505

411506
### Fixes

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,36 @@ To run the build and tests:
2727
make compile
2828
```
2929

30+
# Format
31+
32+
To format the changed code and make CI happy you can run:
33+
34+
```shell
35+
make format
36+
```
37+
38+
or
39+
40+
```shell
41+
./gradlew spotlessApply
42+
```
43+
44+
# Binary compatibility validation
45+
46+
To prevent breaking ABI changes and exposing things we should not, we make use of https://github.com/Kotlin/binary-compatibility-validator. If your change intended to introduce a new public method/property or modify the existing one you can overwrite the API declarations to make CI happy as follows (overwrites them from scratch):
47+
48+
```shell
49+
make api
50+
```
51+
52+
or
53+
54+
```shell
55+
./gradlew apiDump
56+
```
57+
58+
However, if your change did not intend to modify the public API, consider changing the method/property visibility or removing the change altogether.
59+
3060
# CI
3161

3262
Build and tests are automatically run against branches and pull requests

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Sentry SDK for Java and Android
3535
| sentry-jdbc | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-jdbc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-jdbc) |
3636
| sentry-apollo | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-apollo/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-apollo) | 21 |
3737
| sentry-apollo-3 | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-apollo-3/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-apollo-3) | 21 |
38+
| sentry-apollo-4 | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-apollo-4/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-apollo-4) | 21 |
3839
| sentry-kotlin-extensions | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-kotlin-extensions/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-kotlin-extensions) | 21 |
3940
| sentry-servlet | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-servlet/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-servlet) | |
4041
| sentry-servlet-jakarta | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-servlet-jakarta/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-servlet-jakarta) | |
@@ -56,6 +57,7 @@ Sentry SDK for Java and Android
5657
| sentry-opentelemetry-agentcustomization | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-opentelemetry-agentcustomization/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-opentelemetry-agentcustomization) |
5758
| sentry-opentelemetry-core | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-opentelemetry-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-opentelemetry-core) |
5859
| sentry-okhttp | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-okhttp/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-okhttp) |
60+
| sentry-reactor | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-reactor/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-reactor) |
5961

6062
# Releases
6163

0 commit comments

Comments
 (0)