mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
**Description:**
This PR allows filtering out metrics based on resource attributes. For
example:
```
resource_attributes:
k8s.pod.name:
enabled: true
exclude:
#- strict: "kube-apiserver-kind-control-plane"
- regexp: "kube-.*"
- regexp: "coredns-.*"
- strict: "coredns"
- strict: "kindnet-mpb2p"
```
Would remove metrics that match regex or strict rules on resource
attributes.
**Link to tracking Issue:**
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/25134
**Testing:**
- Tested with k8scluster receiver in kind cluster.
- unit tests added
**Documentation:** <Describe the documentation added.>
---------
Co-authored-by: Dmitrii Anoshin <[email protected]>
9 lines
283 B
YAML
9 lines
283 B
YAML
# Yaml form of the configuration for Filters
|
|
# This configuration can be embedded into other component's yamls
|
|
# The top level here are just test names and do not represent part of the actual configuration.
|
|
|
|
regexp/default:
|
|
- regexp: "one|two"
|
|
strict/default:
|
|
- strict: "strict"
|