Skip to content

Commit

Permalink
HPCC-30470 codereviewZZ
Browse files Browse the repository at this point in the history
Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Dec 11, 2023
1 parent 8fe223a commit 428abea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion system/jlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ target_link_libraries ( jlib
opentelemetry-cpp::ostream_log_record_exporter # - Imported target of opentelemetry-cpp::ostream_log_record_exporter
###These Otel import targets are not trivial to find, developers can save time by uncommenting as needed
# opentelemetry-cpp::version - Imported target of opentelemetry-cpp::version
# opentelemetry-cpp::common - Imported target of opentelemetry-cpp::common
opentelemetry-cpp::common # - Imported target of opentelemetry-cpp::common
# opentelemetry-cpp::trace - Imported target of opentelemetry-cpp::trace
# opentelemetry-cpp::metrics - Imported target of opentelemetry-cpp::metrics
# opentelemetry-cpp::otlp_recordable - Imported target of opentelemetry-cpp::otlp_recordable
Expand Down
11 changes: 7 additions & 4 deletions system/jlib/jtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,13 @@ class JLogSpanExporter final : public opentelemetry::sdk::trace::SpanExporter
out.append(", \"parent_span_id\": \"").append(16, parentSpanID).append("\"");
}

StringAttr ts;
ts.set(span->GetSpanContext().trace_state()->ToHeader().c_str());
if (!ts.isEmpty())
out.appendf(", \"trace_state\": \"%s\"", span->GetSpanContext().trace_state()->ToHeader().c_str());
//StringAttr ts;
//ts.set(span->GetSpanContext().trace_state()->ToHeader().c_str());
//if (!ts.isEmpty())
// out.appendf(", \"trace_state\": \"%s\"", span->GetSpanContext().trace_state()->ToHeader().c_str());
std::string traceStatestr = span->GetSpanContext().trace_state()->ToHeader();
if (!traceStatestr.empty())
out.appendf(", \"trace_state\": \"%s\"", traceStatestr.c_str());
}

if (hasMask(logFlags, SpanLogFlags::LogSpanDetails))
Expand Down
1 change: 0 additions & 1 deletion testing/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ include_directories (
${CMAKE_BINARY_DIR}/generated
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/oss
${HPCC_SOURCE_DIR}/system/globalid
)

ADD_DEFINITIONS( -D_CONSOLE )
Expand Down

0 comments on commit 428abea

Please sign in to comment.