Skip to content

feat!: rename track_latency to track_duration on AIGraphTracker#138

Open
jsonbailey wants to merge 2 commits intomainfrom
jb/aic-2245/graph-track-duration-align
Open

feat!: rename track_latency to track_duration on AIGraphTracker#138
jsonbailey wants to merge 2 commits intomainfrom
jb/aic-2245/graph-track-duration-align

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey commented Apr 16, 2026

Summary

  • Rename AIGraphTracker.track_latency()track_duration() to align with the updated AIGRAPHTRACK spec
  • Update the event key from $ld:ai:graph:latency$ld:ai:duration:total
  • Update all call sites in OpenAI and LangChain provider packages and their tests

Test plan

  • All server-ai unit tests pass (115 tests)
  • All langchain provider tests pass (81 tests)
  • All openai provider tests pass (39 tests)
  • No remaining references to track_latency or $ld:ai:graph:latency in the codebase

🤖 Generated with Claude Code


Note

Medium Risk
Breaking API/event-name change for telemetry: downstream callers and dashboards relying on track_latency/$ld:ai:graph:latency must migrate to the new method and event key.

Overview
Updates graph-level tracking to report duration instead of latency by renaming AIGraphTracker.track_latency() to track_duration() and changing the emitted event from $ld:ai:graph:latency to $ld:ai:graph:duration:total.

All LangGraph and OpenAI agent graph runners (and their unit/integration tests) are updated to call the new method and assert on the new event key for both success and failure paths.

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

…te event key to $ld:ai:duration:total

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey marked this pull request as ready for review April 16, 2026 18:13
@jsonbailey jsonbailey requested a review from a team as a code owner April 16, 2026 18:13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant