Skip to content

Commit 958830a

Browse files
Add ffi to enable client-side stats (#880)
1 parent c23f647 commit 958830a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

data-pipeline-ffi/src/trace_exporter.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,20 @@ pub unsafe extern "C" fn ddog_trace_exporter_config_enable_telemetry(
247247
}
248248
}
249249

250+
/// Set client-side stats computation status.
251+
#[no_mangle]
252+
pub unsafe extern "C" fn ddog_trace_exporter_config_set_compute_stats(
253+
config: Option<&mut TraceExporterConfig>,
254+
is_enabled: bool,
255+
) -> Option<Box<ExporterError>> {
256+
if let Option::Some(config) = config {
257+
config.compute_stats = is_enabled;
258+
None
259+
} else {
260+
gen_error!(ErrorCode::InvalidArgument)
261+
}
262+
}
263+
250264
/// Create a new TraceExporter instance.
251265
///
252266
/// # Arguments

0 commit comments

Comments
 (0)