Skip to content

[Backport 7.69.x] data streams messages: Fix bug when kafka_consumer logs configuration is already present and yaml #39213

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 2 commits into from
Jul 24, 2025

Conversation

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

Backport b240499 from #39176.


What does this PR do?

When the source of a logs configuration is from data streams messages, there are two possible cases:

  1. There was no logs configuration previously, in that case, the configuration is defaulted to a Json configuration
  2. There already is a logs configuration. In that case, if the configuration was yaml, the logs configuration will still be in yaml format. This PR fixes this case.

Motivation

Noticed these error logs in the agent when doing QA:

2025-07-22 17:06:53 UTC | CORE | INFO | (comp/core/autodiscovery/autodiscoveryimpl/config_poller.go:108 in stream) | dsm-live-messages provider: collected 2 new configurations, removed 2
2025-07-22 17:06:53 UTC | CORE | INFO | (pkg/logs/schedulers/ad/scheduler.go:98 in Unschedule) | New source to remove: entity: containerd://c6163755192bb24268b70c947f41e740201d3fee30cda264c9b7dd939ee673df
2025-07-22 17:06:53 UTC | CORE | INFO | (pkg/logs/schedulers/ad/scheduler.go:74 in Schedule) | Received a new logs config: kafka_consumer
2025-07-22 17:06:53 UTC | CORE | WARN | (pkg/logs/schedulers/ad/scheduler.go:77 in Schedule) | Invalid configuration: could not parse JSON logs config: invalid character ' ' in numeric literal

Describe how you validated your changes

Provided a yaml configuration by default, and checked that I could still use the data streams messages feature (powered by remote configuration).

<!--
Validate your changes before merge, ensuring that:

  • Your PR is tested by static / unit / integrations / e2e tests
  • Your PR description details which e2e tests cover your changes, if any
  • The PR description contains details of how you validated your changes. If you validated changes manually and not through automated tests, add context on why automated tests did not fit your changes validation.

If you want additional validation by a second person, you can ask reviewers to do it. Describe how to set up an environment for manual tests in the PR description. Manual validation is expected to happen on every commit before merge.

Any manual validation step should then map to an automated test. Manual validation should not substitute automation, minus exceptions not supported by test tooling yet.
-->

Possible Drawbacks / Trade-offs

Additional Notes

<!--

  • Anything else we should know when reviewing?
  • Include benchmarking information here whenever possible.
  • Include info about alternatives that were considered and why the proposed
    version was chosen.
    -->

