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

[USM] Introduce tail cals for the Postgres monitoring #30547

Merged
merged 16 commits into from
Nov 4, 2024

Conversation

amitslavin
Copy link
Contributor

@amitslavin amitslavin commented Oct 28, 2024

What does this PR do?

Introduce the use of tail calls when parsing Postgres messages in both plain text and TLS modes.

Motivation

Reduce the Postgres support interaction count and complexity limits to allow for additional logic, which is currently blocked due to reaching instruction and complexity limits.

Describe how to test/QA your changes

Possible Drawbacks / Trade-offs

Additional Notes

TODO:

  • Deploy to staging to validate accuracy

Results:

  • No accuracy or performance impact was observed
| Filename/Program                               |   Stack Usage |   Instructions Processed |   Instructions Processed limit |   Max States per Instruction |   Peak States |   Total States |
|------------------------------------------------|---------------|--------------------------|--------------------------------|------------------------------|---------------|----------------|
| usm/socket__postgres_handle                    |            -8 |                        0 |                              0 |                            0 |             0 |              0 |
| usm/socket__postgres_handle_response           |             0 |                     -182 |                              0 |                            0 |             3 |              3 |
| usm/socket__postgres_process_parse_message     |             0 |                        0 |                              0 |                            0 |             0 |              0 |
| usm/uprobe__postgres_tls_handle                |             0 |                      -11 |                              0 |                           -1 |             1 |              1 |
| usm/uprobe__postgres_tls_handle_response       |            -8 |                      190 |                              0 |                            0 |             2 |              2 |
| usm/uprobe__postgres_tls_process_parse_message |             0 |                        0 |                              0 |                            0 |             0 |              0 |
| usm/uprobe__postgres_tls_termination           |             0 |                        0 |                              0 |                            0 |             0 |              0 |

@amitslavin amitslavin added qa/done QA done before merge and regressions are covered by tests team/usm The USM team changelog/no-changelog labels Oct 28, 2024
@github-actions github-actions bot added the medium review PR review might take time label Oct 29, 2024
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Oct 29, 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=48129003 --os-family=ubuntu

Note: This applies to commit 3d8e492

Copy link

Regression Detector

pkg/network/ebpf/c/protocols/classification/defs.h Outdated Show resolved Hide resolved
pkg/network/ebpf/c/protocols/postgres/decoding.h Outdated Show resolved Hide resolved
pkg/network/ebpf/c/protocols/postgres/decoding.h Outdated Show resolved Hide resolved
pkg/network/ebpf/c/protocols/postgres/decoding.h Outdated Show resolved Hide resolved
@github-actions github-actions bot added long review PR is complex, plan time to review it and removed medium review PR review might take time labels Oct 30, 2024
@amitslavin amitslavin marked this pull request as ready for review November 3, 2024 09:02
@amitslavin amitslavin requested a review from a team as a code owner November 3, 2024 09:02
@amitslavin amitslavin changed the title [USMO] Introduce tail cals for the Postgres monitoring [USM] Introduce tail cals for the Postgres monitoring Nov 3, 2024
@amitslavin
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Nov 4, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 22m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit 43a09f3 into main Nov 4, 2024
292 checks passed
@dd-mergequeue dd-mergequeue bot deleted the amit.slavin/USMON-1208 branch November 4, 2024 13:13
@github-actions github-actions bot added this to the 7.61.0 milestone Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog component/system-probe long review PR is complex, plan time to review it qa/done QA done before merge and regressions are covered by tests team/usm The USM team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants