Repository navigation
refactor(web): let hosts own metrics and tracing - #859
Merged
Merged
Conversation
mnoah1
added this pull request to stack #847
October 14, 2026 15:50
mnoah1
force-pushed
the
mnoah1/web-host-instrumentation
branch
2 times, most recently
from
October 14, 2026 16:49
9b299f2 to
7714187
Compare
mnoah1
force-pushed
the
mnoah1/web-host-instrumentation
branch
from
October 14, 2026 17:07
600bc4d to
52602ff
Compare
mnoah1
marked this pull request as ready for review
October 14, 2026 17:36
mnoah1
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
October 14, 2026 17:36
prathshenoy
approved these changes
Oct 14, 2026
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.
Why
The reusable SubmitQueue and Stovepipe UI packages currently depend on OpenTelemetry and accept OTel meters and tracers. That couples both metrics and tracing to one telemetry stack.
A host using native M3 counters and histograms should not need an adapter to OTel's Meter API just to reuse the UI. The same applies to a host with another tracing stack. Let each host use its native metrics and tracing APIs without forcing either a meter adapter or a tracer bridge.
How it works
The reusable packages keep routing, authorization decisions, queue and request loading, page models, React UI, and request-scoped logging. They no longer import OTel or accept tracing and metrics options.
Hosts instrument the boundaries they own:
web.handle()call to record page-load metrics, outcomes, and spans.The reference hosts use native OTel APIs. An M3-backed host can emit the same measurements through native counters and histograms; no OTel-to-M3 bridge is required. Stovepipe's page-load measurements are:
stovepipe.web.page_loads: a counter tagged by outcome.stovepipe.web.page_load_duration: a duration histogram in milliseconds, tagged by outcome.Metric names and units are retained, while bucket configuration, providers, and exporters belong to the host. There is no replacement meter or tracer interface and no generic instrumentation callback in the reusable packages.
For Stovepipe, handled section failures get
outcome=erroreven when the library returns a rendered page; unexpected exceptions getoutcome=exception. Metric or trace delivery failures do not repeat reads or replace their results or errors.Tradeoff
Host-boundary instrumentation measures whole page loads and injected calls, not arbitrary private-library steps. A host can wrap an injected dependency to add metrics or spans around an operation the library calls. Per-step counters, histograms, or spans entirely inside the library would require a separate, explicit instrumentation decision.
No route, UI, backend IDL, or browser API changes are included.
Test plan
./tool/bazel test //web:check --test_output=errors: all 30 targets pass, including package-boundary and React 18 compatibility checks.make fmt lint check-tidy check-gazelleandgit diff --checkpass.