Skip to content

feat(ember): v2#19229

Open
aklkv wants to merge 1 commit intogetsentry:developfrom
aklkv:feat/ember-v2-format
Open

feat(ember): v2#19229
aklkv wants to merge 1 commit intogetsentry:developfrom
aklkv:feat/ember-v2-format

Conversation

@aklkv
Copy link

@aklkv aklkv commented Feb 8, 2026

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
  • Link an issue if there is one related to your pull request. If no issue is linked, one will be auto-generated and linked.

Summary

Migrates @sentry/ember from the legacy v1 addon format to the Ember v2 addon format. This modernizes the package to work with both classic Ember builds and Embroider-optimized builds, and removes the runtime dependency on @embroider/macros.

Changes

  • Build system: Replaced ember-cli build pipeline with rollup (transpilation → dist/) + tsc (declarations → declarations/)
  • Addon entry: Added addon-main.cjs using @embroider/addon-shim as the addon entry point
  • Package.json: Set ember-addon.version: 2, updated exports map, added ember-addon.app-js mapping
  • Config format: Replaced @embroider/macros getOwnConfig() with explicit Sentry.init() calls and a new setupPerformance() export

API changes:

  • init() is now called directly in app.ts or an initializer (no more ENV['@sentry/ember'] config)
  • setupPerformance() must be called from an instance-initializer to opt into performance instrumentation
  • Initial load instrumentation requires manual <script> tags in index.html
  • Added UPGRADE.md with detailed migration guide

Test & CI updates:

  • All 21 unit tests passing (acceptance tests for errors, performance, and replay)
  • Updated e2e test apps (ember-classic, ember-embroider) to use v2 patterns:
    • Added instance-initializers for performance setup
    • Migrated config from ENV['@sentry/ember'] to Sentry.init() in app.ts
    • Added initial load <script> tags to index.html
  • Updated .github/workflows/build.yml CACHED_BUILD_PATHS from packages/ember/*.d.ts to packages/ember/dist + packages/ember/declarations

TypeScript fixes:

  • Added "types": ["ember-source/types"] to tsconfig.publish.json for Ember module resolution during declaration generation
  • Fixed transition type imports (removed non-existent @ember/routing/-private/transition)
  • Simplified instrumentFunction generic to avoid tuple mismatch errors

Breaking Changes

  • ENV['@sentry/ember'] config in config/environment.js is no longer supported — use Sentry.init() directly
  • Performance instrumentation is no longer automatic — call setupPerformance() from an instance-initializer
  • Initial load tracking requires manual <script> tags in app/index.html

Closes #15835

@aklkv aklkv marked this pull request as ready for review February 8, 2026 09:40
@aklkv aklkv force-pushed the feat/ember-v2-format branch 2 times, most recently from 4865158 to 53dd617 Compare February 8, 2026 10:05
@aklkv aklkv force-pushed the feat/ember-v2-format branch from 53dd617 to 822ed0a Compare February 8, 2026 11:01
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.

Convert @sentry/ember addon to V2 addon format

1 participant