diff --git a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/logs/OpenTelemetryLogHandler.java b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/logs/OpenTelemetryLogHandler.java index de673ab9c77db..9c4606ea68e99 100644 --- a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/logs/OpenTelemetryLogHandler.java +++ b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/logs/OpenTelemetryLogHandler.java @@ -10,6 +10,7 @@ import java.io.PrintWriter; import java.io.StringWriter; +import java.time.Instant; import java.util.Map; import java.util.Optional; import java.util.logging.Handler; @@ -43,6 +44,7 @@ public void publish(LogRecord record) { final LogRecordBuilder logRecordBuilder = openTelemetry.getLogsBridge() .loggerBuilder(INSTRUMENTATION_NAME) .build().logRecordBuilder() + .setTimestamp(Instant.now()) .setObservedTimestamp(record.getInstant()); if (record.getLevel() != null) {