Repository navigation
feat(apm): scope Kubernetes pod metrics to capture selections - #484
Merged
Merged
Conversation
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
Kubernetes application metrics now follow the same namespace and workload selection as Auto APM. Selecting a namespace includes its annotated Pods, including new Pods; selecting a workload includes only its owned Pods; clearing the selection stops application scrapes while kube-state-metrics continues.
prometheus.io/*Pod annotations. Enable discovery by default while preserving explicit opt-outs, and filter targets before scraping with the scope projected through the existing telemetry configuration and Secret.target_inforesource metadata, and keep raw Pod metrics available underongrid_source="k8s:app-metrics". Exclude that source from APM request and runtime queries so overlapping OBI/application measurements are not added together. This is a source-selection policy, not generic semantic deduplication.Validation
target_info: service/build metadata, platform labels, and thejob/instancejoin to application metrics survive scraping and remote_write. The test failed before the fix and passed afterward. Run it withONGRID_TEST_OTELCOL_BINARY; without that binary it is explicitly skipped.make proto, andgit diff --check.chat.ts,packetCaptures.ts,MessageBubble.tsx, andSkillRun.tsx). Browser screenshot review was left to the user as requested.go test -race -p 4 ./....Risk and rollback
list/watchdiscovery and a writable plugin directory, but no Secret API permission. It must remain a single replica until target sharding is implemented. Readiness does not guarantee every application target or exporter is healthy.kubernetesMetrics.appDiscovery.enabled=falseto stop this scraper, or revert these commits and roll back Manager/Edge/Chart together. Existing capture selections and stored metrics are retained.Author confirmation