Skip to content

Commit

Permalink
wip: fix misinterpretation of the RFC
Browse files Browse the repository at this point in the history
  • Loading branch information
dmehala committed May 8, 2024
1 parent b511f74 commit cf845ff
Show file tree
Hide file tree
Showing 2 changed files with 310 additions and 159 deletions.
8 changes: 1 addition & 7 deletions src/datadog/w3c_propagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,6 @@ void parse_datadog_tracestate(ExtractedData& result, StringView datadog_value) {
continue;
}

const auto maybe_id = parse_uint64(value, 16);
if (!maybe_id || *maybe_id == 0) {
// chaff!
pair_begin = pair_end == end ? end : pair_end + 1;
continue;
}

result.datadog_w3c_parent_id = std::string(value);
} else if (starts_with(key, "t.")) {
// The part of the key that follows "t." is the name of a trace tag,
Expand Down Expand Up @@ -315,6 +308,7 @@ Expected<ExtractedData> extract_w3c(
return result;
}

result.datadog_w3c_parent_id = "0000000000000000";
extract_tracestate(result, headers);

return result;
Expand Down
Loading

0 comments on commit cf845ff

Please sign in to comment.