Skip to content

Commit

Permalink
Merge pull request quarkusio#44507 from Chris18230/main
Browse files Browse the repository at this point in the history
Fixed Timestamp not being set for otel log signals
  • Loading branch information
gsmet authored Nov 15, 2024
2 parents c61d236 + 3c19050 commit 814b8cd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 814b8cd

Please sign in to comment.