Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node-experimental): Update auto integration lookup & readme #8690

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 1, 2023

This updates the way we auto-lookup integrations.

Due to how OTEL instrumentation works, we actually do not need any dynamic require. Otel instrumentation will generally always work, it only actually instruments when something is required/imported. So all integration will be added, they will simply do nothing if the package is not used.

This also updates the readme to clarify this & restrictions.

@mydea mydea requested review from AbhiPrasad and a team August 1, 2023 10:40
@mydea mydea self-assigned this Aug 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 75.09 KB (0%)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.4 KB (0%)
@sentry/browser - Webpack (gzipped) 21.95 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 69.82 KB (-0.01% 🔽)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.28 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.33 KB (-0.02% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 221.03 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 85.99 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 60.48 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 30.41 KB (-0.01% 🔽)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 65.16 KB (0%)
@sentry/react - Webpack (gzipped) 21.96 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 92.93 KB (0%)
@sentry/nextjs Client - Webpack (gzipped) 50.89 KB (0%)

There is experimental support for running OpenTelemetry with ESM (`"type": "module"`):

```bash
node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ./app.js
Copy link
Member

Choose a reason for hiding this comment

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

😭

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, so sad 😬 and even that doesn't work with all integrations, e.g. it fails with fastify. 😢

@mydea mydea merged commit a5fdaee into develop Aug 1, 2023
40 checks passed
@mydea mydea deleted the fn/otel-discovery branch August 1, 2023 13:06
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.

None yet

2 participants