Skip to content

[NET-1287] feat: Add support for google genai instrumentation #103

Open
Nithish-KV wants to merge 5 commits into
devfrom
feat/genai-sdk-instrumentation
Open

[NET-1287] feat: Add support for google genai instrumentation #103
Nithish-KV wants to merge 5 commits into
devfrom
feat/genai-sdk-instrumentation

Conversation

@Nithish-KV

@Nithish-KV Nithish-KV commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Changes

  • feat: Added instrumentation for new google genai sdk with instrument name NetraInstruments.GOOGLE_GENAI.
  • chore: Retain instrumentation support for legacy google generative ai library with instrument name NetraInstruments.GOOGLE_GENERATIVE_AI.

Jira

NET-1287

@Nithish-KV Nithish-KV force-pushed the feat/genai-sdk-instrumentation branch from 294aea3 to bb31f34 Compare July 6, 2026 10:12
throw error;
}
},
async return() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Early-break return() does not close the underlying stream. Shouldn't we use iterator.return()?

}

// Generation config parameters (from generationConfig object or direct kwargs)
const generationConfig =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does Google Generative AI SDK stores generationConfig on the model instance? In wrapper.ts we only capture model, systemInstruction and history from model instance. Since kwargs.generationConfig is never set, this falls back to kwargs itself.

Comment thread package.json
{
"name": "netra-sdk",
"version": "1.4.0",
"version": "1.5.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't we need @google/genai as peerDependency?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants