Skip to content

Commit

Permalink
Merge pull request #851 from solarwinds/remove-temporary-labels
Browse files Browse the repository at this point in the history
Remove temporary labels
  • Loading branch information
turytsia authored Jan 6, 2025
2 parents 5aec6ba + f5329b2 commit 6c8b440
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deploy/helm/events-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ processors:
- delete_key(resource.attributes, "k8s.job.name") where resource.attributes["sw.k8s.job.found"] == "false"
- delete_key(resource.attributes, "k8s.cronjob.name") where resource.attributes["sw.k8s.cronjob.found"] == "false"
- delete_key(resource.attributes, "k8s.node.name") where resource.attributes["sw.k8s.node.found"] == "false"
- delete_key(resource.attributes, "k8s.persistentvolume.name") where resource.attributes["sw.k8s.persistentvolume.found"] == "false"
- delete_key(resource.attributes, "k8s.persistentvolumeclaim.name") where resource.attributes["sw.k8s.persistentvolumeclaim.found"] == "false"
- delete_key(resource.attributes, "k8s.service.name") where resource.attributes["sw.k8s.service.found"] == "false"
- delete_key(resource.attributes, "sw.k8s.pod.found")
- delete_key(resource.attributes, "sw.k8s.deployment.found")
- delete_key(resource.attributes, "sw.k8s.statefulset.found")
Expand All @@ -108,6 +111,9 @@ processors:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")

transform/stringify_body:
error_mode: ignore
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/metrics-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,9 @@ processors:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")

attributes/remove_prometheus_attributes_endpoint:
exclude:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ Custom events filter with new syntax:
== "false"
- delete_key(resource.attributes, "k8s.node.name") where resource.attributes["sw.k8s.node.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolume.name") where resource.attributes["sw.k8s.persistentvolume.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolumeclaim.name") where resource.attributes["sw.k8s.persistentvolumeclaim.found"]
== "false"
- delete_key(resource.attributes, "k8s.service.name") where resource.attributes["sw.k8s.service.found"]
== "false"
- delete_key(resource.attributes, "sw.k8s.pod.found")
- delete_key(resource.attributes, "sw.k8s.deployment.found")
- delete_key(resource.attributes, "sw.k8s.statefulset.found")
Expand All @@ -249,6 +255,9 @@ Custom events filter with new syntax:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/entity_attributes:
log_statements:
- context: log
Expand Down Expand Up @@ -821,6 +830,12 @@ Custom events filter with old syntax:
== "false"
- delete_key(resource.attributes, "k8s.node.name") where resource.attributes["sw.k8s.node.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolume.name") where resource.attributes["sw.k8s.persistentvolume.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolumeclaim.name") where resource.attributes["sw.k8s.persistentvolumeclaim.found"]
== "false"
- delete_key(resource.attributes, "k8s.service.name") where resource.attributes["sw.k8s.service.found"]
== "false"
- delete_key(resource.attributes, "sw.k8s.pod.found")
- delete_key(resource.attributes, "sw.k8s.deployment.found")
- delete_key(resource.attributes, "sw.k8s.statefulset.found")
Expand All @@ -829,6 +844,9 @@ Custom events filter with old syntax:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/entity_attributes:
log_statements:
- context: log
Expand Down Expand Up @@ -1394,6 +1412,12 @@ Events config should match snapshot when using default values:
== "false"
- delete_key(resource.attributes, "k8s.node.name") where resource.attributes["sw.k8s.node.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolume.name") where resource.attributes["sw.k8s.persistentvolume.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolumeclaim.name") where resource.attributes["sw.k8s.persistentvolumeclaim.found"]
== "false"
- delete_key(resource.attributes, "k8s.service.name") where resource.attributes["sw.k8s.service.found"]
== "false"
- delete_key(resource.attributes, "sw.k8s.pod.found")
- delete_key(resource.attributes, "sw.k8s.deployment.found")
- delete_key(resource.attributes, "sw.k8s.statefulset.found")
Expand All @@ -1402,6 +1426,9 @@ Events config should match snapshot when using default values:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/entity_attributes:
log_statements:
- context: log
Expand Down Expand Up @@ -1966,6 +1993,12 @@ Events config should not contain manifest collection pipeline when disabled:
== "false"
- delete_key(resource.attributes, "k8s.node.name") where resource.attributes["sw.k8s.node.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolume.name") where resource.attributes["sw.k8s.persistentvolume.found"]
== "false"
- delete_key(resource.attributes, "k8s.persistentvolumeclaim.name") where resource.attributes["sw.k8s.persistentvolumeclaim.found"]
== "false"
- delete_key(resource.attributes, "k8s.service.name") where resource.attributes["sw.k8s.service.found"]
== "false"
- delete_key(resource.attributes, "sw.k8s.pod.found")
- delete_key(resource.attributes, "sw.k8s.deployment.found")
- delete_key(resource.attributes, "sw.k8s.statefulset.found")
Expand All @@ -1974,6 +2007,9 @@ Events config should not contain manifest collection pipeline when disabled:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/entity_attributes:
log_statements:
- context: log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,9 @@ Metrics config should match snapshot when using default values:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/scope:
metric_statements:
- context: scope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,9 @@ Metrics config should match snapshot when fargate is enabled:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/scope:
metric_statements:
- context: scope
Expand Down Expand Up @@ -3445,6 +3448,9 @@ Metrics config should match snapshot when using Prometheus url with extra_scrape
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/scope:
metric_statements:
- context: scope
Expand Down Expand Up @@ -5243,6 +5249,9 @@ Metrics config should match snapshot when using default values:
- delete_key(resource.attributes, "sw.k8s.job.found")
- delete_key(resource.attributes, "sw.k8s.cronjob.found")
- delete_key(resource.attributes, "sw.k8s.node.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolume.found")
- delete_key(resource.attributes, "sw.k8s.persistentvolumeclaim.found")
- delete_key(resource.attributes, "sw.k8s.service.found")
transform/scope:
metric_statements:
- context: scope
Expand Down

0 comments on commit 6c8b440

Please sign in to comment.