Skip to content

Commit

Permalink
Leave empty if not available as per PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsn committed Dec 2, 2024
1 parent e4198c1 commit 5272418
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crashtracker/src/crash_info/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl TelemetryCrashUploader {
seq_id: 1,
application: &metadata.application,
host: &metadata.host,
origin: "Crashtracker",
origin: Some("Crashtracker"),
payload: &data::Payload::Logs(vec![data::Log {
message,
level: LogLevel::Error,
Expand Down
1 change: 1 addition & 0 deletions crashtracker/src/rfc5_crash_info/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ impl TelemetryCrashUploader {
is_sensitive: true,
count: 1,
}]),
origin: Some("Crashtracker"),
};
let client = ddtelemetry::worker::http_client::from_config(&self.cfg);
let req = request_builder(&self.cfg)?
Expand Down
2 changes: 1 addition & 1 deletion ddtelemetry/examples/tm-ping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn build_request<'a>(
tracer_time: SystemTime::UNIX_EPOCH.elapsed().map_or(0, |d| d.as_secs()),
runtime_id: "runtime_id",
seq_id: seq_id(),
origin: "tm-ping",
origin: Some("tm-ping"),
application,
host,
payload,
Expand Down
2 changes: 1 addition & 1 deletion ddtelemetry/examples/tm-send-sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn build_request<'a>(
tracer_time: SystemTime::UNIX_EPOCH.elapsed().map_or(0, |d| d.as_secs()),
runtime_id: "runtime_id",
seq_id: seq_id(),
origin: "tm-send-sketch",
origin: Some("tm-send-sketch"),
application,
host,
payload,
Expand Down
3 changes: 2 additions & 1 deletion ddtelemetry/src/data/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ pub struct Telemetry<'a> {
pub seq_id: u64,
pub application: &'a Application,
pub host: &'a Host,
pub origin: &'a str,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub origin: Option<&'a str>,
#[serde(flatten)]
pub payload: &'a Payload,
}
Expand Down
2 changes: 1 addition & 1 deletion ddtelemetry/src/worker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ impl TelemetryWorker {
runtime_id: &self.runtime_id,
seq_id,
host: &self.data.host,
origin: "unknown",
origin: None,
application: &self.data.app,
payload,
};
Expand Down

0 comments on commit 5272418

Please sign in to comment.