Skip to content

refactor(core): simplify telemetry setup and harden runtime log control#1

Merged
mattwend merged 3 commits intov0.x.xfrom
fix/regression_tests
Apr 25, 2026
Merged

refactor(core): simplify telemetry setup and harden runtime log control#1
mattwend merged 3 commits intov0.x.xfrom
fix/regression_tests

Conversation

@mattwend
Copy link
Copy Markdown
Owner

Summary

  • Simplify subscriber construction, decouple Tokio metrics from OTLP wiring, and tighten OTLP
    configuration validation.
  • Make TelemetryGuard shutdown idempotent with best-effort drop teardown.
  • Wrap installed OTLP filters in live reload layers so runtime filter updates take effect
    immediately.
  • Serialize mutable filter state behind a single mutex to eliminate an inverted lock-ordering
    deadlock between stdout and OTLP updates.
  • Update README and crate-level docs to reflect the new shutdown semantics, configurable
    Tokio metrics, and rt-multi-thread requirement.

Why

  • Previous control-plane updates could target orphaned filter state and the router had a
    latent deadlock path; both are now covered by regression tests.
  • Production setup is leaner, shutdown is more reliable on both current-thread and
    multi-thread runtimes, and users have clear guidance on supported configuration paths.

Tests

  • New integration coverage: init_otlp.rs, init_otlp_idempotent.rs, init_otlp_log_control.rs,
    plus expanded init_log_control.rs and readme_common_config.rs for lifecycle and README-style
    configs.

Simplify subscriber construction, decouple Tokio metrics from OTLP-specific wiring, harden OTLP configuration validation, and make TelemetryGuard shutdown idempotent.

This keeps production setup leaner, improves shutdown reliability, and adds integration coverage for lifecycle and README-style configuration paths.
Wrap installed OTLP filters in live reload layers, serialize mutable filter state with a single mutex, and avoid inverted lock ordering between stdout and OTLP updates.

This prevents successful control-plane updates from targeting orphaned state, removes a router deadlock path, and strengthens regression coverage for runtime filter behavior.
Update the README and crate-level docs to reflect idempotent shutdown, best-effort drop teardown, configurable Tokio metrics, and the Tokio rt-multi-thread requirement.

Keeping the durable docs aligned with runtime behavior helps users choose explicit shutdown on current-thread runtimes and understand the supported configuration paths.
@mattwend mattwend self-assigned this Apr 25, 2026
@mattwend mattwend merged commit 6810df9 into v0.x.x Apr 25, 2026
5 checks passed
@mattwend mattwend deleted the fix/regression_tests branch April 25, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant