Skip to content

Commit bf392aa

Browse files
committed
Merge branch 'main' into feat/logback-spring-boot
2 parents 6d3d3e4 + 9f37401 commit bf392aa

File tree

741 files changed

+99335
-98124
lines changed

Some content is hidden

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

741 files changed

+99335
-98124
lines changed

.editorconfig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@ root = true
22

33
[*]
44
indent_style = space
5+
indent_size = 2
56
trim_trailing_whitespace = true
67
insert_final_newline = true
8+
max_line_length = 140
9+
ij_java_names_count_to_use_import_on_demand = 9999
10+
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
711

812
[*.md]
913
trim_trailing_whitespace = false
1014

1115
[*.java]
12-
indent_size = 2
1316
charset = utf-8
1417

1518
[*.{kt,kts}]
16-
indent_size = 4
1719
charset = utf-8
18-
19-
[*.xml]
20-
indent_size = 2

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Reformat codebase with Ktfmt and more accurate spotless configuration: #4499
2+
8b8369f06cbc5a9738de7810b1df5863b3ac6bcb

.github/workflows/agp-matrix.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,10 @@ jobs:
9393
reporter: java-junit
9494
output-to: step-summary
9595
fail-on-error: false
96+
97+
- name: Upload test results to Codecov
98+
if: ${{ !cancelled() }}
99+
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f
100+
with:
101+
token: ${{ secrets.CODECOV_TOKEN }}
102+
file: build/outputs/androidTest-results/**/*.xml

.github/workflows/format-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
java-version: '17'
2020

2121
- name: Setup Gradle
22-
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326
22+
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96
2323
with:
2424
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
2525

.github/workflows/integration-tests-ui.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,10 @@ jobs:
7272
fi
7373
if: env.SAUCE_USERNAME != null
7474

75+
76+
- name: Upload test results to Codecov
77+
if: ${{ !cancelled() }}
78+
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f
79+
with:
80+
token: ${{ secrets.CODECOV_TOKEN }}
81+
file: ./artifacts/*.xml

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,51 @@
22

33
## Unreleased
44

5+
### Features
6+
7+
- Add chipset to device context ([#4512](https://github.com/getsentry/sentry-java/pull/4512))
8+
59
### Fixes
610

711
- No longer send out empty log envelopes ([#4497](https://github.com/getsentry/sentry-java/pull/4497))
12+
- Session Replay: Expand fix for crash on devices to all Unisoc/Spreadtrum chipsets ([#4510](https://github.com/getsentry/sentry-java/pull/4510))
13+
- Log parameter objects are now turned into `String` via `toString` ([#4515](https://github.com/getsentry/sentry-java/pull/4515))
14+
- One of the two `SentryLogEventAttributeValue` constructors did not convert the value previously.
15+
- Logs are now flushed on shutdown ([#4503](https://github.com/getsentry/sentry-java/pull/4503))
16+
17+
### Features
18+
19+
- Send Logback logs to Sentry as logs ([#4502](https://github.com/getsentry/sentry-java/pull/4502))
20+
- You need to enable the logs feature and can also set the `minimumLevel` for log events:
21+
```xml
22+
<appender name="sentry" class="io.sentry.logback.SentryAppender">
23+
<options>
24+
<!-- NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry project/dashboard -->
25+
<dsn>https://502f25099c204a2fbf4cb16edc5975d1@o447951.ingest.sentry.io/5428563</dsn>
26+
<logs>
27+
<enabled>true</enabled>
28+
</logs>
29+
</options>
30+
<!-- Demonstrates how to modify the minimum values -->
31+
<!-- Default for Events is ERROR -->
32+
<minimumEventLevel>WARN</minimumEventLevel>
33+
<!-- Default for Breadcrumbs is INFO -->
34+
<minimumBreadcrumbLevel>DEBUG</minimumBreadcrumbLevel>
35+
<!-- Default for Log Events is INFO -->
36+
<minimumLevel>INFO</minimumLevel>
37+
</appender>
38+
```
39+
- If you manually initialize Sentry, you may also enable logs on `Sentry.init`:
40+
```java
41+
Sentry.init(options -> {
42+
...
43+
options.getLogs().setEnabled(true);
44+
});
45+
```
46+
- Enabling via `sentry.properties` is also possible:
47+
```properties
48+
logs.enabled=true
49+
```
850

951
### Dependencies
1052

build-logic/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
plugins {
2-
`kotlin-dsl`
2+
`kotlin-dsl`
33
}
44

55
repositories {
6-
gradlePluginPortal()
6+
gradlePluginPortal()
7+
}
8+
9+
dependencies {
10+
implementation(libs.spotlessLib)
711
}

build-logic/settings.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
dependencyResolutionManagement {
2+
versionCatalogs {
3+
create("libs") {
4+
from(files("../gradle/libs.versions.toml"))
5+
}
6+
}
7+
}
8+
19
rootProject.name = "build-logic"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import com.diffplug.spotless.LineEnding
2+
3+
plugins {
4+
id("com.diffplug.spotless")
5+
}
6+
7+
spotless {
8+
lineEndings = LineEnding.UNIX
9+
java {
10+
target("src/*/java/**/*.java")
11+
removeUnusedImports()
12+
googleJavaFormat()
13+
targetExclude("src/**/java/io/sentry/vendor/**")
14+
}
15+
kotlin {
16+
target("src/*/kotlin/**/*.kt", "src/*/java/**/*.kt")
17+
ktfmt().googleStyle()
18+
targetExclude("src/test/java/io/sentry/apollo4/generated/**", "src/test/java/io/sentry/apollo3/adapter/**")
19+
}
20+
kotlinGradle {
21+
target("*.gradle.kts")
22+
ktfmt().googleStyle()
23+
}
24+
}
25+

build.gradle.kts

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import com.diffplug.spotless.LineEnding
21
import com.vanniktech.maven.publish.JavaLibrary
32
import com.vanniktech.maven.publish.JavadocJar
43
import com.vanniktech.maven.publish.MavenPublishBaseExtension
@@ -10,7 +9,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
109

1110
plugins {
1211
`java-library`
13-
alias(libs.plugins.spotless)
12+
alias(libs.plugins.spotless) apply false
1413
jacoco
1514
alias(libs.plugins.detekt)
1615
`maven-publish`
@@ -105,6 +104,8 @@ allprojects {
105104
}
106105

107106
subprojects {
107+
apply { plugin("io.sentry.spotless") }
108+
108109
val jacocoAndroidModules = listOf(
109110
"sentry-android-core",
110111
"sentry-android-fragment",
@@ -225,26 +226,6 @@ subprojects {
225226
}
226227
}
227228

228-
spotless {
229-
lineEndings = LineEnding.UNIX
230-
java {
231-
target("**/*.java")
232-
removeUnusedImports()
233-
googleJavaFormat()
234-
targetExclude("**/generated/**", "**/vendor/**", "**/sentry-native/**")
235-
}
236-
kotlin {
237-
target("**/*.kt")
238-
ktlint()
239-
targetExclude("**/sentry-native/**", "**/build/**")
240-
}
241-
kotlinGradle {
242-
target("**/*.kts")
243-
ktlint()
244-
targetExclude("**/sentry-native/**")
245-
}
246-
}
247-
248229
tasks.register("buildForCodeQL") {
249230
subprojects
250231
.filter {

0 commit comments

Comments
 (0)