Skip to content

Commit 572578a

Browse files
authored
Merge pull request #470 from nblumhardt/exponential-examples
Add a query example for exponentially bucketed histograms
2 parents f5c4611 + d1cc303 commit 572578a

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

  • src/SeqCli/Skills/Resources/working-with-seq-metrics

src/SeqCli/Skills/Resources/working-with-seq-metrics/SKILL.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ HTTP request timing percentiles:
9696
select
9797
phist(coalesce((bucket.from + bucket.to) / 2, bucket.from, bucket.to), bucket.count, 95) as p95,
9898
phist(coalesce((bucket.from + bucket.to) / 2, bucket.from, bucket.to), bucket.count, 99) as p99
99-
from series lateral unnest(http.server.request.duration.buckets) as bucket
99+
from series
100+
lateral unnest(http.server.request.duration.buckets) as bucket
100101
where Has(http.server.request.duration.buckets)
101102
and @Resource.service.name = 'cart'
102103
and @Scope.name = 'Microsoft.AspNetCore.Hosting'
@@ -131,6 +132,22 @@ group by time(1m)
131132
limit 100
132133
```
133134

135+
### `Exponential` Query Examples
136+
137+
Commit timing percentiles:
138+
139+
```
140+
select
141+
phist(bucket.midpoint, bucket.count, 95) as p95,
142+
phist(bucket.midpoint, bucket.count, 99) as p99
143+
from series
144+
lateral unnest(commit_duration.buckets) as bucket
145+
where Has(commit_duration.buckets)
146+
and @Timestamp >= now() - 15m
147+
group by time(1m)
148+
limit 100
149+
```
150+
134151
## Gotchas
135152

136153
- If metrics that should be _counters_ show up as _gauges_, aggregation temporality is likely to be misconfigured: danger! This can produce wildly inaccurate results if not detected.

0 commit comments

Comments
 (0)