feat(agent): wire podtrace policy, filters, sample, thresholds end-to-end#142
Merged
Conversation
This was referenced May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
End-to-end wiring of PodTrace/PodTraceSession policy fields from CR spec through the bundle ConfigMap into agent runtime behaviour and surfaced status. Three concrete fixes:
samplePercentis now respected: Previously the field on PodTrace was read by no controller, onlyExporterConfig.spec.samplePercentreached the bundle. The operator now computesmin(CR, ExporterConfig)(treating unset as 100%) and writes the resolved value to the bundle. Documented as the "minimum applies" contract.thresholdsnow do something: Previously they were spec-only with no runtime consumer outside the standalone diagnose CLI. The agent's SDK exporter now evaluates fs-slow / rtt-spike / error-rate per event (stateless, no rolling window), stampspodtrace.threshold:*span attributes, and bumps a new per-CR Prometheus counter.filtersround-trip is observable: Filters are now mirrored on the bundle and echoed instatus.policy.filtersso users can verify what the agent will actually apply without scraping ConfigMaps.What's new
status.policyon PodTrace + PodTraceSession witheffectiveSampleRate,filters,thresholds,generation,hash.PolicyAppliedcondition.status.nodeStatus[].policyHash— compare againststatus.policy.hashto verify bundle propagation reached every node.podtrace_agent_effective_sample_rate{cr_namespace,cr_name}podtrace_agent_policy_generation{cr_namespace,cr_name}podtrace_agent_threshold_tripped_total{cr_namespace,cr_name,threshold}