Skip to content

feat(node): Vendor in @fastify/otel #16328

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

Merged
merged 5 commits into from
May 20, 2025
Merged

Conversation

onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented May 19, 2025

Resolves: #16309

I tried to make as few modifications as possible for easier updates from the original implementation in the future.

  • Converted requires and module.exports to imports and exports
  • Created a local eslint configuration
  • Hard-coded name and version to the vendored version instead of reading from package.json

@onurtemizkan onurtemizkan requested a review from andreiborza May 19, 2025 13:50
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

Looks good to me overall, what issues were you running into with the logger and TS?

@onurtemizkan
Copy link
Collaborator Author

what issues were you running into with the logger and TS?

The original implementation was assigning the logger to this, which was failing not on SDK build, but on the e2e test builds. I guess it was because underlying opentelemetry implementation did not have a logger property pre 2.0.0 so, the extended class gave TS errors in the constructor.

@onurtemizkan onurtemizkan force-pushed the onur/vendor-in-fastify-otel branch from e4054b0 to cee8d3d Compare May 19, 2025 15:19
Copy link
Contributor

github-actions bot commented May 19, 2025

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.

Path Size % Change Change
@sentry/browser 24.04 kB - -
@sentry/browser - with treeshaking flags 23.7 kB - -
@sentry/browser (incl. Tracing) 38.46 kB - -
@sentry/browser (incl. Tracing, Replay) 76.58 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.61 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 81.35 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 93.46 kB - -
@sentry/browser (incl. Feedback) 40.83 kB - -
@sentry/browser (incl. sendFeedback) 28.79 kB - -
@sentry/browser (incl. FeedbackAsync) 33.66 kB - -
@sentry/react 25.86 kB - -
@sentry/react (incl. Tracing) 40.48 kB - -
@sentry/vue 28.44 kB - -
@sentry/vue (incl. Tracing) 40.28 kB - -
@sentry/svelte 24.07 kB - -
CDN Bundle 25.25 kB - -
CDN Bundle (incl. Tracing) 38.54 kB - -
CDN Bundle (incl. Tracing, Replay) 74.32 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 79.77 kB - -
CDN Bundle - uncompressed 73.68 kB - -
CDN Bundle (incl. Tracing) - uncompressed 114.08 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 228.05 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 240.87 kB - -
@sentry/nextjs (client) 42.08 kB - -
@sentry/sveltekit (client) 38.95 kB - -
@sentry/node 149.47 kB -5.5% -8.69 kB 🔽
@sentry/node - without tracing 98.1 kB +0.03% +29 B 🔺
@sentry/aws-serverless 123.43 kB +0.02% +19 B 🔺

View base workflow run

@onurtemizkan onurtemizkan force-pushed the onur/vendor-in-fastify-otel branch from 88352b5 to 585555f Compare May 20, 2025 09:27
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking care of this @onurtemizkan

@onurtemizkan onurtemizkan force-pushed the onur/vendor-in-fastify-otel branch from 585555f to 0a4e6de Compare May 20, 2025 10:05
@andreiborza andreiborza merged commit cba6016 into develop May 20, 2025
158 checks passed
@andreiborza andreiborza deleted the onur/vendor-in-fastify-otel branch May 20, 2025 10:19
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.

Vendor @fastify/otel instrumentation
2 participants