We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6f6055 commit 9358d52Copy full SHA for 9358d52
profiler/src/main/java/com/splunk/opentelemetry/profiler/Configuration.java
@@ -224,10 +224,8 @@ public static int getSnapshotProfilerStackDepth(ConfigProperties properties) {
224
}
225
226
public static Duration getSnapshotProfilerSamplingInterval(ConfigProperties properties) {
227
- int millis = properties.getInt(CONFIG_KEY_SNAPSHOT_PROFILER_SAMPLING_INTERVAL, 0);
228
- if (millis > 0) {
229
- return Duration.ofMillis(millis);
230
- }
231
- return DEFAULT_SNAPSHOT_PROFILER_SAMPLING_INTERVAL;
+ return properties.getDuration(
+ CONFIG_KEY_SNAPSHOT_PROFILER_SAMPLING_INTERVAL,
+ DEFAULT_SNAPSHOT_PROFILER_SAMPLING_INTERVAL);
232
233
0 commit comments