Skip to content

feat: Implement event loop instrumentation#14956

Open
sradevski wants to merge 1 commit intodevelopfrom
feat/implement-event-loop-instrumentation
Open

feat: Implement event loop instrumentation#14956
sradevski wants to merge 1 commit intodevelopfrom
feat/implement-event-loop-instrumentation

Conversation

@sradevski
Copy link
Copy Markdown
Member

Summary

Add Event loop instrumentation support. This should make it easier to detect a common issue - the event loop getting blocked resulting in 503s and restarts.

I still need to do some testing, but code-wise it can be reviewed.

@sradevski sradevski requested a review from a team as a code owner March 26, 2026 16:28
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

9 Skipped Deployments
Project Deployment Actions Updated (UTC)
api-reference Ignored Ignored Mar 30, 2026 2:11pm
api-reference-v2 Ignored Ignored Preview Mar 30, 2026 2:11pm
bloom-docs Ignored Ignored Preview Mar 30, 2026 2:11pm
cloud-docs Ignored Ignored Preview Mar 30, 2026 2:11pm
docs-ui Ignored Ignored Preview Mar 30, 2026 2:11pm
docs-v2 Ignored Ignored Preview Mar 30, 2026 2:11pm
medusa-docs Ignored Ignored Preview Mar 30, 2026 2:11pm
resources-docs Ignored Ignored Preview Mar 30, 2026 2:11pm
user-guide Ignored Ignored Preview Mar 30, 2026 2:11pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 26, 2026

⚠️ No Changeset found

Latest commit: 8715893

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sradevski sradevski force-pushed the feat/implement-event-loop-instrumentation branch from e47f480 to c21c900 Compare March 26, 2026 16:54
@sradevski
Copy link
Copy Markdown
Member Author

/snapshot-this

@sradevski sradevski force-pushed the feat/implement-event-loop-instrumentation branch from c21c900 to d7f5784 Compare March 27, 2026 15:39
@sradevski
Copy link
Copy Markdown
Member Author

/snapshot-this

@sradevski sradevski force-pushed the feat/implement-event-loop-instrumentation branch 2 times, most recently from 9ae531d to d830d55 Compare March 30, 2026 08:40
@sradevski
Copy link
Copy Markdown
Member Author

/snapshot-this

