Skip to content

Commit

Permalink
HPCC-30470 TEST
Browse files Browse the repository at this point in the history
- Fix mac build issues

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Dec 4, 2023
1 parent 5f787f4 commit 883913b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions system/jlib/jtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ class JLogSpanExporter final : public opentelemetry::sdk::trace::SpanExporter
out.setf("{ \"name\": \"%s\"", span->GetName().data());
out.append(", \"trace_id\": \"").append(32, traceID).append("\"");
out.append(", \"span_id\": \"").append(16, spanID).append("\"");
out.appendf(", \"start\": %ld", std::chrono::duration_cast<std::chrono::nanoseconds>(span->GetStartTime().time_since_epoch()).count());
out.appendf(", \"duration\": %ld", std::chrono::duration_cast<std::chrono::nanoseconds>(span->GetDuration()).count());
out.appendf(", \"start\": %s", std::to_string(span->GetStartTime().time_since_epoch().count()).c_str());
out.appendf(", \"duration\": %s", std::to_string(span->GetDuration().count()).c_str());

if (hasMask(logFlags, SpanLogFlags::LogParentInfo))
{
Expand Down Expand Up @@ -311,7 +311,8 @@ class JLogSpanExporter final : public opentelemetry::sdk::trace::SpanExporter
first = false;

out.append("{ \"name\": \"").append(event.GetName().data()).append("\"");
out.appendf(", \"time_stamp\": %ld", std::chrono::duration_cast<std::chrono::nanoseconds>(event.GetTimestamp().time_since_epoch()).count());
out.appendf(", \"time_stamp\": \"%s\"", std::to_string(event.GetTimestamp().time_since_epoch().count()).c_str());

printAttributes(out, event.GetAttributes());
out.append(" }");
}
Expand Down

0 comments on commit 883913b

Please sign in to comment.