Skip to content
Merged
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
19 changes: 18 additions & 1 deletion src/SeqCli/Skills/Resources/working-with-seq-metrics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ HTTP request timing percentiles:
select
phist(coalesce((bucket.from + bucket.to) / 2, bucket.from, bucket.to), bucket.count, 95) as p95,
phist(coalesce((bucket.from + bucket.to) / 2, bucket.from, bucket.to), bucket.count, 99) as p99
from series lateral unnest(http.server.request.duration.buckets) as bucket
from series
lateral unnest(http.server.request.duration.buckets) as bucket
where Has(http.server.request.duration.buckets)
and @Resource.service.name = 'cart'
and @Scope.name = 'Microsoft.AspNetCore.Hosting'
Expand Down Expand Up @@ -131,6 +132,22 @@ group by time(1m)
limit 100
```

### `Exponential` Query Examples

Commit timing percentiles:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also make this HTTP request timing percentiles?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought it might be better not to pull things too strongly towards that scenario; guess mileage will vary 🤔


```
select
phist(bucket.midpoint, bucket.count, 95) as p95,
phist(bucket.midpoint, bucket.count, 99) as p99
from series
lateral unnest(commit_duration.buckets) as bucket
where Has(commit_duration.buckets)
and @Timestamp >= now() - 15m
group by time(1m)
limit 100
```

## Gotchas

- 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.
Expand Down
Loading