Skip to content

Commit

Permalink
Log current timestamp instead of epoch time (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Jun 7, 2022
1 parent 18991a6 commit 473c931
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

2 comments on commit 473c931

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 473c931 Previous: 18991a6 Ratio
BM_LockFreeBuffer/1 4091036.796569824 ns/iter 302430.33236597566 ns/iter 13.53
BM_LockFreeBuffer/2 4190692.901611328 ns/iter 1204676.628112793 ns/iter 3.48

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 473c931 Previous: 18991a6 Ratio
BM_ProcYieldSpinLockThrashing/1/process_time/real_time 0.24953014564694267 ms/iter 0.10760827564898832 ms/iter 2.32
BM_NaiveSpinLockThrashing/1/process_time/real_time 0.603772569120976 ms/iter 0.10750263311456075 ms/iter 5.62
BM_NaiveSpinLockThrashing/2/process_time/real_time 0.5241713065693812 ms/iter 0.21048201654190407 ms/iter 2.49
BM_ThreadYieldSpinLockThrashing/1/process_time/real_time 23.92993654523577 ms/iter 6.383050571788441 ms/iter 3.75

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.