Skip to content

Add connect event tree node support in activity tree#53019

Draft
mftoure wants to merge 1 commit into
mainfrom
momar/connect-event-tree-node
Draft

Add connect event tree node support in activity tree#53019
mftoure wants to merge 1 commit into
mainfrom
momar/connect-event-tree-node

Conversation

@mftoure

@mftoure mftoure commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Connect events were listed in the V2 event types but had no case in insertEvent, silently falling through to the default no-op path. Add ConnectNode (mirroring BindNode), InsertConnectEvent on SocketNode and ProcessNode, and wire the ConnectEventType case in insertEvent.

Proto serialization support requires an agent-payload update and is left as a follow-up.

What does this PR do?

Motivation

Describe how you validated your changes

Additional Notes

Connect events were listed in the V2 event types but had no case in
insertEvent, silently falling through to the default no-op path. Add
ConnectNode (mirroring BindNode), InsertConnectEvent on SocketNode and
ProcessNode, and wire the ConnectEventType case in insertEvent.

Proto serialization support requires an agent-payload update and is left
as a follow-up.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

@codex review

@dd-octo-sts dd-octo-sts Bot added internal Identify a non-fork PR team/agent-security labels Jun 30, 2026
@github-actions github-actions Bot added the short review PR is simple enough to be reviewed quickly label Jun 30, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d8fbb03f4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Family string
GenerationType NodeGenerationType
Bind []*BindNode
Connect []*ConnectNode

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Serialize connect endpoints before storing them

Because V2 profiles enable connect by default, nodes appended to this new Connect slice are now learned in memory, but profile persistence still goes through activity_tree.ToProto: socketNodeToProto only initializes and emits Bind entries, and protoDecodeProtoSocket only reads GetBind(). In any local/remote persistence or restart path, learned connect endpoints are therefore dropped, so a profile that learned outbound connections will reload/upload as sockets with no connect activity and will keep reporting the same connects as new.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 1.64%
Overall Coverage: 51.29% (+0.10%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7d8fbb0 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Files inventory check summary

File checks results against ancestor cfc647c1:

Results for datadog-agent_7.82.0~devel.git.484.7d8fbb0.pipeline.121974823-1_amd64.deb:

No change detected

@dd-octo-sts

dd-octo-sts Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor cfc647c
📊 Static Quality Gates Dashboard
🔗 SQG Job

Successful checks

Info

Quality gate Change Size (prev → curr → max)
agent_deb_amd64 +4.74 KiB (0.00% increase, -0.04% of buffer) 747.641 → 747.645 → 758.200
agent_deb_amd64_fips +4.74 KiB (0.00% increase, -0.07% of buffer) 703.002 → 703.006 → 709.840
agent_rpm_amd64 +4.74 KiB (0.00% increase, -0.04% of buffer) 747.624 → 747.629 → 758.170
agent_rpm_amd64_fips +4.74 KiB (0.00% increase, -0.07% of buffer) 702.985 → 702.990 → 709.840
agent_rpm_arm64 +7.79 KiB (0.00% increase, -0.12% of buffer) 723.128 → 723.135 → 729.660
agent_rpm_arm64_fips +7.79 KiB (0.00% increase, -0.11% of buffer) 682.139 → 682.147 → 688.860
agent_suse_amd64 +4.74 KiB (0.00% increase, -0.04% of buffer) 747.624 → 747.629 → 758.170
agent_suse_amd64_fips +4.74 KiB (0.00% increase, -0.07% of buffer) 702.985 → 702.990 → 709.840
agent_suse_arm64 +7.79 KiB (0.00% increase, -0.12% of buffer) 723.128 → 723.135 → 729.660
agent_suse_arm64_fips +7.79 KiB (0.00% increase, -0.11% of buffer) 682.139 → 682.147 → 688.860
docker_agent_amd64 +4.73 KiB (0.00% increase, -0.06% of buffer) 806.458 → 806.463 → 813.790
docker_agent_arm64 +7.78 KiB (0.00% increase, -0.09% of buffer) 806.982 → 806.989 → 815.030
docker_agent_jmx_amd64 +4.74 KiB (0.00% increase, -0.06% of buffer) 997.355 → 997.360 → 1004.550
docker_agent_jmx_arm64 +7.79 KiB (0.00% increase, -0.09% of buffer) 986.532 → 986.539 → 994.710
19 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
agent_heroku_amd64 307.809 MiB
agent_msi 618.817 MiB
docker_cluster_agent_amd64 208.821 MiB
docker_cluster_agent_arm64 222.005 MiB
docker_cws_instrumentation_amd64 7.447 MiB
docker_cws_instrumentation_arm64 6.877 MiB
docker_dogstatsd_amd64 39.036 MiB
docker_dogstatsd_arm64 37.180 MiB
docker_host_profiler_amd64 305.309 MiB
docker_host_profiler_arm64 316.410 MiB
dogstatsd_deb_amd64 29.771 MiB
dogstatsd_deb_arm64 27.830 MiB
dogstatsd_rpm_amd64 29.771 MiB
dogstatsd_suse_amd64 29.771 MiB
iot_agent_deb_amd64 45.715 MiB
iot_agent_deb_arm64 42.434 MiB
iot_agent_deb_armhf 43.219 MiB
iot_agent_rpm_amd64 45.716 MiB
iot_agent_suse_amd64 45.714 MiB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/system-probe internal Identify a non-fork PR short review PR is simple enough to be reviewed quickly team/agent-security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant