Skip to content

Commit 90369c1

Browse files
committed
docs: update OpenTelemetry example to use kotlin.time.Duration over java.time.Duration
1 parent 0b2c0f9 commit 90369c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/docs/opentelemetry-support.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ import io.opentelemetry.api.common.AttributeKey
246246
import io.opentelemetry.exporter.logging.LoggingMetricExporter
247247
import io.opentelemetry.exporter.logging.LoggingSpanExporter
248248
import io.opentelemetry.sdk.trace.samplers.Sampler
249-
import java.time.Duration
249+
import kotlin.time.Duration
250250
251251
const val apiKey = ""
252252
@@ -271,7 +271,7 @@ install(OpenTelemetry) {
271271
// Add the Metric exporter
272272
addMetricExporter(
273273
exporter = LoggingMetricExporter.create(),
274-
meterInterval = Duration.ofSeconds(30)
274+
meterInterval = 30.seconds
275275
)
276276

277277
// Add metric filter

0 commit comments

Comments
 (0)