You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cluster-agent): enhance DatadogPodAutoscaler metrics with leader checks and tests
Improve the metrics generation and submission for DatadogPodAutoscaler:
* **Observer pattern enhancement**: Changed autoscaling.ObserverFunc signature
from func(string, string) to func(string, interface{}) to allow observers
direct access to stored objects without additional lookups
* **Centralized tag generation**: Refactored generator.go to use helper
functions (baseAutoscalerTags, autoscalerTagsWithSource,
autoscalerTagsWithContainer, conditionTags) making it easier to add or
modify tags across all metrics
* **Leader-only metric submission**: Added isLeader checks to
SenderMetricsWriter, horizontalController, and verticalController to
prevent non-leader instances from submitting duplicate metrics
* **Backward compatibility**: Retained isLeader:true tag on all metrics
via baseAutoscalerTags helper function
Copy file name to clipboardExpand all lines: cmd/cluster-agent/subcommands/start/command.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -538,7 +538,7 @@ func start(log log.Component,
538
538
log.Error("Admission controller is disabled, vertical autoscaling requires the admission controller to be enabled. Vertical scaling will be disabled.")
0 commit comments