Skip to content

Commit 374ff7d

Browse files
committed
Merge remote-tracking branch 'origin/main' into build/jdk-21
2 parents 17e2b85 + 8d7b785 commit 374ff7d

13 files changed

Lines changed: 232 additions & 16 deletions

File tree

‎.github/workflows/spring-boot-2-matrix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Python
3838
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
3939
with:
40-
python-version: '3.10.5'
40+
python-version: '3.10'
4141

4242
- name: Install Python dependencies
4343
run: |

‎.github/workflows/spring-boot-3-matrix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Python
3838
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
3939
with:
40-
python-version: '3.10.5'
40+
python-version: '3.10'
4141

4242
- name: Install Python dependencies
4343
run: |

‎.github/workflows/spring-boot-4-matrix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Python
3838
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
3939
with:
40-
python-version: '3.10.5'
40+
python-version: '3.10'
4141

4242
- name: Install Python dependencies
4343
run: |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110

111111
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
112112
with:
113-
python-version: '3.10.5'
113+
python-version: '3.10'
114114

115115
- name: Install Python dependencies
116116
run: |

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixes
66

7+
- Report the number of dropped spans in client reports when a batched span envelope item is discarded, instead of a quantity of 1 (e.g. for Flutter span streaming) ([#6265](https://github.com/getsentry/sentry-java/pull/6265))
78
- Keep sending events from Android 7.1.0 and older devices after Sentry changes its TLS certificate authority ([#6227](https://github.com/getsentry/sentry-java/pull/6227))
89
- In February 2027, Sentry moves its TLS certificates from DigiCert to Let's Encrypt and Google Trust Services ([announcement](https://sentry.io/changelog/were-changing-our-tls-certificate-authority-in-february-2027)).
910
- Android 7.1.0 (API 25) and older don't trust the Let's Encrypt root certificate (ISRG Root X1), so without this fix, the SDK on those devices can no longer send events to Sentry after the switch.

‎CONTRIBUTING.md‎

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,38 @@
1-
# Contributing to sentry-java
1+
<p align="center">
2+
<a href="https://sentry.io" target="_blank" align="center">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4+
</a>
5+
<br />
6+
</p>
27

3-
We love pull requests from everyone.
4-
We suggest opening an issue to discuss bigger changes before investing on a big PR.
8+
# Contributing
9+
10+
Thanks for your interest in contributing to `sentry-java`! This guide explains how we work with external contributions and how to get your environment set up. If you have questions, reach out on [Discord](https://discord.com/invite/sentry).
11+
12+
# Submitting Changes
13+
14+
**TL;DR: Discuss your change in a GitHub issue before opening a pull request. We may close PRs that weren't discussed with a maintainer first.**
15+
16+
Every line we merge is code we maintain long-term for hundreds of thousands of apps, so we want to agree on the problem and the approach before anyone writes code. This saves time for you and for us.
17+
18+
## Before You Start
19+
20+
1. **Find or create an issue.** Search the [issue tracker](https://github.com/getsentry/sentry-java/issues) first. If nothing fits, open a new issue describing the problem or feature.
21+
2. **Discuss your approach with a maintainer.** Comment on the issue with what you plan to change and wait for a maintainer to respond before you start working.
22+
3. **Check the assignee.** If the issue is already assigned to someone else, coordinate with them in the issue before starting work.
23+
24+
## Making Your Contribution
25+
26+
- Fork the repo and make your changes on a branch.
27+
- Add tests. Non-trivial PRs won't be accepted without them.
28+
- Don't bump version numbers. We do that when we release.
29+
- Open a PR that links the issue (e.g. `Fixes #123`)
30+
- Name your PR according to our [commit message format](https://develop.sentry.dev/commit-messages/#commit-message-format).
31+
- Keep PRs focused: one change per PR, no unrelated refactors.
32+
33+
## AI Use
34+
35+
You are welcome to use whatever tools you prefer for making a contribution. However, any changes you propose have to be understood, reviewed and tested by you, a human, first, before you submit a pull request with them for the Sentry team to review. If we feel like that didn't happen, we will close the PR outright. For example, we won't review visibly AI-generated PRs from an agent instructed to look for and "fix" open issues in the repo. This aligns with our SDK principle: [every line has an owner](https://develop.sentry.dev/sdk/getting-started/principles/#every-line-has-an-owner).
536

637
# Requirements
738

@@ -70,8 +101,3 @@ issue without a closing keyword is not enough.
70101

71102
Build and tests are automatically run against branches and pull requests
72103
via GH Actions.
73-
74-
75-
# AI Use
76-
77-
You are welcome to use whatever tools you prefer for making a contribution. However, any changes you propose have to be reviewed and tested by you, a human, first, before you submit a pull request with them for the Sentry team to review. If we feel like that did not happen, we will close the PR outright. For example, we will not review visibly AI-generated PRs from an agent instructed to look for and "fix" open issues in the repo. This aligns with our SDK principle: [every line has an owner](https://develop.sentry.dev/sdk/getting-started/principles/#every-line-has-an-owner).

‎requirements.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
certifi==2025.7.14
1+
certifi==2026.10.19
22
charset-normalizer==3.4.2
33
idna==3.15
44
requests==2.33.0

‎sentry-android-integration-tests/sentry-uitest-android/proguard-rules.pro‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
-dontwarn com.google.errorprone.**
2626
-dontwarn com.sun.jna.**
27+
-dontwarn com.sun.net.httpserver.**
2728
-dontwarn edu.umd.cs.findbugs.**
2829
-dontwarn java.lang.instrument.**
2930
-dontwarn java.lang.management.**

‎sentry-test-support/build.gradle.kts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ dependencies {
2424
implementation(kotlin(Config.kotlinStdLib))
2525
implementation(libs.kotlin.test.junit)
2626
implementation(libs.mockito.kotlin)
27+
28+
testImplementation(libs.google.truth)
2729
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
package io.sentry.test
2+
3+
import com.sun.net.httpserver.HttpExchange
4+
import com.sun.net.httpserver.HttpServer
5+
import io.sentry.JsonSerializer
6+
import io.sentry.SentryEnvelope
7+
import io.sentry.SentryOptions
8+
import io.sentry.time.Deadline
9+
import io.sentry.time.JavaMonotonicTicker
10+
import java.io.Closeable
11+
import java.net.InetAddress
12+
import java.net.InetSocketAddress
13+
import java.util.concurrent.CopyOnWriteArrayList
14+
import java.util.concurrent.TimeUnit
15+
import java.util.zip.GZIPInputStream
16+
17+
/**
18+
* A stand-in for Sentry's ingestion endpoint that integration tests point the SDK at through [dsn].
19+
*
20+
* Envelopes travel through the real HTTP transport, so serialization, compression and the DSN are
21+
* covered too. It binds a free port so that test tasks running in parallel don't clash, and it
22+
* works for an app in a child process as well as in the test's own JVM.
23+
*/
24+
class MockSentryServer : Closeable {
25+
private val serializer = JsonSerializer(SentryOptions.empty())
26+
private val received = CopyOnWriteArrayList<SentryEnvelope>()
27+
private val server =
28+
HttpServer.create(InetSocketAddress(InetAddress.getByName(HOST), 0), 0).apply {
29+
createContext("/api/") { exchange -> receive(exchange) }
30+
start()
31+
}
32+
33+
val dsn: String = "http://key@$HOST:${server.address.port}/0"
34+
35+
val envelopes: List<SentryEnvelope>
36+
get() = received.toList()
37+
38+
/** Returns the first received envelope matching [predicate], waiting up to [timeoutMillis]. */
39+
fun awaitEnvelope(
40+
timeoutMillis: Long = DEFAULT_TIMEOUT_MILLIS,
41+
predicate: (SentryEnvelope) -> Boolean,
42+
): SentryEnvelope {
43+
val deadline =
44+
Deadline.after(JavaMonotonicTicker.getInstance(), timeoutMillis, TimeUnit.MILLISECONDS)
45+
while (true) {
46+
received.firstOrNull(predicate)?.let {
47+
return it
48+
}
49+
if (deadline.hasPassed()) {
50+
throw AssertionError(
51+
"No matching envelope within ${timeoutMillis}ms, received ${received.size} envelopes"
52+
)
53+
}
54+
Thread.sleep(POLL_INTERVAL_MILLIS)
55+
}
56+
}
57+
58+
fun reset() {
59+
received.clear()
60+
}
61+
62+
override fun close() {
63+
server.stop(0)
64+
}
65+
66+
private fun receive(exchange: HttpExchange) {
67+
try {
68+
val body =
69+
if (exchange.requestHeaders.getFirst("Content-Encoding") == "gzip") {
70+
GZIPInputStream(exchange.requestBody)
71+
} else {
72+
exchange.requestBody
73+
}
74+
serializer.deserializeEnvelope(body)?.let { received.add(it) }
75+
exchange.sendResponseHeaders(200, -1)
76+
} finally {
77+
exchange.close()
78+
}
79+
}
80+
81+
private companion object {
82+
// An IP rather than "localhost", which can resolve to IPv4 for the server and IPv6 for the SDK.
83+
const val HOST = "127.0.0.1"
84+
const val DEFAULT_TIMEOUT_MILLIS = 10_000L
85+
const val POLL_INTERVAL_MILLIS = 50L
86+
}
87+
}

0 commit comments

Comments
 (0)