From ef3f98a5d37682765a1af0ecb8e76572a20f036b Mon Sep 17 00:00:00 2001 From: Daniel Schwartz-Narbonne Date: Tue, 19 Nov 2024 10:10:09 -0500 Subject: [PATCH] [telemetry] Add missing origin field --- crashtracker/src/crash_info/telemetry.rs | 1 + ddtelemetry/examples/tm-ping.rs | 1 + ddtelemetry/examples/tm-send-sketch.rs | 1 + ddtelemetry/src/data/common.rs | 1 + ddtelemetry/src/worker/mod.rs | 1 + 5 files changed, 5 insertions(+) diff --git a/crashtracker/src/crash_info/telemetry.rs b/crashtracker/src/crash_info/telemetry.rs index 87a97f2e6..9831e19ae 100644 --- a/crashtracker/src/crash_info/telemetry.rs +++ b/crashtracker/src/crash_info/telemetry.rs @@ -149,6 +149,7 @@ impl TelemetryCrashUploader { seq_id: 1, application: &metadata.application, host: &metadata.host, + origin: "Crashtracker", payload: &data::Payload::Logs(vec![data::Log { message, level: LogLevel::Error, diff --git a/ddtelemetry/examples/tm-ping.rs b/ddtelemetry/examples/tm-ping.rs index c4bcbd2cd..f52eaa8ac 100644 --- a/ddtelemetry/examples/tm-ping.rs +++ b/ddtelemetry/examples/tm-ping.rs @@ -38,6 +38,7 @@ fn build_request<'a>( .unwrap_or(0), runtime_id: "runtime_id", seq_id: seq_id(), + origin: "tm-ping", application, host, payload, diff --git a/ddtelemetry/examples/tm-send-sketch.rs b/ddtelemetry/examples/tm-send-sketch.rs index deddfe5c2..e6798a368 100644 --- a/ddtelemetry/examples/tm-send-sketch.rs +++ b/ddtelemetry/examples/tm-send-sketch.rs @@ -36,6 +36,7 @@ fn build_request<'a>( .unwrap_or(0), runtime_id: "runtime_id", seq_id: seq_id(), + origin: "tm-send-sketch", application, host, payload, diff --git a/ddtelemetry/src/data/common.rs b/ddtelemetry/src/data/common.rs index a9e7898f6..b71859391 100644 --- a/ddtelemetry/src/data/common.rs +++ b/ddtelemetry/src/data/common.rs @@ -30,6 +30,7 @@ pub struct Telemetry<'a> { pub seq_id: u64, pub application: &'a Application, pub host: &'a Host, + pub origin: &'a str, #[serde(flatten)] pub payload: &'a Payload, } diff --git a/ddtelemetry/src/worker/mod.rs b/ddtelemetry/src/worker/mod.rs index 2ee8725e5..7a8321840 100644 --- a/ddtelemetry/src/worker/mod.rs +++ b/ddtelemetry/src/worker/mod.rs @@ -638,6 +638,7 @@ impl TelemetryWorker { runtime_id: &self.runtime_id, seq_id, host: &self.data.host, + origin: "unknown", application: &self.data.app, payload, };