Title: AI integration deep proxies return new function references on every property access · Issue #22355 · getsentry/sentry-javascript · GitHub
Open Graph Title: AI integration deep proxies return new function references on every property access · Issue #22355 · getsentry/sentry-javascript
X Title: AI integration deep proxies return new function references on every property access · Issue #22355 · getsentry/sentry-javascript
Description: The get trap in AI integration deep proxies always returns a different value instead of memoizing bound/instrumented methods. For example, console.log(ai.run === ai.run) prints false because each access creates a new function via instrum...
Open Graph Description: The get trap in AI integration deep proxies always returns a different value instead of memoizing bound/instrumented methods. For example, console.log(ai.run === ai.run) prints false because each a...
X Description: The get trap in AI integration deep proxies always returns a different value instead of memoizing bound/instrumented methods. For example, console.log(ai.run === ai.run) prints false because each a...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/22355
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AI integration deep proxies return new function references on every property access","articleBody":"The `get` trap in AI integration deep proxies always returns a different value instead of memoizing bound/instrumented methods.\n\nFor example, `console.log(ai.run === ai.run)` prints `false` because each access creates a new function via `instrumentMethod(...)` or `value.bind(obj)`.\n\nThis pattern exists across multiple AI integrations:\n\n- `packages/core/src/tracing/openai/index.ts` (`createDeepProxy`)\n- `packages/core/src/tracing/anthropic-ai/index.ts` (`createDeepProxy`)\n- `packages/core/src/tracing/google-genai/index.ts` (`createDeepProxy`)\n\nSuggested fix: keep a `Map\u003cstring | symbol, Function>` in the closure to store bound/instrumented methods, rather than creating a new value on every `get`.\n\n> Originally posted by @isaacs in https://github.com/getsentry/sentry-javascript/pull/22119#discussion_r3581015061","author":{"url":"https://github.com/JPeer264","@type":"Person","name":"JPeer264"},"datePublished":"2026-07-17T09:45:46Z","url":"https://github.com/getsentry/sentry-javascript/issues/22355"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3fe3b64e-b637-9598-29bb-7ff7ad4b98ae |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE32:47541:61635:82DC3:6B0428A3 |
| html-safe-nonce | ce6971e7c9cc76bb37d48b95e1b22538e056dcd4c587bd90e90787ddeb2c5a25 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTMyOjQ3NTQxOjYxNjM1OjgyREMzOjZCMDQyOEEzIiwidmlzaXRvcl9pZCI6Ijg4MjA1MjUwNDc1MjQ5ODg1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6ebce44908351aed26f13346253d328a0bcd13d8e17c9f5e22cdeeadbc64872c |
| hovercard-subject-tag | issue:4910130582 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/22355/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9c5f7882b7b15c501e0fbf8cc04926068982783f72b5510a33cffbdf250ec7a6/getsentry/sentry-javascript/issues/22355 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9c5f7882b7b15c501e0fbf8cc04926068982783f72b5510a33cffbdf250ec7a6/getsentry/sentry-javascript/issues/22355 |
| og:image:alt | The get trap in AI integration deep proxies always returns a different value instead of memoizing bound/instrumented methods. For example, console.log(ai.run === ai.run) prints false because each a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JPeer264 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width