Add config to disable workflowName tag on metrics (cardinality control) - #1458
Open
michal-treter-text wants to merge 6 commits into
Open
Conversation
Per-workflow-name tagged metrics (workflow_running gauge, plus counters and timers recorded from execution code) create one time series per distinct workflow definition name, causing high cardinality when many workflow defs exist. conductor.metrics.workflow-name-tag.enabled (default true) drops the workflowName tag across all Monitors call sites and skips WorkflowMonitor's per-name pending-count query entirely when disabled. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rics-config-f8e9bc
MetricsCollector now takes a leading workflowNameTagEnabled boolean; update the test's manual bean wiring to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…8e9bc' into claude/workflow-metrics-config-f8e9bc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
conductor.metrics.workflow-name-tag.enabled(defaulttrue) to drop theworkflowNametag on all metrics recorded viaMonitors.java— with many workflow definitions, per-workflow-name tags create unbounded metric cardinality.WorkflowMonitor's scheduledworkflow_runninggauge loop is skipped entirely (rather than dropping just the tag), since dropping the tag mid-loop would make each workflow name's count overwrite the same gauge series — this also saves the per-name DAO count query.workflowName-tagged metrics (workflow_start_success,workflow_start_error,workflow_failure,workflow_execution,task_update_conflict, etc., recorded fromWorkflowExecutorOps,DeciderService,WorkflowSweeper,MetadataMapperService) drop just the tag, keeping the aggregate counter/timer meaningful.Test plan
WorkflowMonitorTest#testSkipsPendingWorkflowCountWhenWorkflowNameTagDisabled— verifiesgetPendingWorkflowCountis never called when the flag is off.MonitorsTest#workflowNameTagDisabled_dropsWorkflowNameTagFromMetrics— verifies theworkflowNametag is absent from the recorded meter when disabled.MetricsCollectorTestfor the new constructor param../gradlew :conductor-core:test --tests "com.netflix.conductor.metrics.*"(no local JVM available to run in this environment — please verify in CI)🤖 Generated with Claude Code