Skip to content

Commit

Permalink
feat(metrics): remove app metrics filtering from metrics collector
Browse files Browse the repository at this point in the history
  • Loading branch information
aboguszewski-sumo authored and swiatekm committed Sep 18, 2023
1 parent 3422d14 commit e1ac47d
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 1,849 deletions.
1 change: 1 addition & 0 deletions .changelog/3232.changed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat(metrics): move app metrics filtering to metadata layer
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ processors:
- IsMatch(name, "^(apiserver_request_duration_seconds|coredns_dns_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$")
{{- end }}

{{ if .Values.sumologic.metrics.enableDefaultFilters -}}
{{ tpl (.Files.Get "conf/metrics/collector/otelcol/default-filters.yaml") . | indent 2 }}
{{ end -}}

receivers:
prometheus:
config:
Expand Down Expand Up @@ -222,8 +218,5 @@ service:
{{- end }}
- filter/drop_unnecessary_metrics
- transform/drop_unnecessary_attributes
{{- if .Values.sumologic.metrics.enableDefaultFilters }}
- filter/app_metrics
{{- end }}
receivers: [prometheus]

This file was deleted.

4 changes: 4 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,10 @@ kube-prometheus-stack:
target_label: _sumo_forward_
replacement: "true"
action: replace
remoteWrite:
## infrastructure metrics
- url: http://$(METADATA_METRICS_SVC).$(NAMESPACE).svc.cluster.local.:9888/prometheus.metrics
remoteTimeout: 5s

serviceMonitor:
selfMonitor: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ data:
data_format = "prometheusremotewrite"
path_tag = true
paths = [
"/prometheus.metrics",
"/prometheus.metrics.custom",
"/prometheus.metrics.others"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,21 @@ data:
http:
endpoint: 0.0.0.0:4318
telegraf:
agent_config: "[agent]\n interval = \"30s\"\n flush_interval = \"30s\"\n omit_hostname
= true\n[[inputs.http_listener_v2]]\n # wait longer than prometheus\n read_timeout
= \"30s\"\n write_timeout = \"30s\"\n service_address = \":9888\"\n data_format
= \"prometheusremotewrite\"\n path_tag = true\n paths = [\n \n ]\n"
agent_config: |
[agent]
interval = "30s"
flush_interval = "30s"
omit_hostname = true
[[inputs.http_listener_v2]]
# wait longer than prometheus
read_timeout = "30s"
write_timeout = "30s"
service_address = ":9888"
data_format = "prometheusremotewrite"
path_tag = true
paths = [
"/prometheus.metrics"
]
service:
extensions:
- health_check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,21 @@ data:
http:
endpoint: 0.0.0.0:4318
telegraf:
agent_config: "[agent]\n interval = \"30s\"\n flush_interval = \"30s\"\n omit_hostname
= true\n[[inputs.http_listener_v2]]\n # wait longer than prometheus\n read_timeout
= \"30s\"\n write_timeout = \"30s\"\n service_address = \":9888\"\n data_format
= \"prometheusremotewrite\"\n path_tag = true\n paths = [\n \n ]\n"
agent_config: |
[agent]
interval = "30s"
flush_interval = "30s"
omit_hostname = true
[[inputs.http_listener_v2]]
# wait longer than prometheus
read_timeout = "30s"
write_timeout = "30s"
service_address = ":9888"
data_format = "prometheusremotewrite"
path_tag = true
paths = [
"/prometheus.metrics"
]
service:
extensions:
- health_check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,21 @@ data:
http:
endpoint: 0.0.0.0:4318
telegraf:
agent_config: "[agent]\n interval = \"30s\"\n flush_interval = \"30s\"\n omit_hostname
= true\n[[inputs.http_listener_v2]]\n # wait longer than prometheus\n read_timeout
= \"30s\"\n write_timeout = \"30s\"\n service_address = \":9888\"\n data_format
= \"prometheusremotewrite\"\n path_tag = true\n paths = [\n \n ]\n"
agent_config: |
[agent]
interval = "30s"
flush_interval = "30s"
omit_hostname = true
[[inputs.http_listener_v2]]
# wait longer than prometheus
read_timeout = "30s"
write_timeout = "30s"
service_address = ":9888"
data_format = "prometheusremotewrite"
path_tag = true
paths = [
"/prometheus.metrics"
]
service:
extensions:
- health_check
Expand Down

Large diffs are not rendered by default.

0 comments on commit e1ac47d

Please sign in to comment.