Skip to content

Commit

Permalink
fix file format
Browse files Browse the repository at this point in the history
  • Loading branch information
andriy-fd committed Aug 10, 2021
1 parent 6c810d6 commit 2638700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions exporters/zipkin/src/recordable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ void Recordable::SetIdentity(const opentelemetry::trace::SpanContext &span_conte
span_["parentId"] = std::string(parent_span_id_lower_base16, 16);
}

span_["id"] = std::string(span_id_lower_base16, 16);
span_["traceId"] = std::string(trace_id_lower_base16, 32);
span_["id"] = std::string(span_id_lower_base16, 16);
span_["traceId"] = std::string(trace_id_lower_base16, 32);
}

void PopulateAttribute(nlohmann::json &attribute,
Expand Down
5 changes: 2 additions & 3 deletions exporters/zipkin/test/zipkin_recordable_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ TEST(ZipkinSpanRecordable, SetIdentity)
}

// according to https://zipkin.io/zipkin-api/#/ in case root span is created
// the parentId filed should be absent.
// the parentId filed should be absent.
TEST(ZipkinSpanRecordable, SetIdentityEmptyParent)
{
json j_span = {{"id", "0000000000000002"},
{"traceId", "00000000000000000000000000000001"}};
json j_span = {{"id", "0000000000000002"}, {"traceId", "00000000000000000000000000000001"}};
opentelemetry::exporter::zipkin::Recordable rec;
const trace::TraceId trace_id(std::array<const uint8_t, trace::TraceId::kSize>(
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}));
Expand Down

0 comments on commit 2638700

Please sign in to comment.