@medusajs medusajs deleted a comment from github-actions bot Mar 30, 2026
@medusajs medusajs deleted a comment from github-actions bot Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/admin-bundler@2.13.6-snapshot-20260330084132
yarn add @medusajs/admin-sdk@2.13.6-snapshot-20260330084132
yarn add @medusajs/admin-shared@2.13.6-snapshot-20260330084132
yarn add @medusajs/admin-vite-plugin@2.13.6-snapshot-20260330084132
yarn add @medusajs/dashboard@2.13.6-snapshot-20260330084132
yarn add create-medusa-app@2.13.6-snapshot-20260330084132
yarn add @medusajs/cli@2.13.6-snapshot-20260330084132
yarn add medusa-dev-cli@2.13.6-snapshot-20260330084132
yarn add @medusajs/medusa-oas-cli@2.13.6-snapshot-20260330084132
yarn add @medusajs/core-flows@2.13.6-snapshot-20260330084132
yarn add @medusajs/framework@2.13.6-snapshot-20260330084132
yarn add @medusajs/js-sdk@2.13.6-snapshot-20260330084132
yarn add @medusajs/modules-sdk@2.13.6-snapshot-20260330084132
yarn add @medusajs/orchestration@2.13.6-snapshot-20260330084132
yarn add @medusajs/types@2.13.6-snapshot-20260330084132
yarn add @medusajs/utils@2.13.6-snapshot-20260330084132
yarn add @medusajs/workflows-sdk@2.13.6-snapshot-20260330084132
yarn add @medusajs/deps@2.13.6-snapshot-20260330084132
yarn add @medusajs/icons@2.13.6-snapshot-20260330084132
yarn add @medusajs/ui@4.1.6-snapshot-20260330084132
yarn add @medusajs/ui-preset@2.13.6-snapshot-20260330084132
yarn add @medusajs/medusa@2.13.6-snapshot-20260330084132
yarn add @medusajs/telemetry@2.13.6-snapshot-20260330084132
yarn add @medusajs/test-utils@2.13.6-snapshot-20260330084132
yarn add @medusajs/analytics@2.13.6-snapshot-20260330084132
yarn add @medusajs/api-key@2.13.6-snapshot-20260330084132
yarn add @medusajs/auth@2.13.6-snapshot-20260330084132
yarn add @medusajs/cache-inmemory@2.13.6-snapshot-20260330084132
yarn add @medusajs/cache-redis@2.13.6-snapshot-20260330084132
yarn add @medusajs/caching@2.13.6-snapshot-20260330084132
yarn add @medusajs/cart@2.13.6-snapshot-20260330084132
yarn add @medusajs/currency@2.13.6-snapshot-20260330084132
yarn add @medusajs/customer@2.13.6-snapshot-20260330084132
yarn add @medusajs/event-bus-local@2.13.6-snapshot-20260330084132
yarn add @medusajs/event-bus-redis@2.13.6-snapshot-20260330084132
yarn add @medusajs/file@2.13.6-snapshot-20260330084132
yarn add @medusajs/fulfillment@2.13.6-snapshot-20260330084132
yarn add @medusajs/index@2.13.6-snapshot-20260330084132
yarn add @medusajs/inventory@2.13.6-snapshot-20260330084132
yarn add @medusajs/link-modules@2.13.6-snapshot-20260330084132
yarn add @medusajs/locking@2.13.6-snapshot-20260330084132
yarn add @medusajs/notification@2.13.6-snapshot-20260330084132
yarn add @medusajs/order@2.13.6-snapshot-20260330084132
yarn add @medusajs/payment@2.13.6-snapshot-20260330084132
yarn add @medusajs/pricing@2.13.6-snapshot-20260330084132
yarn add @medusajs/product@2.13.6-snapshot-20260330084132
yarn add @medusajs/promotion@2.13.6-snapshot-20260330084132
yarn add @medusajs/analytics-local@2.13.6-snapshot-20260330084132
yarn add @medusajs/analytics-posthog@2.13.6-snapshot-20260330084132
yarn add @medusajs/auth-emailpass@2.13.6-snapshot-20260330084132
yarn add @medusajs/auth-github@2.13.6-snapshot-20260330084132
yarn add @medusajs/auth-google@2.13.6-snapshot-20260330084132
yarn add @medusajs/caching-redis@2.13.6-snapshot-20260330084132
yarn add @medusajs/file-local@2.13.6-snapshot-20260330084132
yarn add @medusajs/file-s3@2.13.6-snapshot-20260330084132
yarn add @medusajs/fulfillment-manual@2.13.6-snapshot-20260330084132
yarn add @medusajs/locking-postgres@2.13.6-snapshot-20260330084132
yarn add @medusajs/locking-redis@2.13.6-snapshot-20260330084132
yarn add @medusajs/notification-local@2.13.6-snapshot-20260330084132
yarn add @medusajs/notification-sendgrid@2.13.6-snapshot-20260330084132
yarn add @medusajs/payment-stripe@2.13.6-snapshot-20260330084132
yarn add @medusajs/rbac@2.13.6-snapshot-20260330084132
yarn add @medusajs/region@2.13.6-snapshot-20260330084132
yarn add @medusajs/sales-channel@2.13.6-snapshot-20260330084132
yarn add @medusajs/settings@2.13.6-snapshot-20260330084132
yarn add @medusajs/stock-location@2.13.6-snapshot-20260330084132
yarn add @medusajs/store@2.13.6-snapshot-20260330084132
yarn add @medusajs/tax@2.13.6-snapshot-20260330084132
yarn add @medusajs/translation@2.13.6-snapshot-20260330084132
yarn add @medusajs/user@2.13.6-snapshot-20260330084132
yarn add @medusajs/workflow-engine-inmemory@2.13.6-snapshot-20260330084132
yarn add @medusajs/workflow-engine-redis@2.13.6-snapshot-20260330084132
yarn add @medusajs/draft-order@2.13.6-snapshot-20260330084132

Latest commit: d9fd0f8

@sradevski sradevski force-pushed the feat/implement-event-loop-instrumentation branch from d830d55 to 88b8601 Compare March 30, 2026 09:40
@sradevski sradevski force-pushed the feat/implement-event-loop-instrumentation branch from 88b8601 to 8715893 Compare March 30, 2026 14:10
@medusa-os-bot
Copy link
Copy Markdown

medusa-os-bot bot commented Apr 9, 2026

After an initial review, a couple of things to address before this is ready:

Required changes:

  • Add a changeset for @medusajs/medusa, @medusajs/framework, and @medusajs/deps — all three have source code changes and are missing a changeset entry. Run yarn changeset and use the feat(package-name): short description message format.
  • Add tests for the new event loop instrumentation — new functionality in packages/ should include unit or integration tests.

Notes:

  • The PR description mentions testing is still pending. Please update the description and mark the PR ready when it's fully tested.
  • The dep proxy pattern for the new OTel packages (sdk-metrics, exporter-metrics-otlp-http, exporter-trace-otlp-http) is consistent with the existing approach — looks good there.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants