Skip to content

feat: add gen_ai.client.operation.time_to_first_chunk and `gen_ai.c…#3377

Merged
lmolkova merged 8 commits intoopen-telemetry:mainfrom
castlenthesky:main
Feb 20, 2026
Merged

feat: add gen_ai.client.operation.time_to_first_chunk and `gen_ai.c…#3377
lmolkova merged 8 commits intoopen-telemetry:mainfrom
castlenthesky:main

Conversation

@castlenthesky
Copy link
Copy Markdown
Contributor

Changes

Added client.operation.time_per_output_chunk and client.operation.time_to_first_chunk metrics.

See open proposal and relevant discussion here

Important

Pull requests acceptance are subject to the triage process as described in Issue and PR Triage Management.
PRs that do not follow the guidance above, may be automatically rejected and closed.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

…lient.operation.time_per_output_chunk` metrics.
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Feb 3, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@kamphaus
Copy link
Copy Markdown
Contributor

kamphaus commented Feb 3, 2026

You might want to add the new metrics to docs/gen-ai/gen-ai-metrics.md.

See https://github.com/open-telemetry/semantic-conventions/blob/main/CONTRIBUTING.md#2-update-the-markdown-files on how to do that.

@castlenthesky
Copy link
Copy Markdown
Contributor Author

@kamphaus I updated the docs per your suggestion. Thanks for pointing that out.

Comment thread .chloggen/add_gen_ai_client_latency_metrics.yaml
@github-actions github-actions Bot added enhancement New feature or request area:gen-ai labels Feb 4, 2026
@castlenthesky
Copy link
Copy Markdown
Contributor Author

@kamphaus Thanks for highlighting that template. I have pushed a correction. Please let me know if there are any other changes you'd like to see.

@lmolkova lmolkova moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Feb 5, 2026
Copy link
Copy Markdown
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

I left some editorial comments. The key question: is there a prototype for it? Would it be possible to create one in https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/util/opentelemetry-util-genai?

Comment thread model/gen-ai/metrics.yaml
Comment thread docs/gen-ai/gen-ai-metrics.md
Comment thread docs/gen-ai/gen-ai-metrics.md
Comment thread model/gen-ai/metrics.yaml Outdated
Comment thread model/gen-ai/metrics.yaml Outdated
@castlenthesky
Copy link
Copy Markdown
Contributor Author

@lmolkova This most recent commit should get us across the finish line. Thanks for your patience.

@lmolkova lmolkova moved this from Awaiting codeowners approval to Needs More Approval in Semantic Conventions Triage Feb 12, 2026
Copy link
Copy Markdown
Member

@Cirilla-zmh Cirilla-zmh left a comment

Choose a reason for hiding this comment

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

Great PR! There're some suggestions may help.

Comment thread docs/gen-ai/gen-ai-metrics.md
Comment thread docs/gen-ai/gen-ai-metrics.md
@castlenthesky
Copy link
Copy Markdown
Contributor Author

@lmolkova I update the documentation, re-ran all checks outlined in the CONTRIBUTING.md file and submitted the new push. Thanks for your input.

@castlenthesky
Copy link
Copy Markdown
Contributor Author

@kamphaus Thanks for the final approval. I closed out all open conversations in case those were blocking the merge.
@lmolkova and @Cirilla-zmh - Thank you for your input and review.

Please let me know if there is anything else I need to do to have this successfully merged!

@lmolkova lmolkova added this pull request to the merge queue Feb 20, 2026
Merged via the queue into open-telemetry:main with commit 8cadaa9 Feb 20, 2026
18 checks passed
nagkumar91 pushed a commit to nagkumar91/semantic-conventions that referenced this pull request Feb 24, 2026
@stephentoub
Copy link
Copy Markdown

This PR talks about "chunks". What is the definition of "chunk"? Is that only about assistant content? Does it include reasoning if the model makes a distinction between reasoning and response text? Does it include any notification from the service, like a function call request (or a part of one)? Etc. My assumption is it's any packet of data from the llm, such that each update produced as part of a streaming implementation, regardless of what that update contains, counts as a "chunk".

bidetofevil pushed a commit to bidetofevil/semantic-conventions that referenced this pull request Apr 14, 2026
bidetofevil pushed a commit to bidetofevil/semantic-conventions that referenced this pull request Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gen-ai enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants