-
Notifications
You must be signed in to change notification settings - Fork 633
fix(telemetry): persist ingress spans and ordinary request attempts #1093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1629,6 +1629,19 @@ async function handleResponsesInner( | |
| const adapterProvider = resolveWireProtocolOverride(route.providerName, route.modelId, route.provider, inboundWire); | ||
| const adapter = resolveAdapter(adapterProvider, config.cacheRetention); | ||
| logCtx.providerAdapter = adapter.name; | ||
| // Ordinary requests receive one durable attempt only after their final initial | ||
| // adapter is resolved. Combo children own their attempt and retries keep it. | ||
| if (!options.comboAttempt && !logCtx.activeAttempt) { | ||
| const attempt = beginRequestAttempt( | ||
| (logCtx.attempts?.length ?? 0) + 1, | ||
| logCtx.provider, | ||
| route.modelId, | ||
| adapter.name, | ||
| ); | ||
| logCtx.activeAttempt = attempt; | ||
| logCtx.activeAttemptStartedAt = Date.now(); | ||
| (logCtx.attempts ??= []).push(attempt); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Once every ordinary request receives this non-empty Useful? React with 👍 / 👎.
Comment on lines
+1641
to
+1643
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a request resolves the Kiro adapter but carries an unexpanded Useful? React with 👍 / 👎. |
||
| } | ||
| sealRequestAttemptIdentity(logCtx.activeAttempt, logCtx.provider, adapter.name); | ||
| const isPassthrough = "passthrough" in adapter && !!adapter.passthrough; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ordinary Cursor requests,
applyRouteDependentNormalizationcallsrecordAttemptRequestedEffortbefore this block assignslogCtx.activeAttempt. Cursor usesrunTurn, so it never reaches a laterrecordAdapterReasoningcall that would backfill the field, even though its request builder uses the selected effort to choose the wire model. Record the settled effort immediately after assigning the new attempt so persisted Cursor attempt telemetry includesrequestedEffort.Useful? React with 👍 / 👎.