Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/observability/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ pub(crate) fn default_topics_config() -> Value {
"topic_map_functions": [],
"scope": {"type": "trace", "idle_seconds": 600},
"rerun_seconds": 86400,
"relabel_overlap_seconds": 3600,
"backfill_time_range": "86400s",
})
}
Expand Down
19 changes: 0 additions & 19 deletions src/topics/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const DEFAULT_TOPIC_AUTOMATION_DESCRIPTION: &str =
const DEFAULT_TOPIC_FACET_NAMES: &[&str] = &["Task", "Sentiment", "Issues"];
const DEFAULT_TOPIC_WINDOW_SECONDS: i64 = 24 * 60 * 60;
const DEFAULT_TOPIC_RERUN_SECONDS: i64 = 24 * 60 * 60;
const DEFAULT_TOPIC_RELABEL_OVERLAP_SECONDS: i64 = 60 * 60;
const DEFAULT_TOPIC_IDLE_SECONDS: i64 = 10 * 60;
const DEFAULT_TOPIC_SAMPLING_RATE: f64 = 1.0;
const DEFAULT_TOPIC_EMBEDDING_MODEL: &str = "brain-embedding-1";
Expand Down Expand Up @@ -132,7 +131,6 @@ pub struct TopicAutomationStatus {
pub btql_filter: Option<String>,
pub window_seconds: Option<i64>,
pub rerun_seconds: Option<i64>,
pub relabel_overlap_seconds: Option<i64>,
pub idle_seconds: Option<i64>,
pub configured_facets: usize,
pub configured_topic_maps: usize,
Expand Down Expand Up @@ -178,7 +176,6 @@ pub struct TopicAutomationConfig {
pub sampling_rate: Option<f64>,
pub window_seconds: Option<i64>,
pub rerun_seconds: Option<i64>,
pub relabel_overlap_seconds: Option<i64>,
pub idle_seconds: Option<i64>,
pub facet_functions: Vec<FunctionSummary>,
pub topic_map_functions: Vec<FunctionSummary>,
Expand All @@ -193,7 +190,6 @@ pub struct TopicAutomationConfigPatch {
pub sampling_rate: Option<f64>,
pub window_seconds: Option<i64>,
pub rerun_seconds: Option<i64>,
pub relabel_overlap_seconds: Option<i64>,
pub idle_seconds: Option<i64>,
}

Expand All @@ -205,7 +201,6 @@ pub struct TopicAutomationConfigCreate {
pub sampling_rate: Option<f64>,
pub window_seconds: Option<i64>,
pub rerun_seconds: Option<i64>,
pub relabel_overlap_seconds: Option<i64>,
pub idle_seconds: Option<i64>,
pub facets: Vec<String>,
pub embedding_model: Option<String>,
Expand Down Expand Up @@ -330,7 +325,6 @@ struct RegisterTopicAutomationConfig {
topic_map_functions: Vec<TopicMapFunctionRef>,
scope: TraceScopeConfig,
rerun_seconds: i64,
relabel_overlap_seconds: i64,
backfill_time_range: String,
#[serde(skip_serializing_if = "Option::is_none")]
btql_filter: Option<String>,
Expand Down Expand Up @@ -561,9 +555,6 @@ pub async fn enable_topics_config(
.window_seconds
.unwrap_or(DEFAULT_TOPIC_WINDOW_SECONDS);
let rerun_seconds = create.rerun_seconds.unwrap_or(DEFAULT_TOPIC_RERUN_SECONDS);
let relabel_overlap_seconds = create
.relabel_overlap_seconds
.unwrap_or(DEFAULT_TOPIC_RELABEL_OVERLAP_SECONDS);
let idle_seconds = create.idle_seconds.unwrap_or(DEFAULT_TOPIC_IDLE_SECONDS);
let sampling_rate = create.sampling_rate.unwrap_or(DEFAULT_TOPIC_SAMPLING_RATE);
let embedding_model = create
Expand Down Expand Up @@ -602,7 +593,6 @@ pub async fn enable_topics_config(
idle_seconds,
},
rerun_seconds,
relabel_overlap_seconds,
backfill_time_range: format_duration_seconds(window_seconds),
btql_filter: create.btql_filter,
},
Expand Down Expand Up @@ -712,13 +702,6 @@ pub async fn update_topics_config(
next_config.insert("rerun_seconds".to_string(), Value::from(rerun_seconds));
has_config_changes = true;
}
if let Some(relabel_overlap_seconds) = patch.relabel_overlap_seconds {
next_config.insert(
"relabel_overlap_seconds".to_string(),
Value::from(relabel_overlap_seconds),
);
has_config_changes = true;
}
if let Some(idle_seconds) = patch.idle_seconds {
let mut next_scope = current_config
.get("scope")
Expand Down Expand Up @@ -1367,7 +1350,6 @@ async fn build_topic_automation_status(
btql_filter: string_value(config.get("btql_filter")),
window_seconds: backfill_time_range_to_window_seconds(config.get("backfill_time_range")),
rerun_seconds: int_value(config.get("rerun_seconds")),
relabel_overlap_seconds: int_value(config.get("relabel_overlap_seconds")),
idle_seconds: int_value(scope.get("idle_seconds")),
configured_facets: config
.get("facet_functions")
Expand Down Expand Up @@ -1423,7 +1405,6 @@ async fn build_topic_automation_config(
sampling_rate: float_value(config.get("sampling_rate")),
window_seconds: backfill_time_range_to_window_seconds(config.get("backfill_time_range")),
rerun_seconds: int_value(config.get("rerun_seconds")),
relabel_overlap_seconds: int_value(config.get("relabel_overlap_seconds")),
idle_seconds: int_value(scope.get("idle_seconds")),
facet_functions: summarize_function_refs(
client,
Expand Down
18 changes: 0 additions & 18 deletions src/topics/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,6 @@ fn render_config_block(automation: &TopicAutomationConfig) -> String {
value: format_duration_compact(automation.rerun_seconds),
hint: Some("how often Topics tries to generate fresh topic maps"),
},
ConfigField {
label: "relabel overlap",
value: format_duration_compact(automation.relabel_overlap_seconds),
hint: Some(
"after recompute, this much recent history is relabeled with the new topics",
),
},
ConfigField {
label: "idle time",
value: format_duration_compact(automation.idle_seconds),
Expand Down Expand Up @@ -740,7 +733,6 @@ struct ResolvedTopicsConfigFields {
sampling_rate: Option<f64>,
window_seconds: Option<i64>,
rerun_seconds: Option<i64>,
relabel_overlap_seconds: Option<i64>,
idle_seconds: Option<i64>,
}

Expand All @@ -754,7 +746,6 @@ impl TopicsConfigFieldsArgs {
sampling_rate: parse_sampling_rate(self.sampling_rate.as_deref())?,
window_seconds: parse_duration_to_seconds(self.window.as_deref())?,
rerun_seconds: parse_duration_to_seconds(self.cadence.as_deref())?,
relabel_overlap_seconds: parse_duration_to_seconds(self.relabel_overlap.as_deref())?,
idle_seconds: parse_duration_to_seconds(self.idle.as_deref())?,
})
}
Expand All @@ -775,7 +766,6 @@ impl ConfigSetArgs {
sampling_rate: fields.sampling_rate,
window_seconds: fields.window_seconds,
rerun_seconds: fields.rerun_seconds,
relabel_overlap_seconds: fields.relabel_overlap_seconds,
idle_seconds: fields.idle_seconds,
};

Expand All @@ -785,7 +775,6 @@ impl ConfigSetArgs {
&& patch.sampling_rate.is_none()
&& patch.window_seconds.is_none()
&& patch.rerun_seconds.is_none()
&& patch.relabel_overlap_seconds.is_none()
&& patch.idle_seconds.is_none()
{
bail!("no topic automation updates were requested");
Expand All @@ -805,7 +794,6 @@ impl ConfigEnableArgs {
sampling_rate: fields.sampling_rate,
window_seconds: fields.window_seconds,
rerun_seconds: fields.rerun_seconds,
relabel_overlap_seconds: fields.relabel_overlap_seconds,
idle_seconds: fields.idle_seconds,
facets: self.facets.clone(),
embedding_model: trim_to_option(self.embedding_model.as_deref()),
Expand Down Expand Up @@ -935,7 +923,6 @@ mod tests {
sampling_rate: Some(1.0),
window_seconds: Some(3600),
rerun_seconds: Some(86400),
relabel_overlap_seconds: Some(3600),
idle_seconds: Some(30),
facet_functions: vec![api::FunctionSummary {
name: "Task".to_string(),
Expand Down Expand Up @@ -1068,7 +1055,6 @@ mod tests {
description: None,
window: Some("1h".to_string()),
cadence: Some("1d".to_string()),
relabel_overlap: None,
idle: Some("30s".to_string()),
sampling_rate: Some("50%".to_string()),
filter: Some("root_span_id = 'abc'".to_string()),
Expand Down Expand Up @@ -1096,7 +1082,6 @@ mod tests {
description: None,
window: None,
cadence: None,
relabel_overlap: None,
idle: None,
sampling_rate: Some("0.25".to_string()),
filter: None,
Expand All @@ -1117,7 +1102,6 @@ mod tests {
description: None,
window: None,
cadence: None,
relabel_overlap: None,
idle: None,
sampling_rate: Some("25".to_string()),
filter: None,
Expand All @@ -1137,7 +1121,6 @@ mod tests {
description: None,
window: Some("6h".to_string()),
cadence: Some("1d".to_string()),
relabel_overlap: Some("1h".to_string()),
idle: Some("10m".to_string()),
sampling_rate: Some("25%".to_string()),
filter: None,
Expand All @@ -1151,7 +1134,6 @@ mod tests {
assert_eq!(create.name.as_deref(), Some("Topics"));
assert_eq!(create.window_seconds, Some(6 * 60 * 60));
assert_eq!(create.rerun_seconds, Some(24 * 60 * 60));
assert_eq!(create.relabel_overlap_seconds, Some(60 * 60));
assert_eq!(create.idle_seconds, Some(10 * 60));
assert_eq!(create.sampling_rate, Some(0.25));
assert_eq!(create.btql_filter, None);
Expand Down
4 changes: 0 additions & 4 deletions src/topics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ struct TopicsConfigFieldsArgs {
#[arg(long = "generation-cadence", alias = "cadence")]
cadence: Option<String>,

/// Relabel overlap duration, for example 1h
#[arg(long = "relabel-overlap")]
relabel_overlap: Option<String>,

/// Trace idle wait duration, for example 30s
#[arg(long = "idle-time", alias = "idle")]
idle: Option<String>,
Expand Down
4 changes: 1 addition & 3 deletions src/topics/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,9 @@ fn write_automation_diagnostics(
)?;
writeln!(
output,
" schedule: window {} | cadence {} | overlap {} | idle {}",
" schedule: window {} | cadence {} | idle {}",
format_duration_compact(automation.window_seconds),
format_duration_compact(automation.rerun_seconds),
format_duration_compact(automation.relabel_overlap_seconds),
format_duration_compact(automation.idle_seconds)
)?;
writeln!(
Expand Down Expand Up @@ -830,7 +829,6 @@ mod tests {
btql_filter: None,
window_seconds: Some(86400),
rerun_seconds: Some(86400),
relabel_overlap_seconds: Some(3600),
idle_seconds: Some(600),
configured_facets: 3,
configured_topic_maps: 2,
Expand Down
Loading