Conversation
- Extract workload type and name from pod ownerReferences - Add as label (e.g. workload: "daemonset/cilium") - Works for both service-based and direct pod discovery - Helps identify the source workload type in metrics 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add get_workload_from_pod helper method - For ReplicaSets, follow chain to find parent Deployment - Shows "deployment/name" instead of "replicaset/name" in workload label - Other workload types (DaemonSet, StatefulSet, Job) remain unchanged 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add VectorConfigTest for all vector configuration methods - Add KubernetesDiscoveryTest for discovery functionality - Add BetterStackClientPingTest for ping workflow - Test workload ownership chain resolution - Fix broken tests after refactoring - Remove obsolete test methods 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- KubernetesDiscoveryIntegrationTest: Complex workload types, node filtering, deduplication - VectorConfigEdgeCasesTest: Malicious commands, symlinks, race conditions - BetterStackClientErrorHandlingTest: Network errors, partial failures, security - UtilsEdgeCasesTest: Invalid inputs, binary content, unicode handling Tests cover error scenarios, security concerns, and concurrent operations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
For context: We have upstream vector config coming from Better Stack. Problems this PR addresses that came up during development:
Under no circumstances the vector should crash because of broken upstream config, broken dynamic discovery configs, or some odd combination of both.
Any errors in Upstream config or the final combination of configs is sent to Better Stack UI via "ping". Kubernetes discovery:
|
kubernetes_discovery_*wildcard is used in vector config