oxidecomputer / oxidecomputer/omicron

`kstat`-based metrics could produce missing samples

Open
#4,863 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Metrics
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Some of our metric data is currently based on kernel statistics, or kstats. The heavy lifting is done in the KstatSampler, which lets us register any oximeter::Target that can produce samples by reading kstats. Several parts of the setup for these targets are fallible, mostly bubbling up any failures of the kstat(3KSTAT) library calls. In that case, we currently log the failure and continue, but do not produce any data. We should rework either the KstatSampler or the higher-level sled-agent MetricsManager containing it to produce missing samples rather than nothing at all.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read oximeter/instruments/src/kstat/sampler.rs around KstatSampler, then inspect sled-agent/src/metrics.rs and sled-agent/src/sled_agent.rs around MetricsManager setup and failure logging. Determine where the fallible kstat setup should be handled; done means failed setup produces missing samples instead of no data.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.