-
-
Notifications
You must be signed in to change notification settings - Fork 468
Expand file tree
/
Copy pathAsyncProfilerProfileConverterProvider.java
More file actions
33 lines (28 loc) · 1.17 KB
/
AsyncProfilerProfileConverterProvider.java
File metadata and controls
33 lines (28 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package io.sentry.asyncprofiler.provider;
import io.sentry.IProfileConverter;
import io.sentry.asyncprofiler.convert.JfrAsyncProfilerToSentryProfileConverter;
import io.sentry.profiling.JavaProfileConverterProvider;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
* AsyncProfiler implementation of {@link JavaProfileConverterProvider}. This provider integrates
* AsyncProfiler's JFR converter with Sentry's profiling system.
*/
@ApiStatus.Internal
public final class AsyncProfilerProfileConverterProvider implements JavaProfileConverterProvider {
@Override
public @NotNull IProfileConverter getProfileConverter() {
return new AsyncProfilerProfileConverter();
}
/**
* Internal implementation of IProfileConverter that delegates to
* JfrAsyncProfilerToSentryProfileConverter.
*/
public static final class AsyncProfilerProfileConverter implements IProfileConverter {
@Override
public @NotNull io.sentry.protocol.profiling.SentryProfile convertFromFile(
@NotNull String jfrFilePath) throws java.io.IOException {
return JfrAsyncProfilerToSentryProfileConverter.convertFromFileStatic(jfrFilePath);
}
}
}