Skip to content

Commit

Permalink
Add ffi to enable client-side stats (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
VianneyRuhlmann authored Feb 14, 2025
1 parent c23f647 commit 958830a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions data-pipeline-ffi/src/trace_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,20 @@ pub unsafe extern "C" fn ddog_trace_exporter_config_enable_telemetry(
}
}

/// Set client-side stats computation status.
#[no_mangle]
pub unsafe extern "C" fn ddog_trace_exporter_config_set_compute_stats(
config: Option<&mut TraceExporterConfig>,
is_enabled: bool,
) -> Option<Box<ExporterError>> {
if let Option::Some(config) = config {
config.compute_stats = is_enabled;
None
} else {
gen_error!(ErrorCode::InvalidArgument)
}
}

/// Create a new TraceExporter instance.
///
/// # Arguments
Expand Down

0 comments on commit 958830a

Please sign in to comment.