chore: Clarify TrackRequest re-call wording#377
Merged
Conversation
keelerm84
approved these changes
May 15, 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.
Summary
The re-call paragraph added to
TrackRequestin #363 overpromised: it said a second call would produce "no additional metric events." That isn't accurate in the partial-failure case -- if the first call's task returns an error before token usage is recorded, the token slot is still empty, and a second successful call will still emit token metric events.Replaces the inaccurate paragraph with wording that matches the cross-SDK fixes shipped on Ruby, .NET, js-core, and Python.
Test plan
Note
Low Risk
Doc-only change that updates
TrackRequestsemantics for re-calls; no runtime behavior is modified.Overview
Clarifies the
Tracker.TrackRequestdoc comment to accurately describe repeated-call behavior: the task may be re-run, and metrics are emitted only for fields not yet recorded on thatTracker(rather than claiming no additional metric events can ever occur).Reviewed by Cursor Bugbot for commit ca4fef2. Bugbot is set up for automated code reviews on this repo. Configure here.