feat: record which destination a variable expiration handler uses

handler_configured now counts slack, teams, custom or cleared instead of
set or cleared, so usage shows whether the built-in destinations are picked.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
AlexRV12
2026-09-24 17:27:23 +02:00
co-authored by Claude Opus 5.5
parent b289e3a320
commit 857fc564ee
@@ -5831,7 +5831,13 @@ async fn edit_variable_expiration_handler(
windmill_common::feature_usage::log_feature_usage(
"variable_expiration",
"handler_configured",
if es.path.is_some() { "set" } else { "cleared" },
// The built-ins are matched on the hub slug the frontend picks them by, not the hub id.
match es.path.as_deref() {
None => "cleared",
Some(p) if p.ends_with("/variable-expiration-handler-slack") => "slack",
Some(p) if p.ends_with("/variable-expiration-handler-teams") => "teams",
Some(_) => "custom",
},
);
Ok(format!(