Skip to content

feat(core): Support embedding APIs in google-genai - #19797

Merged
nicohrubec merged 3 commits into
developfrom
nh/fix-google-genai-tests
Mar 27, 2026
Merged

feat(core): Support embedding APIs in google-genai#19797
nicohrubec merged 3 commits into
developfrom
nh/fix-google-genai-tests

Conversation

@nicohrubec

@nicohrubecnicohrubec commented Mar 13, 2026

Copy link
Copy Markdown
Member

Add instrumentation support for the Google GenAI embeddings API (models.embedContent).

Docs: https://ai.google.dev/gemini-api/docs/embeddings

Closes#19535

@nicohrubecnicohrubec changed the title feat(core): Support embedding APIs in google-genii feat(core): Support embedding APIs in google-genaiMar 13, 2026
@github-actions

github-actionsBot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

PathSize% ChangeChange
@sentry/browser25.69 kB+0.2%+49 B 🔺
@sentry/browser - with treeshaking flags24.17 kB+0.14%+33 B 🔺
@sentry/browser (incl. Tracing)42.17 kB-1.04%-443 B 🔽
@sentry/browser (incl. Tracing, Profiling)46.79 kB-1.03%-485 B 🔽
@sentry/browser (incl. Tracing, Replay)80.98 kB-0.55%-440 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags70.6 kB-0.57%-398 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas)85.7 kB-0.49%-422 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback)97.97 kB-0.42%-406 B 🔽
@sentry/browser (incl. Feedback)42.48 kB+0.08%+30 B 🔺
@sentry/browser (incl. sendFeedback)30.35 kB+0.15%+44 B 🔺
@sentry/browser (incl. FeedbackAsync)35.4 kB+0.12%+39 B 🔺
@sentry/browser (incl. Metrics)26.96 kB+0.14%+37 B 🔺
@sentry/browser (incl. Logs)27.1 kB+0.12%+32 B 🔺
@sentry/browser (incl. Metrics & Logs)27.78 kB+0.15%+39 B 🔺
@sentry/react27.45 kB+0.22%+58 B 🔺
@sentry/react (incl. Tracing)44.52 kB-0.96%-429 B 🔽
@sentry/vue30.13 kB+0.16%+46 B 🔺
@sentry/vue (incl. Tracing)44.08 kB-0.92%-405 B 🔽
@sentry/svelte25.7 kB+0.16%+40 B 🔺
CDN Bundle28.39 kB+0.41%+114 B 🔺
CDN Bundle (incl. Tracing)43.2 kB-0.72%-311 B 🔽
CDN Bundle (incl. Logs, Metrics)29.76 kB+2.12%+617 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics)44.25 kB-0.25%-107 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics)68.56 kB+0.52%+348 B 🔺
CDN Bundle (incl. Tracing, Replay)80.08 kB-0.32%-253 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)81.16 kB-0.1%-74 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback)85.62 kB-0.3%-254 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)86.67 kB-0.11%-95 B 🔽
CDN Bundle - uncompressed82.93 kB+0.37%+304 B 🔺
CDN Bundle (incl. Tracing) - uncompressed128.07 kB-0.39%-489 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed87.07 kB+1.85%+1.58 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed131.48 kB+0.05%+55 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed210.06 kB+0.45%+934 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed244.95 kB-0.19%-464 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed248.34 kB+0.04%+80 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed257.86 kB-0.18%-464 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed261.25 kB+0.04%+80 B 🔺
@sentry/nextjs (client)46.93 kB-0.93%-438 B 🔽
@sentry/sveltekit (client)42.67 kB-0.94%-401 B 🔽
@sentry/node-core56.51 kB+0.29%+163 B 🔺
@sentry/node173.61 kB+0.26%+449 B 🔺
@sentry/node - without tracing96.54 kB+0.2%+192 B 🔺
@sentry/aws-serverless113.54 kB+0.18%+202 B 🔺

View base workflow run

@github-actions

github-actionsBot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

ScenarioRequests/s% of BaselinePrev. Requests/sChange %
GET Baseline9,331-9,565-2%
GET With Sentry1,68118%1,659+1%
GET With Sentry (error only)6,01864%5,943+1%
POST Baseline1,173-1,201-2%
POST With Sentry56348%596-6%
POST With Sentry (error only)1,02187%1,074-5%
MYSQL Baseline3,180-3,286-3%
MYSQL With Sentry43814%471-7%
MYSQL With Sentry (error only)2,58981%2,665-3%

View base workflow run

@nicohrubec
nicohrubec marked this pull request as ready for review March 13, 2026 13:30

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment threadpackages/core/src/tracing/google-genai/constants.ts Outdated
Comment threadpackages/core/src/tracing/google-genai/index.ts
@nicohrubec
nicohrubec marked this pull request as draft March 26, 2026 13:53
Add embeddings support to the Google GenAI integration using the new
method registry architecture. Records embeddings input when PII
recording is enabled, and skips response attribute extraction for
embeddings responses.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubecforce-pushed the nh/fix-google-genai-tests branch from 0b2070d to 3af75a0CompareMarch 26, 2026 18:53
@github-actions

github-actionsBot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (browser) Replace element timing spans with metrics by logaretm in #19869
  • (core) Support embedding APIs in google-genai by nicohrubec in #19797
  • (node) Add nodeRuntimeMetricsIntegration by chargome in #19923
  • (nuxt) Support parametrized SSR routes in Nuxt 5 by s1gr1d in #19977

Bug Fixes 🐛

  • (e2e) Pin @opentelemetry/api to 1.9.0 in ts3.8 test app by logaretm in #19992
  • (node) Ensure startNewTrace propagates traceId in OTel environments by logaretm in #19963
  • (opentelemetry) Convert seconds timestamps in span.end() to milliseconds by logaretm in #19958

Documentation 📚

  • (release) Update publishing-a-release.md by nicohrubec in #19982

Internal Changes 🔧

Core

  • Introduce instrumented method registry for AI integrations by nicohrubec in #19981
  • Consolidate getOperationName into one shared utility by nicohrubec in #19971

Other

  • (deno) Expand Deno E2E test coverage by chargome in #19957

🤖 This preview updates automatically when you update the PR.

@nicohrubec
nicohrubec marked this pull request as ready for review March 27, 2026 08:34
@nicohrubec
nicohrubec merged commit fa74db5 into developMar 27, 2026
697 of 701 checks passed
@nicohrubec
nicohrubec deleted the nh/fix-google-genai-tests branch March 27, 2026 09:01
Sign up for freeto 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.

Support Embeddings APIs in Google GenAI

2 participants

@nicohrubec@chargome