Skip to content

Commit 583afa1

Browse files
authored
Merge branch 'main' into dependabot/github_actions/github/codeql-action-3.26.12
2 parents 27a0681 + 31f96ce commit 583afa1

File tree

38 files changed

+89
-80
lines changed

38 files changed

+89
-80
lines changed

.github/workflows/agp-matrix.yml

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

6060
# We tried to use the cache action to cache gradle stuff, but it made tests slower and timeout
6161
- name: Run instrumentation tests
62-
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # pin@v2
62+
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # pin@v2
6363
with:
6464
api-level: 30
6565
force-avd-creation: false

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: make preMerge
3636

3737
- name: Upload coverage to Codecov
38-
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4
38+
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # pin@v4
3939
with:
4040
name: sentry-java
4141
fail_ci_if_error: false

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
- Vendor `java.util.Random` and replace `java.security.SecureRandom` usages ([#3783](https://github.com/getsentry/sentry-java/pull/3783))
1414
- Fix potential ANRs due to NDK scope sync ([#3754](https://github.com/getsentry/sentry-java/pull/3754))
1515
- Fix potential ANRs due to NDK System.loadLibrary calls ([#3670](https://github.com/getsentry/sentry-java/pull/3670))
16+
- Fix slow `Log` calls on app startup ([#3793](https://github.com/getsentry/sentry-java/pull/3793))
17+
- Fix slow Integration name parsing ([#3794](https://github.com/getsentry/sentry-java/pull/3794))
18+
- Session Replay: Reduce startup and capture overhead ([#3799](https://github.com/getsentry/sentry-java/pull/3799))
1619

1720
## 7.15.0
1821

sentry-android-core/src/main/java/io/sentry/android/core/ActivityBreadcrumbsIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void register(final @NotNull IHub hub, final @NotNull SentryOptions optio
4646
if (enabled) {
4747
application.registerActivityLifecycleCallbacks(this);
4848
options.getLogger().log(SentryLevel.DEBUG, "ActivityBreadcrumbIntegration installed.");
49-
addIntegrationToSdkVersion(getClass());
49+
addIntegrationToSdkVersion("ActivityBreadcrumbs");
5050
}
5151
}
5252

sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void register(final @NotNull IHub hub, final @NotNull SentryOptions optio
118118

119119
application.registerActivityLifecycleCallbacks(this);
120120
this.options.getLogger().log(SentryLevel.DEBUG, "ActivityLifecycleIntegration installed.");
121-
addIntegrationToSdkVersion(getClass());
121+
addIntegrationToSdkVersion("ActivityLifecycle");
122122
}
123123

124124
private boolean isPerformanceEnabled(final @NotNull SentryAndroidOptions options) {

sentry-android-core/src/main/java/io/sentry/android/core/AndroidLogger.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ public void log(
2626
final @NotNull SentryLevel level,
2727
final @NotNull String message,
2828
final @Nullable Object... args) {
29-
Log.println(toLogcatLevel(level), tag, String.format(message, args));
29+
if (args == null || args.length == 0) {
30+
Log.println(toLogcatLevel(level), tag, message);
31+
} else {
32+
Log.println(toLogcatLevel(level), tag, String.format(message, args));
33+
}
3034
}
3135

3236
@SuppressWarnings("AnnotateFormatMethod")
@@ -36,7 +40,11 @@ public void log(
3640
final @Nullable Throwable throwable,
3741
final @NotNull String message,
3842
final @Nullable Object... args) {
39-
log(level, String.format(message, args), throwable);
43+
if (args == null || args.length == 0) {
44+
log(level, message, throwable);
45+
} else {
46+
log(level, String.format(message, args), throwable);
47+
}
4048
}
4149

4250
@Override

sentry-android-core/src/main/java/io/sentry/android/core/AnrIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void register(final @NotNull IHub hub, final @NotNull SentryAndroidOptio
5959
.log(SentryLevel.DEBUG, "AnrIntegration enabled: %s", options.isAnrEnabled());
6060

6161
if (options.isAnrEnabled()) {
62-
addIntegrationToSdkVersion(getClass());
62+
addIntegrationToSdkVersion("Anr");
6363
try {
6464
options
6565
.getExecutorService()

sentry-android-core/src/main/java/io/sentry/android/core/AnrV2Integration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void register(@NotNull IHub hub, @NotNull SentryOptions options) {
9595
options.getLogger().log(SentryLevel.DEBUG, "Failed to start AnrProcessor.", e);
9696
}
9797
options.getLogger().log(SentryLevel.DEBUG, "AnrV2Integration installed.");
98-
addIntegrationToSdkVersion(getClass());
98+
addIntegrationToSdkVersion("AnrV2");
9999
}
100100
}
101101

sentry-android-core/src/main/java/io/sentry/android/core/AppComponentsBreadcrumbsIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void register(final @NotNull IHub hub, final @NotNull SentryOptions optio
5555
options
5656
.getLogger()
5757
.log(SentryLevel.DEBUG, "AppComponentsBreadcrumbsIntegration installed.");
58-
addIntegrationToSdkVersion(getClass());
58+
addIntegrationToSdkVersion("AppComponentsBreadcrumbs");
5959
} catch (Throwable e) {
6060
this.options.setEnableAppComponentBreadcrumbs(false);
6161
options.getLogger().log(SentryLevel.INFO, e, "ComponentCallbacks2 is not available.");

sentry-android-core/src/main/java/io/sentry/android/core/AppLifecycleIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private void addObserver(final @NotNull IHub hub) {
9696
try {
9797
ProcessLifecycleOwner.get().getLifecycle().addObserver(watcher);
9898
options.getLogger().log(SentryLevel.DEBUG, "AppLifecycleIntegration installed.");
99-
addIntegrationToSdkVersion(getClass());
99+
addIntegrationToSdkVersion("AppLifecycle");
100100
} catch (Throwable e) {
101101
// This is to handle a potential 'AbstractMethodError' gracefully. The error is triggered in
102102
// connection with conflicting dependencies of the androidx.lifecycle.

0 commit comments

Comments
 (0)