oxidecomputer / oxidecomputer/omicron

Want D script to format `slog` output

Open
#7,538 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We use slod-dtrace to fire DTrace USDT probes at every log message, even those which are compiled into the binary but filtered by the level-filter. This is really useful, but the formatting of these messages is a bit funky. To send them to DTrace, we JSON-serialize them, which requires handling the possibility that that can fail. So you get messages in DTrace that are like {"ok": {<actual JSON>} or {"err": "some error message"}.

We should write a D script that will handle these serialization details for us, and print out the actual messages. Ideally, that would go into the Bunyan format that we use everywhere else, so we can pipe the output to tools like looker. We should also be sure to ship these in the software images we build. These probes have very rarely changed, so putting the script in the GZ seems fine for now.

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 with the slod-dtrace USDT probe output and its JSON serialization shape, then inspect how software images and the GZ are built. Done means a D script prints the actual messages in the existing Bunyan format and is shipped in the software images.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.