Skip to content

Commit

Permalink
Reduce the amount of diagnostic messages sent
Browse files Browse the repository at this point in the history
Done by deduplicating them.

Signed-off-by: Bob Weinand <[email protected]>
Handle case where the applictaion is stopped without other telemetry sent

This lead down to a path where the Stop action was actually enqueued without being ever causing a removal of the Application instances.

Signed-off-by: Bob Weinand <[email protected]>
  • Loading branch information
bwoebi committed Nov 15, 2024
1 parent 811d899 commit d1a8696
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
42 changes: 42 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions components-rs/remote_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use datadog_remote_config::{
use datadog_sidecar::service::blocking::SidecarTransport;
use datadog_sidecar::service::{InstanceId, QueueId};
use datadog_sidecar::shm_remote_config::{RemoteConfigManager, RemoteConfigUpdate};
use datadog_sidecar_ffi::ddog_sidecar_send_debugger_data;
use datadog_sidecar_ffi::{ddog_sidecar_send_debugger_data, ddog_sidecar_send_debugger_diagnostics};
use ddcommon::Endpoint;
use ddcommon_ffi::slice::AsBytes;
use ddcommon_ffi::{CharSlice, MaybeError};
Expand Down Expand Up @@ -531,5 +531,6 @@ pub unsafe extern "C" fn ddog_send_debugger_diagnostics<'a>(
"Submitting debugger diagnostics data: {:?}",
serde_json::to_string(&payload).unwrap()
);
ddog_sidecar_send_debugger_data(transport, instance_id, queue_id, vec![payload])

ddog_sidecar_send_debugger_diagnostics(transport, instance_id, queue_id, payload)
}
5 changes: 5 additions & 0 deletions components-rs/sidecar.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ ddog_MaybeError ddog_sidecar_send_debugger_datum(struct ddog_SidecarTransport **
ddog_QueueId queue_id,
struct ddog_DebuggerPayload *payload);

ddog_MaybeError ddog_sidecar_send_debugger_diagnostics(struct ddog_SidecarTransport **transport,
const struct ddog_InstanceId *instance_id,
ddog_QueueId queue_id,
struct ddog_DebuggerPayload diagnostics_payload);

ddog_MaybeError ddog_sidecar_set_remote_config_data(struct ddog_SidecarTransport **transport,
const struct ddog_InstanceId *instance_id,
const ddog_QueueId *queue_id,
Expand Down

0 comments on commit d1a8696

Please sign in to comment.