Skip to content

Define dynamic request attributes for Google GenAI LLM inference spans#2125

Closed
michaelsafyan wants to merge 14 commits intoopen-telemetry:mainfrom
michaelsafyan:gcp_genai_request_star_attributes
Closed

Define dynamic request attributes for Google GenAI LLM inference spans#2125
michaelsafyan wants to merge 14 commits intoopen-telemetry:mainfrom
michaelsafyan:gcp_genai_request_star_attributes

Conversation

@michaelsafyan
Copy link
Copy Markdown
Contributor

@michaelsafyan michaelsafyan commented Apr 16, 2025

Fixes open-telemetry/semantic-conventions-genai#27

Changes

Defines a gcp.gen_ai.operation.config.<key> dynamic attribute in support of Google Gen AI SDK instrumentation (see: PR 3374: include more request configuration options...). In support of this change, this also adds a Google-specific variant of the Gen AI docs. We anticipate that this will serve to enable additional documentation and Semantic Conventions for Google-specific elements beyond the dynamic request attributes being documented here.

Merge requirement checklist

… create a GCP-specific variants of the Gen AI documentation in support of this.
Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
@lmolkova lmolkova moved this from Untriaged to Awaiting SIG approval in Semantic Conventions Triage Apr 19, 2025
@michaelsafyan
Copy link
Copy Markdown
Contributor Author

@lmolkova reaching back to see what the next steps are to make forward progress here... for example, do we need to wait for Weaver to resolve open-telemetry/weaver#705 before we can move forward? And do we need this PR to go in before we can submit/merge open-telemetry/opentelemetry-python-contrib#3374 ?

It looks like Traceloop has some interest in iterating on the Google Gen AI SDK instrumentation (traceloop/openllmetry#2675) ... so I'm wondering if it might make sense to accelerate the merge of open-telemetry/opentelemetry-python-contrib#3374 (even with this pending) simply to reduce the chance of future merge conflicts ... I know that code tends to rot the longer it is out-of-sync.

Comment thread model/gen-ai/spans.yaml
@michaelsafyan
Copy link
Copy Markdown
Contributor Author

I see some yamllint errors:

./docs/attributes-registry/gcp.md:114:204 MD055/table-pipe-style Table pipe style [Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe]
./docs/attributes-registry/gcp.md:114:204 MD056/table-column-count Table column count [Expected: 5; Actual: 3; Too few cells, row will be missing data]
./docs/attributes-registry/gcp.md:115:1 MD055/table-pipe-style Table pipe style [Expected: leading_and_trailing; Actual: trailing_only; Missing leading pipe]
./docs/attributes-registry/gcp.md:115:520 MD056/table-column-count Table column count [Expected: 5; Actual: 3; Too few cells, row will be missing data]
./docs/attributes-registry/gcp.md:118:523 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]

... which I'm not quite sure how to fix. Before spending too much time on that, though, I want to confirm that the updated definition is acceptable.

@michaelsafyan michaelsafyan requested a review from lmolkova April 25, 2025 22:54
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.

Left some cosmetic suggestions, LGTM otherwise

Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
Comment thread model/gcp/registry.yaml Outdated
Comment thread docs/gen-ai/gcp.md Outdated
Comment thread .chloggen/gcp_genai_dynamic_req_attr.yaml
@jsuereth
Copy link
Copy Markdown
Contributor

jsuereth commented Jun 6, 2025

This LGTM once comments are addressed.

@github-actions
Copy link
Copy Markdown

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Jun 22, 2025
@lmolkova lmolkova moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Jun 22, 2025
@lmolkova lmolkova moved this from Ready to be Merged to Needs More Approval in Semantic Conventions Triage Jun 22, 2025
@lmolkova lmolkova removed the Stale label Jun 22, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 8, 2025

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Jul 8, 2025
@github-actions
Copy link
Copy Markdown

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions Bot closed this Jul 15, 2025
@lmolkova lmolkova reopened this Jul 15, 2025
@lmolkova
Copy link
Copy Markdown
Member

reopening in case @aabmass would like to take it over

@github-actions github-actions Bot removed the Stale label Jul 16, 2025
@lmolkova lmolkova marked this pull request as draft October 28, 2025 21:36
@lmolkova lmolkova moved this from Needs More Approval to Untriaged in Semantic Conventions Triage Oct 28, 2025
@github-actions
Copy link
Copy Markdown

This PR has been labeled as stale due to lack of activity. It will be automatically closed if there is no further activity over the next 14 days.

@Rima-ag
Copy link
Copy Markdown

Rima-ag commented Feb 28, 2026

I'm happy to take this over, address the comments and update it to include the changes to the semantic convention since then
@lmolkova, could you please reopen the PR?

@lmolkova lmolkova reopened this Feb 28, 2026
@lmolkova
Copy link
Copy Markdown
Member

@Rima-ag sure, done!

@trask
Copy link
Copy Markdown
Member

trask commented Mar 9, 2026

Closing in favor of @Rima-ag's #3486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Dynamic "gcp.gen_ai.request.*" attributes in support of Gen AI SDK instrumentation

7 participants