Skip to content

Commit

Permalink
Fix payload data names
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
  • Loading branch information
bwoebi committed Sep 22, 2024
1 parent 73d1fd5 commit 9ad2b42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions live-debugger-ffi/src/send_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub extern "C" fn ddog_create_exception_snapshot<'a>(
) -> *mut DebuggerCapture<'a> {
let snapshot = DebuggerPayload {
service: service.to_utf8_lossy(),
source: "dd_debugger",
ddsource: "dd_debugger",
timestamp,
message: None,
debugger: DebuggerData::Snapshot(Snapshot {
Expand Down Expand Up @@ -142,7 +142,7 @@ pub extern "C" fn ddog_create_log_probe_snapshot<'a>(
) -> Box<DebuggerPayload<'a>> {
Box::new(DebuggerPayload {
service: service.to_utf8_lossy(),
source: "dd_debugger",
ddsource: "dd_debugger",
timestamp,
message: message.map(|m| m.to_utf8_lossy()),
debugger: DebuggerData::Snapshot(Snapshot {
Expand Down Expand Up @@ -317,7 +317,7 @@ pub extern "C" fn ddog_evaluation_error_snapshot<'a>(
) -> Box<DebuggerPayload<'a>> {
Box::new(DebuggerPayload {
service: service.to_utf8_lossy(),
source: "dd_debugger",
ddsource: "dd_debugger",
timestamp,
message: Some(Cow::Owned(format!(
"Evaluation errors for probe id {}",
Expand Down Expand Up @@ -358,7 +358,7 @@ pub fn ddog_debugger_diagnostics_create_unboxed<'a>(
) -> DebuggerPayload<'a> {
let mut diagnostics = Diagnostics {
probe_id: probe.id.to_utf8_lossy(),
version: probe.version,
probe_version: probe.version,
status: probe.status,
runtime_id,
..Default::default()
Expand All @@ -380,7 +380,7 @@ pub fn ddog_debugger_diagnostics_create_unboxed<'a>(
}
DebuggerPayload {
service,
source: "dd_debugger",
ddsource: "dd_debugger",
timestamp,
message: Some(if probe.diagnostic_msg.len() > 0 {
probe.diagnostic_msg.to_utf8_lossy()
Expand Down
4 changes: 2 additions & 2 deletions live-debugger/src/debugger_defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::collections::HashMap;
#[derive(Serialize, Deserialize)]
pub struct DebuggerPayload<'a> {
pub service: Cow<'a, str>,
pub source: &'static str,
pub ddsource: &'static str,
pub timestamp: u64,
pub debugger: DebuggerData<'a>,
pub message: Option<Cow<'a, str>>,
Expand Down Expand Up @@ -126,7 +126,7 @@ pub struct Diagnostics<'a> {
pub runtime_id: Cow<'a, str>,
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_id: Option<Cow<'a, str>>,
pub version: u64,
pub probe_version: u64,
pub status: ProbeStatus,
#[serde(skip_serializing_if = "Option::is_none")]
pub exception: Option<DiagnosticsError<'a>>,
Expand Down

0 comments on commit 9ad2b42

Please sign in to comment.