Skip to content

Document "generate_content" as a permissible value of "gen_ai.operation.name" #2048

@michaelsafyan

Description

@michaelsafyan

Area(s)

area:gen-ai

What's missing?

Instrumentation library for google-genai here:

https://github.com/open-telemetry/opentelemetry-python-contrib/tree/6bde73ce344af1df7002bc001ad0fc7d51b4b577/instrumentation-genai/opentelemetry-instrumentation-google-genai

... adds generate_content as a value for gen_ai.operation.name:

https://github.com/open-telemetry/opentelemetry-python-contrib/blob/6bde73ce344af1df7002bc001ad0fc7d51b4b577/instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py#L52

https://github.com/open-telemetry/opentelemetry-python-contrib/blob/6bde73ce344af1df7002bc001ad0fc7d51b4b577/instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py#L229

This should be captured in Semantic Conventions.

Describe the solution you'd like

For now, simply define generate_content as an additional permissible value.

Separately, there are issues covering revisiting the meaning/scope in general of this operation name:

... but those larger scope changes should be independent of the small incremental act of updating the Semantic Conventions to reflect the reality of instrumentation.

I've already drafted a small change to add generate_content as a documented value:

I'm creating this issue as a point of reference for the CHANGELOG to go with the draft change. I intend to send a pull request soon.

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions