Skip to content

Update Google GenAI and vertex AI non-experimental instrumentations with sem convs from 1.30->1.35 #3934

@DylanRussell

Description

@DylanRussell

Probably this is a simple change, I think just 3 sem convs were added:

if use_latest_semconvs:
if "seed" in generation_config:
attributes[GenAIAttributes.GEN_AI_REQUEST_SEED] = (
generation_config.seed
)
if "candidate_count" in generation_config:
attributes[GenAIAttributes.GEN_AI_REQUEST_CHOICE_COUNT] = (
generation_config.candidate_count
)
if "response_mime_type" in generation_config:
if generation_config.response_mime_type == "text/plain":
attributes[GenAIAttributes.GEN_AI_OUTPUT_TYPE] = "text"
elif generation_config.response_mime_type == "application/json":
attributes[GenAIAttributes.GEN_AI_OUTPUT_TYPE] = "json"
else:
attributes[GenAIAttributes.GEN_AI_OUTPUT_TYPE] = (
generation_config.response_mime_type
)
-- and we need to add them to the non-experimental instrumentations.

But need to double check what AI sem convs were added that are missing from the old "non-experimental" versions of these instrumentations..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions