Skip to content

Commit 94071da

Browse files
authored
[QA] Hardcode integration names (#3794)
* Hardcode integration names for tracking * Changelog * Fix tests
1 parent 55ea3cc commit 94071da

File tree

28 files changed

+28
-35
lines changed

28 files changed

+28
-35
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
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))
1616
- 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))
1718

1819
## 7.15.0
1920

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/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.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public final void register(final @NotNull IHub hub, final @NotNull SentryOptions
5555
method.invoke(null, args);
5656

5757
this.options.getLogger().log(SentryLevel.DEBUG, "NdkIntegration installed.");
58-
addIntegrationToSdkVersion(getClass());
58+
addIntegrationToSdkVersion("Ndk");
5959
} catch (NoSuchMethodException e) {
6060
disableNdkIntegration(this.options);
6161
this.options

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void run() {
9696
context, logger, buildInfoProvider, networkCallback);
9797
if (registered) {
9898
logger.log(SentryLevel.DEBUG, "NetworkBreadcrumbsIntegration installed.");
99-
addIntegrationToSdkVersion(getClass());
99+
addIntegrationToSdkVersion("NetworkBreadcrumbs");
100100
} else {
101101
logger.log(
102102
SentryLevel.DEBUG, "NetworkBreadcrumbsIntegration not installed.");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private void startTelephonyListener(
8181
telephonyManager.listen(listener, android.telephony.PhoneStateListener.LISTEN_CALL_STATE);
8282

8383
options.getLogger().log(SentryLevel.DEBUG, "PhoneStateBreadcrumbsIntegration installed.");
84-
addIntegrationToSdkVersion(getClass());
84+
addIntegrationToSdkVersion("PhoneStateBreadcrumbs");
8585
} catch (Throwable e) {
8686
options
8787
.getLogger()

0 commit comments

Comments
 (0)