fix(relay): address PR review issues for MM-137 OTel baseline
Critical:
- Move #[tracing::instrument] to after doc comment blocks in db/mod.rs
(was splitting /// paragraphs, breaking rustdoc)
- Add skip(url) to open_pool's instrument attribute to avoid recording
the database URL as a span field
Important:
- Replace eprintln! in OtelGuard::drop with tracing::error! — the
subscriber is still live at drop time, so structured logging is correct
- Add tracing::debug! in HeaderMapCarrier::get for non-UTF-8 header
values instead of silently discarding them
- Add comment at _otel_guard binding explaining the naming requirement:
bare _ drops immediately, which would shut down the exporter early
- Add otlp_endpoint validation in validate_and_build: must be non-empty
and start with http:// or https://
- Add unit tests for HeaderMapCarrier (get, absent, case-insensitive,
keys) including the non-UTF-8 silent-drop behaviour being intentional
Suggestions:
- Add eprintln warning when RUST_LOG is invalid (subscriber not up yet)
- Update apply_env_overrides doc to mention OTEL_SERVICE_NAME
- Update validate_and_build doc to include invite_code_required default
and telemetry validation rules
authored by
malpercio.dev
and committed by