feat(telemetry): latency histograms for LLM request duration and TTFB (#463)#782
Open
ajbozarth wants to merge 1 commit intogenerative-computing:mainfrom
Open
feat(telemetry): latency histograms for LLM request duration and TTFB (#463)#782ajbozarth wants to merge 1 commit intogenerative-computing:mainfrom
ajbozarth wants to merge 1 commit intogenerative-computing:mainfrom
Conversation
…generative-computing#463) Adds request duration and time-to-first-token (TTFB) latency histograms via the plugin pattern established in generative-computing#653. Includes custom OTel bucket views sized for LLM latencies, backend telemetry field assertions across all backends, and updated dev/published docs. Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
Contributor
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
Contributor
Author
|
I'll be OOTO tomorrow (Fri April 3) through Monday (April 6). So I will address any review feedback on Tuesday. If this gets two committer approvals with no actionable feedback while I'm out the second approver can feel free to add it to the merge queue. This has no rush on it so it should be fine to wait till I'm back for addressing feedback |
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.
Misc PR
Type of PR
Description
Adds latency histograms for LLM request duration and time-to-first-token (TTFB)
as part of the metrics telemetry epic (#443).
LatencyMetricsPluginhooksgeneration_post_call(FIRE_AND_FORGET) and recordsmellea.llm.request.duration(every request) andmellea.llm.ttfb(streaming only)View+ExplicitBucketHistogramAggregationbucket boundaries sized forLLM latencies; both plugins auto-register alongside
TokenMetricsPluginModelOutputThunkgainsstreaming: boolandttfb_ms: float | None; TTFB iscaptured on first chunk in
astream(), gated onself.streamingAGENTS.md,metrics.md,telemetry.md, andmetrics_example.pyTesting