(DynamicSelector) fixups for dynamic resource attributes#2498
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2498 +/- ##
==========================================
- Coverage 69.08% 69.05% -0.04%
==========================================
Files 345 345
Lines 46728 46746 +18
==========================================
- Hits 32284 32281 -3
- Misses 12414 12418 +4
- Partials 2030 2047 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
grcevski
left a comment
There was a problem hiding this comment.
LGTM! Thanks for fixing the copilot comments from the previous PR. I've launched it again here.
There was a problem hiding this comment.
Pull request overview
This PR applies follow-up fixes to the DynamicSelector-based flow/metadata decoration pipeline, focusing on safer event delivery, clearer lifecycle expectations for kube-store PID registration, and tightening which dynamic attributes are applied to flow (network/stats) metrics.
Changes:
- Switch process event publication to deadlock-safe
SendCtx()for dynamic selector file-info updates. - Remove arbitrary dynamic resource attributes from flow metric decoration (retain service name/namespace only).
- Add PID cleanup for DynamicFlowAttrs to avoid leaking kube-store process registrations, plus new/updated tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/selection/dynamic_flow_attrs.go | Removes flow-level resource attribute decoration and adds PID tracking/cleanup for kube-store process registrations. |
| pkg/selection/dynamic_flow_attrs_test.go | Updates assertions for removed resource attrs and adds coverage for PID unregister behavior. |
| pkg/selection/dynamic_app_ips.go | Clarifies ResolveContainerIPs() side effect (PID registration) and cleanup responsibility. |
| pkg/internal/appolly/appolly.go | Uses deadlock-safe SendCtx(ctx, ...) when emitting process events from dynamic selector updates. |
| pkg/instrumenter/opts.go | Updates documentation comment to reflect flow decoration limited to service name/namespace. |
Summary
Some fixups from #2458 (review) (I was a little quick on the merge):
SendCtx()instead ofSend()Validation