Software Consulting & Engineering Requirements to Production

Compile-time telemetry field validation

2025-2026

← Back to portfolio

  • Open source
  • Rust
  • Observability

Implemented Rust procedural macros to validate telemetry field names at compile time. Inconsistent names split related diagnostic data across different keys, making cross-component searches harder. Wrappers around tracing instrumentation and event macros checked field keys against a shared allowlist and suggested alternatives for unrecognized names.

The implementation also added component-target shorthand and an option for reporting complete error chains and OpenTelemetry error status. Compiler pass/fail tests covered accepted syntax, unknown fields, and invalid option combinations. The validation constrained field names; field values and telemetry cardinality remained separate concerns.

Proposed the implementation in Miden node #1500 and its successor #1835.