Skip to content

Commit

Permalink
Log current timestamp instead of epoch time
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan committed Jun 7, 2022
1 parent 18991a6 commit 0c1158f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/common/logs_foo_library/foo_library.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ void foo_library()
auto ctx = span->GetContext();
auto logger = get_logger();
logger->Log(opentelemetry::logs::Severity::kDebug, "body", {}, ctx.trace_id(), ctx.span_id(),
ctx.trace_flags(), opentelemetry::common::SystemTimestamp());
ctx.trace_flags(),
opentelemetry::common::SystemTimestamp(std::chrono::system_clock::now()));
}
#endif

0 comments on commit 0c1158f

Please sign in to comment.