oxidecomputer / oxidecomputer/omicron

Want sled identifiers on most (all?) timeseries

Open
#5,267 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Most timeseries today do not include information about the sled from which they're derived. They should! The physical data link stats are one example. They include the sled's UUID and serial right now. But serial numbers are only unique within a part number, and so we'd probably want to add the part and revision to these as well.

Note that this is probably not restricted just to physical or host-specific timeseries. For example, it would be very useful to understand Crucible virtual disk write statistics broken down by the host sled. Ditto for vCPU data, or VNIC usage (both guest and host).

Implementation note

The oximeter derive-macros for implementing Target and Metric could benefit from a bit more care. I've experimented previously with adding units through attributes, for example. One improvement that could help implement this current issue is something like #[serde(flatten)] or #[diesel(embed)], i.e., a way to include some other struct and its fields in this one. We could then make a set of consistent, widely-used targets in a place like oximeter-instruments, for including common fields. So something like:

/// Shared identifiers for a sled
struct Sled {
    part: String,
    revision: String,
    serial: String,
    id: Uuid,
}

#[derive(oximeter::Target)]
struct SomeTarget {
    #[oximeter(embed)]
    sled: Sled,
}

One option here, though it's a bit magical, might be to prefix the field names of the embedded struct with the field name in the containing struct. So the fields for SomeTarget would be "sled_part", "sled_revision", etc.

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

Start by reading the oximeter derive-macros for Target and Metric, then inspect existing physical data link stats and shared-target work in oximeter-instruments. Determine how embedded Sled fields would be represented and which timeseries need sled identifiers. Done means the relevant timeseries consistently expose sled part, revision, serial, and UUID without breaking existing metric definitions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.