Skip to content

Commit

Permalink
fix(metrics/collector): drop k8s labels
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm committed Jul 10, 2023
1 parent 45e96fb commit 33fae07
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
1 change: 1 addition & 0 deletions .changelog/3141.fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix(metrics/collector): drop k8s labels
14 changes: 9 additions & 5 deletions deploy/helm/sumologic/conf/metrics/collector/otelcol/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ processors:
transform/drop_unnecessary_attributes:
error_mode: ignore
metric_statements:
- context: datapoint
- context: resource
statements:
- delete_key(resource.attributes, "http.scheme")
- delete_key(resource.attributes, "net.host.name")
- delete_key(resource.attributes, "net.host.port")
- delete_key(resource.attributes, "service.instance.id")
- delete_key(attributes, "http.scheme")
- delete_key(attributes, "net.host.name")
- delete_key(attributes, "net.host.port")
- delete_key(attributes, "service.instance.id")
# prometheus receiver adds these automatically
# we drop them to make the rest of our pipeline easier to reason about
# after the collector and metadata are merged, consider using them instead of k8sattributes processor
- delete_matching_keys(attributes, "k8s.*")

filter/drop_unnecessary_metrics:
error_mode: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,16 @@ spec:
transform/drop_unnecessary_attributes:
error_mode: ignore
metric_statements:
- context: datapoint
- context: resource
statements:
- delete_key(resource.attributes, "http.scheme")
- delete_key(resource.attributes, "net.host.name")
- delete_key(resource.attributes, "net.host.port")
- delete_key(resource.attributes, "service.instance.id")
- delete_key(attributes, "http.scheme")
- delete_key(attributes, "net.host.name")
- delete_key(attributes, "net.host.port")
- delete_key(attributes, "service.instance.id")
# prometheus receiver adds these automatically
# we drop them to make the rest of our pipeline easier to reason about
# after the collector and metadata are merged, consider using them instead of k8sattributes processor
- delete_matching_keys(attributes, "k8s.*")
filter/drop_unnecessary_metrics:
error_mode: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,16 @@ spec:
transform/drop_unnecessary_attributes:
error_mode: ignore
metric_statements:
- context: datapoint
- context: resource
statements:
- delete_key(resource.attributes, "http.scheme")
- delete_key(resource.attributes, "net.host.name")
- delete_key(resource.attributes, "net.host.port")
- delete_key(resource.attributes, "service.instance.id")
- delete_key(attributes, "http.scheme")
- delete_key(attributes, "net.host.name")
- delete_key(attributes, "net.host.port")
- delete_key(attributes, "service.instance.id")
# prometheus receiver adds these automatically
# we drop them to make the rest of our pipeline easier to reason about
# after the collector and metadata are merged, consider using them instead of k8sattributes processor
- delete_matching_keys(attributes, "k8s.*")
filter/drop_unnecessary_metrics:
error_mode: ignore
Expand Down

0 comments on commit 33fae07

Please sign in to comment.