Skip to content

Commit 9fc7ee7

Browse files
authored
Remove rates payload versioning API. (#1171)
* Remove rates payload versioning API. * Remove builder function. * Revert "Remove builder function." This reverts commit fbdddaf.
1 parent fdab508 commit 9fc7ee7

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

data-pipeline-ffi/src/trace_exporter.rs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ pub struct TraceExporterConfig {
9999
telemetry_cfg: Option<TelemetryConfig>,
100100
health_metrics_enabled: bool,
101101
test_session_token: Option<String>,
102-
rates_payload_version: bool,
103102
connection_timeout: Option<u64>,
104103
}
105104

@@ -410,26 +409,6 @@ pub unsafe extern "C" fn ddog_trace_exporter_config_set_test_session_token(
410409
)
411410
}
412411

413-
/// Enables or disables the rates payload version feature.
414-
/// When enabled, the trace exporter checks the payload version in the agent's response.
415-
/// If the version hasn't changed since the last payload, the exporter will return an empty
416-
/// response.
417-
#[no_mangle]
418-
pub unsafe extern "C" fn ddog_trace_exporter_config_set_rates_payload_version(
419-
config: Option<&mut TraceExporterConfig>,
420-
rates_payload_version: bool,
421-
) -> Option<Box<ExporterError>> {
422-
catch_panic!(
423-
if let Option::Some(config) = config {
424-
config.rates_payload_version = rates_payload_version;
425-
None
426-
} else {
427-
gen_error!(ErrorCode::InvalidArgument)
428-
},
429-
gen_error!(ErrorCode::Panic)
430-
)
431-
}
432-
433412
/// Sets the timeout in ms for all agent's connections.
434413
#[no_mangle]
435414
pub unsafe extern "C" fn ddog_trace_exporter_config_set_connection_timeout(
@@ -495,10 +474,6 @@ pub unsafe extern "C" fn ddog_trace_exporter_new(
495474
builder.set_test_session_token(token);
496475
}
497476

498-
if config.rates_payload_version {
499-
builder.enable_agent_rates_payload_version();
500-
}
501-
502477
if config.health_metrics_enabled {
503478
builder.enable_health_metrics();
504479
}
@@ -597,7 +572,6 @@ mod tests {
597572
assert!(cfg.telemetry_cfg.is_none());
598573
assert!(!cfg.health_metrics_enabled);
599574
assert!(cfg.test_session_token.is_none());
600-
assert!(!cfg.rates_payload_version);
601575
assert!(cfg.connection_timeout.is_none());
602576

603577
ddog_trace_exporter_config_free(cfg);
@@ -1166,24 +1140,6 @@ mod tests {
11661140
assert_eq!(ret.unwrap().code, ErrorCode::Panic);
11671141
}
11681142

1169-
#[test]
1170-
fn rates_payload_version_test() {
1171-
unsafe {
1172-
let error = ddog_trace_exporter_config_set_rates_payload_version(None, true);
1173-
assert_eq!(error.as_ref().unwrap().code, ErrorCode::InvalidArgument);
1174-
1175-
ddog_trace_exporter_error_free(error);
1176-
1177-
let mut config = Some(TraceExporterConfig::default());
1178-
let error = ddog_trace_exporter_config_set_rates_payload_version(config.as_mut(), true);
1179-
1180-
assert_eq!(error, None);
1181-
1182-
let cfg = config.unwrap();
1183-
assert!(cfg.rates_payload_version);
1184-
}
1185-
}
1186-
11871143
#[test]
11881144
fn config_health_metrics_test() {
11891145
unsafe {

0 commit comments

Comments
 (0)