oxidecomputer / oxidecomputer/opte
Want SDT probes for `gen_desc()`
@rzezeski is already working on this.
Since Feb 4, 2022.
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Description
It would be nice to have an SDT probe fire anytime a new action descriptor is generated (gen_desc()). This probe could either be generic to all actions or specific to each action.
-
Generic: Have each action descriptor implement
Displayand have a genericaction-desc-createdeven whose single argument is a string. -
Specific: Have each action create its own SDT probe, e.g. something like
snat-desc-created. Then create arepr(C)struct holding the important information of such a descriptor. The probe would then pass a pointer to said structure, allowing the consumer to inspect and format the information in any manner they desire.
Option 2 obviously gives more control, but it also means more code, and making sure that new actions add a probe. Perhaps we can enforce probe creation somehow via a trait? For example:
trait ActionDesc {
fn fire_create_probe(&self);
}
I lean towards option 2, if only for the fact that it can be extremely useful, when debugging, to be able to programmatically filter matches when using DTrace. Option 1 would require hacks like strstr() or post-processing with awk.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.