Skip to content

chore: rename trackLatency to trackDuration on LDGraphTracker#1285

Merged
jsonbailey merged 2 commits into
mainfrom
jb/aic-2245/graph-track-duration-align
Apr 21, 2026
Merged

chore: rename trackLatency to trackDuration on LDGraphTracker#1285
jsonbailey merged 2 commits into
mainfrom
jb/aic-2245/graph-track-duration-align

Conversation

@jsonbailey

@jsonbailey jsonbailey commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Renames trackLatency()trackDuration() on the LDGraphTracker interface and LDGraphTrackerImpl class to align with the existing trackDuration naming on LDAIConfigTracker
  • Updates the event key from $ld:ai:graph:latency to $ld:ai:graph:duration:total per the updated AIGRAPHTRACK spec
  • Updates all tests to match the new method name and event key

Test plan

  • All 144 unit tests pass (yarn workspace @launchdarkly/server-sdk-ai test)
  • Lint passes clean
  • Build succeeds

🤖 Generated with Claude Code


Note

Medium Risk
Public API rename plus a telemetry event-key change may break downstream callers and dashboards if they aren’t updated, but the implementation change is small and localized.

Overview
Renames the graph timing API from trackLatency(durationMs) to trackDuration(durationMs) on LDGraphTracker and LDGraphTrackerImpl, including updated warnings and docs.

Switches the emitted metric event from $ld:ai:graph:latency to $ld:ai:graph:duration:total, and updates unit tests to assert the new method name and event key.

Reviewed by Cursor Bugbot for commit 67cc6cb. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25623 bytes
Compressed size limit: 29000
Uncompressed size: 125843 bytes

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 37607 bytes
Compressed size limit: 38000
Uncompressed size: 207149 bytes

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179269 bytes
Compressed size limit: 200000
Uncompressed size: 830289 bytes

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31722 bytes
Compressed size limit: 34000
Uncompressed size: 113100 bytes

@jsonbailey jsonbailey marked this pull request as ready for review April 16, 2026 18:12
@jsonbailey jsonbailey requested a review from a team as a code owner April 16, 2026 18:12

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cfb4846. Configure here.

Comment thread packages/sdk/server-ai/src/LDGraphTrackerImpl.ts Outdated
Base automatically changed from feat/ai-sdk-next-release to main April 20, 2026 21:04
jsonbailey and others added 2 commits April 20, 2026 16:51
… event key to $ld:ai:duration:total

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey force-pushed the jb/aic-2245/graph-track-duration-align branch from cfb4846 to 67cc6cb Compare April 21, 2026 13:58
@jsonbailey jsonbailey merged commit dbb2762 into main Apr 21, 2026
43 checks passed
@jsonbailey jsonbailey deleted the jb/aic-2245/graph-track-duration-align branch April 21, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants