Skip to content

Commit

Permalink
chore: remove _bucket metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed Aug 1, 2024
1 parent cd571e7 commit f3f89b4
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 22 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ filter/drop_unnecessary_metrics:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
{{- if .Values.sumologic.metrics.dropHistogramBuckets }}
# drop histograms we've extracted sums and counts from, but don't want the full thing
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
{{- end }}

# Prometheus receiver puts all labels in record-level attributes, and we need them in resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ data:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM
or type == METRIC_DATA_TYPE_SUMMARY
or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
groupbyattrs:
keys:
- container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ data:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM
or type == METRIC_DATA_TYPE_SUMMARY
or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
groupbyattrs:
keys:
- container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ data:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM
or type == METRIC_DATA_TYPE_SUMMARY
or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
groupbyattrs:
keys:
- container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ data:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM
or type == METRIC_DATA_TYPE_SUMMARY
or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
groupbyattrs:
keys:
- container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ data:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM
or type == METRIC_DATA_TYPE_SUMMARY
or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
groupbyattrs:
keys:
- container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ data:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM
or type == METRIC_DATA_TYPE_SUMMARY
or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
groupbyattrs:
keys:
- container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ data:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM
or type == METRIC_DATA_TYPE_SUMMARY
or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")
groupbyattrs:
keys:
- container
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/helm_prometheus_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func Test_Helm_Prometheus_Metrics(t *testing.T) {
// defaults without otel metrics collector metrics, but with Prometheus metrics
expectedMetricsGroups := make([][]string, len(internal.DefaultExpectedMetricsGroups))
copy(expectedMetricsGroups, internal.DefaultExpectedMetricsGroups)
expectedMetricsGroups = append(expectedMetricsGroups, internal.PrometheusMetrics, internal.DefaultOtelcolMetrics, internal.BucketMetrics)
expectedMetricsGroups = append(expectedMetricsGroups, internal.PrometheusMetrics, internal.DefaultOtelcolMetrics)
for _, metrics := range expectedMetricsGroups {
expectedMetrics = append(expectedMetrics, metrics...)
}
Expand Down
13 changes: 0 additions & 13 deletions tests/integration/internal/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,19 +354,6 @@ var (
"scrape_duration_seconds",
}

// Bucket metrics are completely removed in OTC, but there may be still available in Prometheus
BucketMetrics = []string{
"etcd_disk_wal_fsync_duration_seconds_bucket",
"scheduler_scheduling_attempt_duration_seconds_bucket",
"scheduler_scheduling_algorithm_duration_seconds_bucket",
"otelcol_processor_groupbyattrs_metric_groups_bucket",
"prometheus_remote_storage_sent_batch_duration_seconds_bucket",
"otelcol_processor_batch_batch_send_size_bucket",
"etcd_disk_backend_commit_duration_seconds_bucket",
"coredns_proxy_request_duration_seconds_bucket",
"scheduler_framework_extension_point_duration_seconds_bucket",
}

// Some metrics might change over k8s versions
versionDependentMetrics = map[*version.Version](struct {
before []string
Expand Down

0 comments on commit f3f89b4

Please sign in to comment.