Skip to content

Commit

Permalink
fix: report telemetry rps and sample rate for span
Browse files Browse the repository at this point in the history
  • Loading branch information
dmehala committed May 22, 2024
1 parent f26dd83 commit 05c0459
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/datadog/span_sampler_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ namespace {
std::string to_string(const std::vector<SpanSamplerConfig::Rule> &rules) {
nlohmann::json res;
for (const auto &r : rules) {
res.emplace_back(r.to_json());
auto j = r.to_json();
j["sample_rate"] = r.sample_rate;
if (r.max_per_second) {
j["max_per_second"] = *r.max_per_second;
}
res.emplace_back(std::move(j));
}

return res.dump();
Expand Down

0 comments on commit 05c0459

Please sign in to comment.