Skip to content
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

[wip][do not merge] macos poc for cws #21156

Closed
wants to merge 1 commit into from
Closed

Conversation

paulcacheux
Copy link
Contributor

@paulcacheux paulcacheux commented Nov 28, 2023

What does this PR do?

This PR implements a new version of CWS in addition to the current linux-ebpf, linux-ebpfless and windows one, this time for macOS.

The main data source for macOS events is the Apple Endpoint Security framework. While some APIs are available to directly fetch and filter events, this POC is based on receiving events from eslogger allowing to completely skip binary signing and apple agreement processes for now.

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 3 times, most recently from 9dfdc8a to e5f0ea2 Compare December 4, 2023 09:03
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 5 times, most recently from 33759ec to b1fc86f Compare December 11, 2023 17:29
@pr-commenter
Copy link

pr-commenter bot commented Dec 12, 2023

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: ab17318b-18ee-4c25-afd6-3bfa5fa12fc1
Baseline: d55591b
Comparison: c9a722a

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

No significant changes in experiment optimization goals

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

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

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

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization -0.03 [-6.62, +6.56]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
otel_to_otel_logs ingress throughput +2.17 [+1.50, +2.83]
file_tree memory utilization +0.88 [+0.78, +0.97]
process_agent_standard_check_with_stats memory utilization +0.60 [+0.57, +0.64]
tcp_syslog_to_blackhole ingress throughput +0.41 [+0.35, +0.47]
process_agent_real_time_mode memory utilization +0.11 [+0.08, +0.15]
idle memory utilization +0.04 [-0.01, +0.08]
trace_agent_msgpack ingress throughput +0.03 [+0.02, +0.04]
uds_dogstatsd_to_api ingress throughput -0.00 [-0.00, +0.00]
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.00, +0.00]
file_to_blackhole % cpu utilization -0.03 [-6.62, +6.56]
trace_agent_json ingress throughput -0.03 [-0.07, +0.01]
process_agent_standard_check memory utilization -0.43 [-0.47, -0.39]
uds_dogstatsd_to_api_cpu % cpu utilization -0.76 [-2.21, +0.69]
basic_py_check % cpu utilization -2.17 [-4.46, +0.12]
pycheck_1000_100byte_tags % cpu utilization -2.26 [-7.44, +2.92]

Explanation

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".

@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 3 times, most recently from 446c982 to a44921b Compare December 13, 2023 14:21
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from a44921b to 630b6e5 Compare December 19, 2023 13:59
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from 630b6e5 to 1d77ce2 Compare January 22, 2024 13:08
@paulcacheux paulcacheux added this to the Triage milestone Jan 22, 2024
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 3 times, most recently from ddee7be to 21c2992 Compare February 12, 2024 12:37
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 3 times, most recently from f47a5ef to 45f3e65 Compare February 16, 2024 13:28
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 3 times, most recently from a1a287b to ede1bf7 Compare March 4, 2024 16:46
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from ede1bf7 to 8f90cd5 Compare March 6, 2024 10:27
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 2 times, most recently from e523bf5 to c9a722a Compare March 11, 2024 21:19
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from c9a722a to 8b031c7 Compare March 17, 2024 17:56
@pr-commenter
Copy link

pr-commenter bot commented Mar 17, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=39289382 --os-family=ubuntu

Note: This applies to commit 571922a

@pr-commenter
Copy link

pr-commenter bot commented Mar 17, 2024

Regression Detector

Regression Detector Results

Run ID: ce15f41e-df9f-4f60-99cd-ea37f7a17e74 Metrics dashboard Target profiles

Baseline: 950a2ba
Comparison: 571922a

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

No significant changes in experiment optimization goals

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

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
tcp_syslog_to_blackhole ingress throughput +4.18 [-8.74, +17.11] Logs
otel_to_otel_logs ingress throughput +0.07 [-0.74, +0.88] Logs
idle memory utilization +0.03 [-0.02, +0.07] Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.01, +0.01] Logs
uds_dogstatsd_to_api ingress throughput -0.00 [-0.00, +0.00] Logs
basic_py_check % cpu utilization -0.21 [-2.80, +2.38] Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.35 [-1.25, +0.54] Logs
pycheck_1000_100byte_tags % cpu utilization -0.80 [-5.58, +3.98] Logs
file_tree memory utilization -2.90 [-3.00, -2.80] Logs

Explanation

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".

@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from 8b031c7 to ef03db8 Compare March 21, 2024 10:59
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from ef03db8 to 20107ae Compare April 1, 2024 10:20
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 2 times, most recently from fe5cf7e to 573cc38 Compare April 18, 2024 11:54
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 2 times, most recently from e72d019 to a5784bb Compare June 3, 2024 10:14
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from a5784bb to 24b2061 Compare June 19, 2024 09:52
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch 2 times, most recently from ce8c55c to d8a2ef3 Compare July 2, 2024 10:37
@paulcacheux paulcacheux force-pushed the paulcacheux/cws-macos branch from d8a2ef3 to 571922a Compare July 16, 2024 15:24
@paulcacheux paulcacheux closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant