Skip to content

Commit be97f19

Browse files
committed
fix: report telemetry rps and sample rate for span
1 parent 9545d64 commit be97f19

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/datadog/span_sampler_config.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ namespace {
1616
std::string to_string(const std::vector<SpanSamplerConfig::Rule> &rules) {
1717
nlohmann::json res;
1818
for (const auto &r : rules) {
19-
res.emplace_back(r.to_json());
19+
auto j = r.to_json();
20+
j["sample_rate"] = r.sample_rate;
21+
if (r.max_per_second) {
22+
j["max_per_second"] = *r.max_per_second;
23+
}
24+
res.emplace_back(std::move(j));
2025
}
2126

2227
return res.dump();

0 commit comments

Comments
 (0)