Skip to content

Commit f9e4217

Browse files
authored
Remove "additional_payload" from telemetry (#68)
* Remove "additional_payload" from telemetry This was requested by the team involved in instrumentation telemetry. * format * Ensure debug is set to false
1 parent 2ee2a7f commit f9e4217

File tree

6 files changed

+7
-15
lines changed

6 files changed

+7
-15
lines changed

src/datadog/datadog_agent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ void DatadogAgent::flush() {
333333
}
334334
}
335335

336-
void DatadogAgent::send_app_started(nlohmann::json&& tracer_config) {
337-
auto payload = tracer_telemetry_->app_started(std::move(tracer_config));
336+
void DatadogAgent::send_app_started() {
337+
auto payload = tracer_telemetry_->app_started();
338338
auto post_result = http_client_->post(
339339
telemetry_endpoint_, telemetry_set_request_headers_, std::move(payload),
340340
telemetry_on_response_, telemetry_on_error_);

src/datadog/datadog_agent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class DatadogAgent : public Collector {
6464
std::vector<std::unique_ptr<SpanData>>&& spans,
6565
const std::shared_ptr<TraceSampler>& response_handler) override;
6666

67-
void send_app_started(nlohmann::json&& tracer_config);
67+
void send_app_started();
6868

6969
nlohmann::json config_json() const override;
7070
};

src/datadog/tracer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Tracer::Tracer(const FinalizedTracerConfig& config,
268268
clock, config.logger);
269269
collector_ = agent;
270270
if (tracer_telemetry_->enabled()) {
271-
agent->send_app_started(config_json());
271+
agent->send_app_started();
272272
}
273273
}
274274

src/datadog/tracer_telemetry.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,13 @@ nlohmann::json TracerTelemetry::generate_telemetry_body(
8080
});
8181
}
8282

83-
std::string TracerTelemetry::app_started(nlohmann::json&& tracer_config) {
83+
std::string TracerTelemetry::app_started() {
8484
auto telemetry_body = generate_telemetry_body("app-started");
8585
// TODO: environment variables or finalized config details
8686
telemetry_body["payload"] = nlohmann::json::object({
8787
{"configuration", nlohmann::json::array({})},
8888

8989
});
90-
// TODO: Until we figure out "configuration", above, include a
91-
// JSON dump of the tracer configuration as "additional_payload".
92-
telemetry_body["additional_payload"] =
93-
nlohmann::json::array({nlohmann::json::object({
94-
{"name", "tracer_config_json"},
95-
{"value", tracer_config.dump()},
96-
})});
9790
auto app_started_payload = telemetry_body.dump();
9891
return app_started_payload;
9992
}

src/datadog/tracer_telemetry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class TracerTelemetry {
108108
auto& metrics() { return metrics_; };
109109
// Constructs an `app-started` message using information provided when
110110
// constructed and the tracer_config value passed in.
111-
std::string app_started(nlohmann::json&& tracer_config);
111+
std::string app_started();
112112
// This is used to take a snapshot of the current state of metrics and collect
113113
// timestamped "points" of values. These values are later submitted in
114114
// `generate-metrics` messages.

test/test_tracer_telemetry.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ TEST_CASE("Tracer telemetry") {
2727
RuntimeID::generate()};
2828

2929
SECTION("generates app-started message") {
30-
auto app_started_message =
31-
tracer_telemetry.app_started(nlohmann::json::object());
30+
auto app_started_message = tracer_telemetry.app_started();
3231
auto app_started = nlohmann::json::parse(app_started_message);
3332
REQUIRE(app_started["request_type"] == "app-started");
3433
}

0 commit comments

Comments
 (0)