Conversation
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.
Motivation
A new timing span is often not a new measurement. The browser SDK already records an
http.clientspan for every request issued while a span is active, so a trace added to time a request can duplicate something already recorded, under a name that claims to measure something wider.A review that counts
trace(sites cannot see any of this. Most child spans are automatic, and a request moved inside an existingtrace()callback adds span volume with no instrumentation site in the diff.Overview
Adds
knowledge/auto-instrumentation.mdand threads what it establishes through four observability skills.knowledge/auto-instrumentation.mdrecords what the SDK creates by default, the parent condition that decides whether a request is recorded at all, how to check whether a proposed timing trace is already covered, and what moves span volume without atrace(site. Sources are pinned to@sentry/*10.38.0.instrumentationgains "check what already records this interval" as the first step, a rule to end a span on the state the UI renders from rather than on the request settling, and what cross-platform parity requires when two platforms emit one name and op.sentry-quotastops gating its scan on a pull request looking like instrumentation, and adds automatic child spans to what a reviewer reads.sentry-mcp-queriescarries the queries used here plus a retention control, since the events API reportsdataScanned: fullorpartialand a truncated window is otherwise indistinguishable from a real result.performance-attributionrecords howtrace()routestagsby value type, so a numeric tag never becomes a tag, and how a mismatched traceidproduces no span and no error.Findings came out of the instrumentation review on metamask-extension#46240 and the sweep that followed it.