… is already present and yaml (#39176)

(cherry picked from commit b240499)
@agent-platform-auto-pr agent-platform-auto-pr bot requested a review from a team as a code owner July 23, 2025 18:48
@agent-platform-auto-pr agent-platform-auto-pr bot added medium review PR review might take time qa/rc-required Only for a PR that requires validation on the Release Candidate team/agent-log-pipelines labels Jul 23, 2025
Copy link

cit-pr-commenter bot commented Jul 23, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: ec1c91a4-41c7-430b-857d-936151c23f7c

Baseline: e3c7529
Comparison: 23c6784
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization +0.02 [-3.08, +3.11] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
file_tree memory utilization +0.25 [+0.21, +0.28] 1 Logs
otlp_ingest_logs memory utilization +0.23 [+0.11, +0.36] 1 Logs
quality_gate_logs % cpu utilization +0.17 [-2.58, +2.92] 1 Logs bounds checks dashboard
docker_containers_memory memory utilization +0.05 [-0.01, +0.12] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.05 [-0.55, +0.65] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.02 [-0.55, +0.58] 1 Logs
docker_containers_cpu % cpu utilization +0.02 [-3.08, +3.11] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.01 [-0.03, +0.05] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.00 [-0.30, +0.29] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.05 [-0.59, +0.49] 1 Logs
ddot_metrics memory utilization -0.08 [-0.20, +0.04] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.09 [-0.69, +0.50] 1 Logs
quality_gate_idle_all_features memory utilization -0.13 [-0.17, -0.09] 1 Logs bounds checks dashboard
ddot_logs memory utilization -0.13 [-0.22, -0.04] 1 Logs
otlp_ingest_metrics memory utilization -0.24 [-0.38, -0.10] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.46 [-0.49, -0.42] 1 Logs
quality_gate_idle memory utilization -0.47 [-0.50, -0.43] 1 Logs bounds checks dashboard
tcp_syslog_to_blackhole ingress throughput -0.64 [-0.72, -0.56] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -1.38 [-2.23, -0.52] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
docker_containers_cpu simple_check_run 10/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 10/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_logs memory_usage 10/10 bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.

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

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 1f3f1b3

Successful checks

Info

Quality gate Delta On disk size (MiB) Delta On wire size (MiB)
agent_deb_amd64 $${+0.24}$$ $${702.74}$$ < $${705.58}$$ $${+0.14}$$ $${177.53}$$ < $${178.78}$$
agent_deb_amd64_fips $${+0.24}$$ $${700.99}$$ < $${704.78}$$ $${+0.2}$$ $${176.94}$$ < $${178.18}$$
agent_heroku_amd64 $${+0.06}$$ $${354.48}$$ < $${367.87}$$ $${+0.06}$$ $${94.82}$$ < $${100.05}$$
agent_msi $${+0.09}$$ $${977.31}$$ < $${979.82}$$ $${+0.08}$$ $${148.55}$$ < $${149.26}$$
agent_rpm_amd64 $${+0.24}$$ $${702.73}$$ < $${705.56}$$ $${+0.22}$$ $${179.1}$$ < $${180.29}$$
agent_rpm_amd64_fips $${+0.24}$$ $${700.97}$$ < $${704.77}$$ $${+0.17}$$ $${178.71}$$ < $${179.83}$$
agent_rpm_arm64 $${+0.18}$$ $${692.7}$$ < $${695.45}$$ $${+0.09}$$ $${162.77}$$ < $${163.94}$$
agent_rpm_arm64_fips $${+0.18}$$ $${691.02}$$ < $${694.75}$$ $${+0.09}$$ $${161.82}$$ < $${163.06}$$
agent_suse_amd64 $${+0.24}$$ $${702.73}$$ < $${705.57}$$ $${+0.22}$$ $${179.1}$$ < $${180.29}$$
agent_suse_amd64_fips $${+0.24}$$ $${700.97}$$ < $${704.77}$$ $${+0.17}$$ $${178.71}$$ < $${180.01}$$
agent_suse_arm64 $${+0.18}$$ $${692.7}$$ < $${695.38}$$ $${+0.09}$$ $${162.77}$$ < $${163.95}$$
agent_suse_arm64_fips $${+0.18}$$ $${691.02}$$ < $${694.73}$$ $${+0.09}$$ $${161.82}$$ < $${163.06}$$
docker_agent_amd64 $${+0.18}$$ $${786.48}$$ < $${789.36}$$ $${+0.15}$$ $${270.7}$$ < $${272.13}$$
docker_agent_arm64 $${+0.18}$$ $${799.97}$$ < $${802.63}$$ $${+0.1}$$ $${258.39}$$ < $${259.79}$$
docker_agent_jmx_amd64 $${+0.23}$$ $${977.73}$$ < $${980.55}$$ $${+0.2}$$ $${339.72}$$ < $${341.08}$$
docker_agent_jmx_arm64 $${+0.23}$$ $${979.81}$$ < $${982.42}$$ $${+0.14}$$ $${323.38}$$ < $${324.75}$$
docker_agent_windows1809 $${-5.33}$$ $${1184.51}$$ < $${1195.03}$$ $${-0.9}$$ $${418.64}$$ < $${424.31}$$
docker_agent_windows1809_core $${+0.09}$$ $${5919.89}$$ < $${5930.43}$$ $${0}$$ $${2048.0}$$ < $${2049.0}$$
docker_agent_windows1809_core_jmx $${+0.29}$$ $${6041.66}$$ < $${6068.68}$$ $${0}$$ $${2048.0}$$ < $${2054.45}$$
docker_agent_windows1809_jmx $${+0.03}$$ $${1311.49}$$ < $${1316.42}$$ $${-0.06}$$ $${461.87}$$ < $${466.29}$$
docker_agent_windows2022 $${+0.03}$$ $${1209.02}$$ < $${1213.94}$$ $${+0.04}$$ $${432.34}$$ < $${436.85}$$
docker_agent_windows2022_core $${+0.29}$$ $${5893.18}$$ < $${5897.98}$$ $${0}$$ $${2048.0}$$ < $${2050.9}$$
docker_agent_windows2022_core_jmx $${+0.13}$$ $${6014.87}$$ < $${6019.2}$$ $${0}$$ $${2048.0}$$ < $${2054.29}$$
docker_agent_windows2022_jmx $${+0.23}$$ $${1330.82}$$ < $${1335.89}$$ $${+0.1}$$ $${474.67}$$ < $${479.09}$$
docker_cluster_agent_amd64 $${+0.02}$$ $${213.73}$$ < $${214.5}$$ $${+0.03}$$ $${72.66}$$ < $${73.51}$$
docker_cluster_agent_arm64 $${+0.12}$$ $${229.62}$$ < $${230.33}$$ $${+0.01}$$ $${68.91}$$ < $${69.77}$$
docker_cws_instrumentation_amd64 $${-0}$$ $${7.07}$$ < $${7.12}$$ $${-0}$$ $${2.95}$$ < $${3.29}$$
docker_cws_instrumentation_arm64 $${-0}$$ $${6.69}$$ < $${6.92}$$ $${+0}$$ $${2.7}$$ < $${3.07}$$
docker_dogstatsd_amd64 $${-0.02}$$ $${39.22}$$ < $${39.57}$$ $${-0.01}$$ $${15.11}$$ < $${15.76}$$
docker_dogstatsd_arm64 $${-0.02}$$ $${37.86}$$ < $${38.2}$$ $${-0.01}$$ $${14.53}$$ < $${14.83}$$
dogstatsd_deb_amd64 $${+0}$$ $${30.45}$$ < $${31.4}$$ $${+0}$$ $${8.0}$$ < $${8.95}$$
dogstatsd_deb_arm64 $${+0}$$ $${29.02}$$ < $${29.97}$$ $${+0}$$ $${6.95}$$ < $${7.89}$$
dogstatsd_rpm_amd64 $${+0}$$ $${30.45}$$ < $${31.4}$$ $${+0}$$ $${8.02}$$ < $${8.96}$$
dogstatsd_suse_amd64 $${+0}$$ $${30.45}$$ < $${31.4}$$ $${+0}$$ $${8.02}$$ < $${8.96}$$
iot_agent_deb_amd64 $${+0.01}$$ $${53.88}$$ < $${54.55}$$ $${+0.01}$$ $${13.58}$$ < $${14.45}$$
iot_agent_deb_arm64 $${+0}$$ $${51.21}$$ < $${51.9}$$ $${+0}$$ $${11.75}$$ < $${12.63}$$
iot_agent_deb_armhf $${-0}$$ $${50.72}$$ < $${51.42}$$ $${+0.01}$$ $${11.86}$$ < $${12.74}$$
iot_agent_rpm_amd64 $${+0.01}$$ $${53.88}$$ < $${54.55}$$ $${+0}$$ $${13.59}$$ < $${14.47}$$
iot_agent_rpm_arm64 $${+0}$$ $${51.21}$$ < $${51.91}$$ $${+0}$$ $${11.77}$$ < $${12.65}$$
iot_agent_suse_amd64 $${+0.01}$$ $${53.88}$$ < $${54.55}$$ $${+0}$$ $${13.59}$$ < $${14.47}$$

@piochelepiotr
Copy link
Contributor

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Jul 24, 2025

View all feedbacks in Devflow UI.

2025-07-24 12:28:57 UTC ℹ️ Start processing command /merge


2025-07-24 12:29:28 UTC ❌ MergeQueue

You are not allowed to use the merge queue towards 7.69.x. User is not part of the authorized users or teams.
The authorized teams (including their child teams) are: agent-supply-chain.

@FlorentClarret FlorentClarret merged commit af0f019 into 7.69.x Jul 24, 2025
202 of 208 checks passed
@FlorentClarret FlorentClarret deleted the backport-39176-to-7.69.x branch July 24, 2025 13:03
@github-actions github-actions bot added this to the 7.69.0 milestone Jul 24, 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 medium review PR review might take time qa/rc-required Only for a PR that requires validation on the Release Candidate team/agent-log-pipelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants