chore: downgrade per-message log to trace#45
Merged
Conversation
d3560f0 to
8d4841a
Compare
Evalir
reviewed
Apr 17, 2026
7 tasks
prestwich
added a commit
that referenced
this pull request
Apr 22, 2026
…service_name` (#46) * refactor(routes): expose TracingInfo::request_span to crate * refactor: store TracingInfo in Arc on HandlerCtx HandlerCtx.tracing becomes Arc<TracingInfo> so the same tracing state can be shared with WriteItems without repeated cloning. HandlerCtx::new callers (axum and pubsub) now pass Arc<TracingInfo>. HandlerCtx::tracing_info, HandlerCtx::service_name, and HandlerArgs::service_name lose their `const` qualifier because Arc deref is not `const` on stable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * refactor(pubsub): carry Arc<TracingInfo> on WriteItem WriteItem, NotifyPermit, and OwnedNotifyPermit now carry Arc<TracingInfo> in place of tracing::Span. WriteTask::task_future reads the service label and request span off the shared TracingInfo, so the service_name field threaded through in #45 is no longer needed and has been removed from WriteTask. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix: make --no-default-features build clean Relocate WriteItem from src/pubsub/shared.rs (pubsub-gated) to src/routes/ctx.rs so it is visible without the pubsub feature, and gate the two notification methods that depend on tokio_stream (HandlerCtx::notify_stream, HandlerCtx::spawn_notify_stream) behind #[cfg(feature = "pubsub")]. The other notification APIs (notify, permit*) remain unconditional; without pubsub they are harmless no-ops. Additional #[cfg] gates to silence dead-code / unused-import lints exposed now that the lib actually compiles without features: - message_event! macro + record_message_size + message_size behind any(axum, pubsub) - metrics::{histogram, Histogram} imports behind any(axum, pubsub) - HandlerCtx::new gets allow(dead_code) when both axum and pubsub are off (nothing can construct a HandlerCtx) - WriteItem struct gets allow(dead_code) without pubsub (no reader) Replace two intra-doc links whose targets are feature-gated (pubsub::AxumWsCfg, pubsub::ajj_websocket in lib.rs; axum in handler.rs) with inline code so rustdoc --no-default-features no longer fails link resolution. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes ENG-2158. The
ajj::axumrpc.messageevent was emitted atinfo!for every inbound and outbound message, producing ~1.69M info logs/hr on signet-sidecar mainnet. Every entry was the same shape: an id,RECEIVED/SENT, and an uncompressed byte size.This PR:
message_event!frominfo!totrace!. Per-message events are high-frequency and belong behindtrace, notdebug(anyone enablingdebugonajjfor unrelated diagnostics would otherwise be flooded). OTel semantic conventions describe the span-event, they don't mandate a log level.ajj.router.message_size_byteshistogram so operators don't lose size visibility. Labels:service,direction(RECEIVED/SENT), matching the existingajj.router.*metric family which already tags byservice.servicethrough themessage_event!macro.RouteTaskalready hadrouterin scope;WriteTaskgained aservice_name: &'static strfield populated from the router atConnectionManager::make_tasks.Versioning
0.7.0 -> 0.7.1 (patch). No API changes. The log-level demotion is a behaviour change but not a breaking interface change, and the histogram is additive.