Every service here logs, emits metrics and reads config its own way. Design the crate they should all import, including what it costs on the hot path, and how you'd get them onto it.
- Some services have a microsecond budget on a critical thread
- No mandate: teams adopt it because it helps them
One safe line for the common case, a separate no-allocation form for the hot path, secrets that can't be logged, a measured budget, and migration cheap enough that people choose it.
- A one-line common case with defaults that are right
- A separate hot-path form: fixed records in a ring, formatted on another core
- Secrets can't be logged, by type
- Overhead is measured, with a budget in CI
- A migration path: a shim, a codemod, and adoption measured
- Semver and deprecation discipline once others depend on it
- API and defaults: A one-line safe default, with options behind it, and secrets that can't be logged.
- Hot path: A separate record-now, format-later path, with a measured budget.
- Adoption: Cheap migration, a shim or codemod, adoption measured, and a reason teams want it.
It's an adoption question as much as a Rust question. Candidates who only design the types miss that today "each of them does it its own way" for a reason: migrating costs them and helps someone else.
Designing a beautiful, configurable framework. The word that loses here is 'flexible'.