Skip to content

[Backport 7.67.x] [AMCC-11] dogstatsd: additional metric control mechanism between the sampler and the serializer #37828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

agent-platform-auto-pr[bot]
Copy link
Contributor

@agent-platform-auto-pr agent-platform-auto-pr bot commented Jun 10, 2025

Without this change, the #36761 change does not work properly for histograms (fails silently).

Backport ac84213 from #37692.


What does this PR do?

Adds an additional processing step when the time samplers is flushing data to the serializer for serialization.
This extra step is necessary since the aggregation from the time sampler might possibly generate new metrics, that would not have been correctly visible to the metric control implementation which is running in the listening part of DogStatsD.

This implementation creates a sublist in order to avoid having to do a complete second pass with the configured list. This sublist contain only the metrics names generated from histograms, a heuristic try to do this using a static list of histogram aggregates and percentile suffixes.

Describe how you validated your changes

Manual tested E2E on an org with the feature enabled, also, will be extensively dogfooded.

…sampler and the serializer (#37692)

(cherry picked from commit ac84213)
@agent-platform-auto-pr agent-platform-auto-pr bot requested a review from a team as a code owner June 10, 2025 16:45
@agent-platform-auto-pr agent-platform-auto-pr bot added qa/done QA done before merge and regressions are covered by tests backport bot labels Jun 10, 2025
@agent-platform-auto-pr agent-platform-auto-pr bot requested a review from a team as a code owner June 10, 2025 16:45
@agent-platform-auto-pr agent-platform-auto-pr bot added the long review PR is complex, plan time to review it label Jun 10, 2025
@agent-platform-auto-pr agent-platform-auto-pr bot added changelog/no-changelog qa/done QA done before merge and regressions are covered by tests backport bot long review PR is complex, plan time to review it labels Jun 10, 2025
Copy link

Go Package Import Differences

Baseline: f4dd783
Comparison: 1124211

binaryosarchchange
agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
agentdarwinamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
agentdarwinarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
iot-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
iot-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
heroku-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
cluster-agentlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
cluster-agentlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
cluster-agent-cloudfoundrylinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
cluster-agent-cloudfoundrylinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
dogstatsdlinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
dogstatsdlinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
serverlesslinuxamd64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings
serverlesslinuxarm64
+1, -0
+github.com/DataDog/datadog-agent/pkg/util/strings

@agent-platform-auto-pr
Copy link
Contributor Author

Uncompressed package size comparison

Comparison with ancestor 72b16c13c417cb262f767cf14beb0d9c338f8e9d

Diff per package
package diff status size ancestor threshold
datadog-agent-x86_64-rpm 0.43MB ⚠️ 784.46MB 784.03MB 0.50MB
datadog-agent-x86_64-suse 0.43MB ⚠️ 784.46MB 784.03MB 0.50MB
datadog-agent-amd64-deb 0.43MB ⚠️ 775.51MB 775.08MB 0.50MB
datadog-agent-aarch64-rpm 0.42MB ⚠️ 773.74MB 773.33MB 0.50MB
datadog-agent-arm64-deb 0.42MB ⚠️ 764.81MB 764.39MB 0.50MB
datadog-heroku-agent-amd64-deb 0.02MB ⚠️ 378.73MB 378.71MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.01MB ⚠️ 31.30MB 31.30MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.01MB ⚠️ 31.30MB 31.30MB 0.50MB
datadog-dogstatsd-amd64-deb 0.01MB ⚠️ 31.22MB 31.21MB 0.50MB
datadog-dogstatsd-arm64-deb 0.01MB ⚠️ 30.05MB 30.04MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 61.14MB 61.14MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 61.14MB 61.14MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 58.40MB 58.39MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 61.06MB 61.06MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 58.31MB 58.31MB 0.50MB

Decision

⚠️ Warning

@agent-platform-auto-pr
Copy link
Contributor Author

Static quality checks

✅ Please find below the results from static quality gates

Successful checks

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 748.14 MiB 778.06 MiB 185.8 MiB 191.06 MiB
static_quality_gate_agent_deb_amd64_fips 745.98 MiB 776.09 MiB 184.98 MiB 190.72 MiB
static_quality_gate_agent_heroku_amd64 367.17 MiB 434.99 MiB 98.39 MiB 114.34 MiB
static_quality_gate_agent_msi 964.74 MiB 978.45 MiB 147.14 MiB 151.65 MiB
static_quality_gate_agent_rpm_amd64 748.13 MiB 778.06 MiB 187.35 MiB 193.42 MiB
static_quality_gate_agent_rpm_amd64_fips 745.97 MiB 776.06 MiB 186.87 MiB 192.61 MiB
static_quality_gate_agent_rpm_arm64 737.9 MiB 768.33 MiB 169.96 MiB 174.71 MiB
static_quality_gate_agent_rpm_arm64_fips 735.96 MiB 766.55 MiB 168.79 MiB 173.92 MiB
static_quality_gate_agent_suse_amd64 748.13 MiB 778.08 MiB 187.35 MiB 193.42 MiB
static_quality_gate_agent_suse_amd64_fips 745.97 MiB 776.11 MiB 186.87 MiB 192.78 MiB
static_quality_gate_agent_suse_arm64 737.9 MiB 768.31 MiB 169.96 MiB 174.71 MiB
static_quality_gate_agent_suse_arm64_fips 735.96 MiB 766.5 MiB 168.79 MiB 173.92 MiB
static_quality_gate_docker_agent_amd64 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_arm64 857.47 MiB 876.0 MiB 272.73 MiB 278.3 MiB
static_quality_gate_docker_agent_jmx_amd64 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_jmx_arm64 857.47 MiB 876.63 MiB 272.73 MiB 278.4 MiB
static_quality_gate_docker_agent_windows1809 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_windows1809_core 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_windows1809_core_jmx 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_windows1809_jmx 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022_core 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022_core_jmx 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022_jmx 844.55 MiB 862.5 MiB 286.32 MiB 292.0 MiB
static_quality_gate_docker_cluster_agent_amd64 256.97 MiB 263.4 MiB 101.99 MiB 104.07 MiB
static_quality_gate_docker_cluster_agent_arm64 273.0 MiB 279.38 MiB 96.95 MiB 98.95 MiB
static_quality_gate_docker_cws_instrumentation_amd64 6.66 MiB 7.12 MiB 2.82 MiB 3.29 MiB
static_quality_gate_docker_cws_instrumentation_arm64 6.44 MiB 6.92 MiB 2.6 MiB 3.07 MiB
static_quality_gate_docker_dogstatsd_amd64 37.9 MiB 46.39 MiB 14.61 MiB 17.78 MiB
static_quality_gate_docker_dogstatsd_arm64 36.85 MiB 45.05 MiB 13.74 MiB 16.65 MiB
static_quality_gate_dogstatsd_deb_amd64 29.85 MiB 38.4 MiB 7.9 MiB 10.26 MiB
static_quality_gate_dogstatsd_deb_arm64 28.73 MiB 36.98 MiB 6.88 MiB 8.96 MiB
static_quality_gate_dogstatsd_rpm_amd64 29.85 MiB 38.4 MiB 7.91 MiB 10.27 MiB
static_quality_gate_dogstatsd_suse_amd64 29.85 MiB 38.4 MiB 7.91 MiB 10.27 MiB
static_quality_gate_iot_agent_deb_amd64 58.31 MiB 58.51 MiB 14.69 MiB 15.02 MiB
static_quality_gate_iot_agent_deb_arm64 55.69 MiB 55.94 MiB 12.69 MiB 13.05 MiB
static_quality_gate_iot_agent_deb_armhf 54.46 MiB 54.65 MiB 12.7 MiB 13.05 MiB
static_quality_gate_iot_agent_rpm_amd64 58.31 MiB 58.51 MiB 14.71 MiB 15.04 MiB
static_quality_gate_iot_agent_rpm_arm64 55.69 MiB 55.94 MiB 12.71 MiB 13.07 MiB
static_quality_gate_iot_agent_suse_amd64 58.31 MiB 58.51 MiB 14.71 MiB 15.04 MiB

@chouquette chouquette merged commit 641056c into 7.67.x Jun 11, 2025
343 of 345 checks passed
@chouquette chouquette deleted the backport-37692-to-7.67.x branch June 11, 2025 12:27
@github-actions github-actions bot added this to the 7.67.0 milestone Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bot changelog/no-changelog long review PR is complex, plan time to review it qa/done QA done before merge and regressions are covered by tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants