Skip to content

Commit dc0edbf

Browse files
committed
use supplier ctor for AndroidTransactionProfiler
1 parent 38debd2 commit dc0edbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ private void createAndStartTransactionProfiler(
204204
return;
205205
}
206206

207+
final @NotNull SentryExecutorService executorService = new SentryExecutorService();
207208
final @NotNull ITransactionProfiler appStartProfiler =
208209
new AndroidTransactionProfiler(
209210
context,
@@ -213,7 +214,7 @@ private void createAndStartTransactionProfiler(
213214
profilingOptions.getProfilingTracesDirPath(),
214215
profilingOptions.isProfilingEnabled(),
215216
profilingOptions.getProfilingTracesHz(),
216-
new SentryExecutorService());
217+
() -> executorService);
217218
appStartMetrics.setAppStartContinuousProfiler(null);
218219
appStartMetrics.setAppStartProfiler(appStartProfiler);
219220
logger.log(SentryLevel.DEBUG, "App start profiling started.");

0 commit comments

Comments
 (0)