Skip to content

Commit

Permalink
Merge branch 'main' into AddResourceAttributesToJaeger
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Jul 9, 2021
2 parents 32f271d + 20b315a commit cf3bdd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion exporters/zipkin/src/recordable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void Recordable::AddEvent(nostd::string_view name,
});

nlohmann::json annotation = {{"value", nlohmann::json::object({{name.data(), attrs}}).dump()},
{"timestamp", std::chrono::duration_cast<std::chrono::milliseconds>(
{"timestamp", std::chrono::duration_cast<std::chrono::microseconds>(
timestamp.time_since_epoch())
.count()}};

Expand Down
4 changes: 2 additions & 2 deletions exporters/zipkin/test/zipkin_recordable_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ TEST(ZipkinSpanRecordable, AddEventDefault)
rec.opentelemetry::sdk::trace::Recordable::AddEvent(name, event_timestamp);

uint64_t unix_event_time =
std::chrono::duration_cast<std::chrono::milliseconds>(event_time.time_since_epoch()).count();
std::chrono::duration_cast<std::chrono::microseconds>(event_time.time_since_epoch()).count();

json j_span = {
{"annotations",
Expand All @@ -149,7 +149,7 @@ TEST(ZipkinSpanRecordable, AddEventWithAttributes)
std::chrono::system_clock::time_point event_time = std::chrono::system_clock::now();
opentelemetry::common::SystemTimestamp event_timestamp(event_time);
uint64_t unix_event_time =
std::chrono::duration_cast<std::chrono::milliseconds>(event_time.time_since_epoch()).count();
std::chrono::duration_cast<std::chrono::microseconds>(event_time.time_since_epoch()).count();

const int kNumAttributes = 3;
std::string keys[kNumAttributes] = {"attr1", "attr2", "attr3"};
Expand Down

0 comments on commit cf3bdd0

Please sign in to comment.