Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common-lib/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.4.3
- [Signal] fix: No longer aggregates histogram signals after histogram_quantile() as it is pointless aggregation. Aggregation before applying histogram_quantile() is kept and works as expected.

# 0.4.2
- [Panels] Add table rows styles in requests panels.

Expand Down
6 changes: 3 additions & 3 deletions common-lib/common/signal/test_histogram.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local m1 = signal.init(
},
testExpression: {
actual: raw.expr,
expect: 'avg by (job) (\n histogram_quantile(0.95, sum(rate(apiserver_request_duration_seconds_bucket{job="abc",job=~"$job",instance=~"$instance"}[10m])) by (le,job))\n)',
expect: 'histogram_quantile(0.95, sum(rate(apiserver_request_duration_seconds_bucket{job="abc",job=~"$job",instance=~"$instance"}[10m])) by (le,job))',
},
}),
},
Expand Down Expand Up @@ -92,11 +92,11 @@ local m1 = signal.init(
testResult: test.suite({
testDefaultQuantile: {
actual: customHistogram.asTarget().expr,
expect: 'avg by (job,handler) (\n histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job="abc",job=~"$job",instance=~"$instance"}[10m])) by (le,job,handler))\n)',
expect: 'histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job="abc",job=~"$job",instance=~"$instance"}[10m])) by (le,job,handler))',
},
testCustomQuantile: {
actual: customHistogram.withQuantile(quantile=0.50).asTarget().expr,
expect: 'avg by (job,handler) (\n histogram_quantile(0.50, sum(rate(http_request_duration_seconds_bucket{job="abc",job=~"$job",instance=~"$instance"}[10m])) by (le,job,handler))\n)',
expect: 'histogram_quantile(0.50, sum(rate(http_request_duration_seconds_bucket{job="abc",job=~"$job",instance=~"$instance"}[10m])) by (le,job,handler))',
},
}),
},
Expand Down
2 changes: 1 addition & 1 deletion common-lib/common/signal/utils.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// additional templates to wrap base expression
functionTemplates::
(
if aggLevel != 'none' && (type == 'counter' || type == 'gauge' || type == 'histogram' || type == 'info')
if aggLevel != 'none' && (type == 'counter' || type == 'gauge' || type == 'info')
then
[
['%(aggFunction)s by (%(agg)s) (', ')'],
Expand Down
Loading