@sentry/ember 11.0.0-alpha.1 → 11.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -115
- package/addon-main.cjs +4 -0
- package/declarations/index.d.ts +10 -0
- package/declarations/index.d.ts.map +1 -0
- package/declarations/init.d.ts +23 -0
- package/declarations/init.d.ts.map +1 -0
- package/{utils → declarations/utils}/browserTracingIntegration.d.ts +7 -2
- package/declarations/utils/browserTracingIntegration.d.ts.map +1 -0
- package/{utils → declarations/utils}/instrumentEmberAppInstanceForPerformance.d.ts +11 -3
- package/declarations/utils/instrumentEmberAppInstanceForPerformance.d.ts.map +1 -0
- package/{utils → declarations/utils}/instrumentEmberGlobals.d.ts +1 -0
- package/declarations/utils/instrumentEmberGlobals.d.ts.map +1 -0
- package/declarations/utils/instrumentRoutePerformance.d.ts +28 -0
- package/declarations/utils/instrumentRoutePerformance.d.ts.map +1 -0
- package/declarations/utils/utils.d.ts +7 -0
- package/declarations/utils/utils.d.ts.map +1 -0
- package/dist/index.js +568 -0
- package/dist/index.js.map +1 -0
- package/package.json +74 -71
- package/src/index.ts +13 -0
- package/src/init.ts +32 -0
- package/{addon → src}/utils/browserTracingIntegration.ts +40 -30
- package/{addon → src}/utils/instrumentEmberAppInstanceForPerformance.ts +180 -141
- package/{addon → src}/utils/instrumentEmberGlobals.ts +17 -16
- package/src/utils/instrumentRoutePerformance.ts +79 -0
- package/src/utils/utils.ts +25 -0
- package/.oxlintrc.json +0 -13
- package/LICENSE +0 -21
- package/addon/index.ts +0 -117
- package/addon/instance-initializers/sentry-performance.ts +0 -23
- package/addon/runloop.d.ts +0 -19
- package/addon/types.ts +0 -39
- package/addon/utils/performance.ts +0 -80
- package/app/instance-initializers/sentry-performance.js +0 -1
- package/config/environment.js +0 -5
- package/index.d.ts +0 -14
- package/index.js +0 -115
- package/instance-initializers/sentry-performance.d.ts +0 -7
- package/runloop.d.ts +0 -19
- package/tsconfig.json +0 -25
- package/types/dummy/index.d.ts +0 -0
- package/types/global.d.ts +0 -15
- package/types.d.ts +0 -36
- package/utils/performance.d.ts +0 -9
- package/vendor/initial-load-body.js +0 -3
- package/vendor/initial-load-head.js +0 -3
package/README.md
CHANGED
|
@@ -6,53 +6,43 @@
|
|
|
6
6
|
|
|
7
7
|
# Official Sentry SDK for Ember.js
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## General
|
|
14
|
-
|
|
15
|
-
This package is an Ember addon that wraps `@sentry/browser`, with added functionality related to Ember. All methods
|
|
16
|
-
available in `@sentry/browser` can be imported from `@sentry/ember`.
|
|
9
|
+
[](https://www.npmjs.com/package/@sentry/ember)
|
|
10
|
+
[](https://www.npmjs.com/package/@sentry/ember)
|
|
11
|
+
[](https://www.npmjs.com/package/@sentry/ember)
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
This SDK is a v2 Ember addon that provides error tracking and performance monitoring for Ember.js applications.
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
## Requirements
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
- Ember.js 4.0+
|
|
18
|
+
- Node.js 20.19.0+
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
import * as Sentry from "@sentry/ember";
|
|
20
|
+
## Installation
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
tracesSampleRate: 1.0,
|
|
34
|
-
});
|
|
22
|
+
```bash
|
|
23
|
+
npm install @sentry/ember
|
|
24
|
+
# or
|
|
25
|
+
yarn add @sentry/ember
|
|
26
|
+
# or
|
|
27
|
+
pnpm add @sentry/ember
|
|
35
28
|
```
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
## Basic Setup
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
capture information while your app is starting. Any additional SDK settings can be modified via the usual config in
|
|
41
|
-
`environment.js` for you, see the Additional Configuration section for more details.
|
|
32
|
+
Initialize Sentry early in your application, typically in `app/app.ts` or `app/app.js`:
|
|
42
33
|
|
|
43
|
-
```
|
|
34
|
+
```typescript
|
|
44
35
|
import Application from '@ember/application';
|
|
45
36
|
import Resolver from 'ember-resolver';
|
|
46
37
|
import loadInitializers from 'ember-load-initializers';
|
|
47
|
-
import config from '
|
|
48
|
-
import * as Sentry from
|
|
38
|
+
import config from 'my-app/config/environment';
|
|
39
|
+
import * as Sentry from '@sentry/ember';
|
|
49
40
|
|
|
41
|
+
// Initialize Sentry before the application
|
|
50
42
|
Sentry.init({
|
|
51
|
-
dsn: '
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
// of transactions for performance monitoring.
|
|
55
|
-
// We recommend adjusting this value in production,
|
|
43
|
+
dsn: '__YOUR_DSN__',
|
|
44
|
+
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
|
|
45
|
+
// We recommend adjusting this value in production
|
|
56
46
|
tracesSampleRate: 1.0,
|
|
57
47
|
});
|
|
58
48
|
|
|
@@ -61,126 +51,118 @@ export default class App extends Application {
|
|
|
61
51
|
podModulePrefix = config.podModulePrefix;
|
|
62
52
|
Resolver = Resolver;
|
|
63
53
|
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Additional Configuration
|
|
67
54
|
|
|
68
|
-
|
|
69
|
-
|
|
55
|
+
loadInitializers(App, config.modulePrefix);
|
|
56
|
+
```
|
|
70
57
|
|
|
71
|
-
|
|
72
|
-
ENV['@sentry/ember'] = {
|
|
73
|
-
// Will disable automatic instrumentation of performance.
|
|
74
|
-
// Manual instrumentation will still be sent.
|
|
75
|
-
disablePerformance: true,
|
|
58
|
+
## Performance Monitoring
|
|
76
59
|
|
|
77
|
-
|
|
78
|
-
minimumRunloopQueueDuration: 0,
|
|
60
|
+
For automatic performance instrumentation (page loads, navigation, runloop, components), create an instance-initializer:
|
|
79
61
|
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
```typescript
|
|
63
|
+
// app/instance-initializers/sentry-performance.ts
|
|
64
|
+
import type ApplicationInstance from '@ember/application/instance';
|
|
65
|
+
import { instrumentAppInstancePerformance } from '@sentry/ember';
|
|
82
66
|
|
|
83
|
-
|
|
84
|
-
|
|
67
|
+
export function initialize(appInstance: ApplicationInstance): void {
|
|
68
|
+
instrumentAppInstancePerformance(appInstance, optionalOptions);
|
|
69
|
+
}
|
|
85
70
|
|
|
86
|
-
|
|
87
|
-
|
|
71
|
+
export default {
|
|
72
|
+
initialize,
|
|
88
73
|
};
|
|
89
74
|
```
|
|
90
75
|
|
|
91
|
-
|
|
76
|
+
### Performance Options
|
|
92
77
|
|
|
93
|
-
|
|
94
|
-
|
|
78
|
+
| Option | Type | Default | Description |
|
|
79
|
+
| -------------------------------- | --------------------- | ---------- | ----------------------------------------- |
|
|
80
|
+
| `appInstance` | `ApplicationInstance` | _required_ | The Ember application instance |
|
|
81
|
+
| `disableRunloopPerformance` | `boolean` | `false` | Disable runloop queue tracking |
|
|
82
|
+
| `disableInstrumentComponents` | `boolean` | `false` | Disable component render tracking |
|
|
83
|
+
| `enableComponentDefinitions` | `boolean` | `false` | Enable component definition tracking |
|
|
84
|
+
| `minimumRunloopQueueDuration` | `number` | `5` | Minimum duration (ms) for runloop spans |
|
|
85
|
+
| `minimumComponentRenderDuration` | `number` | `2` | Minimum duration (ms) for component spans |
|
|
86
|
+
| `instrumentPageLoad` | `boolean` | `true` | Instrument page load spans |
|
|
87
|
+
| `instrumentNavigation` | `boolean` | `true` | Instrument navigation spans |
|
|
88
|
+
| `idleTimeout` | `number` | `1000` | Idle timeout (ms) for tracing |
|
|
95
89
|
|
|
96
|
-
|
|
97
|
-
ENV['@sentry/ember'] = {
|
|
98
|
-
disablePerformance: true, // Will disable automatic instrumentation of performance. Manual instrumentation will still be sent.
|
|
99
|
-
};
|
|
100
|
-
```
|
|
90
|
+
### Route Performance Instrumentation
|
|
101
91
|
|
|
102
|
-
|
|
92
|
+
To instrument individual routes with detailed lifecycle tracking, use the `instrumentRoutePerformance` decorator:
|
|
103
93
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
If you would like to capture `beforeModel`, `model`, `afterModel` and `setupController` times for one of your routes,
|
|
107
|
-
you can import `instrumentRoutePerformance` and wrap your route with it.
|
|
108
|
-
|
|
109
|
-
```javascript
|
|
94
|
+
```typescript
|
|
95
|
+
// app/routes/application.ts
|
|
110
96
|
import Route from '@ember/routing/route';
|
|
111
97
|
import { instrumentRoutePerformance } from '@sentry/ember';
|
|
112
98
|
|
|
113
|
-
class
|
|
114
|
-
model() {
|
|
115
|
-
|
|
99
|
+
class ApplicationRoute extends Route {
|
|
100
|
+
async model() {
|
|
101
|
+
return this.store.findAll('post');
|
|
116
102
|
}
|
|
117
103
|
}
|
|
118
104
|
|
|
119
|
-
export default instrumentRoutePerformance(
|
|
105
|
+
export default instrumentRoutePerformance(ApplicationRoute);
|
|
120
106
|
```
|
|
121
107
|
|
|
122
|
-
|
|
108
|
+
This wraps the route's `beforeModel`, `model`, `afterModel`, and `setupController` hooks with Sentry spans.
|
|
123
109
|
|
|
124
|
-
|
|
125
|
-
This helps (via the render queue) capturing the entire render in case component render times aren't fully instrumented,
|
|
126
|
-
such as when using glimmer components.
|
|
110
|
+
## API
|
|
127
111
|
|
|
128
|
-
|
|
112
|
+
This package re-exports everything from `@sentry/browser`, so you have access to the full Sentry Browser SDK API:
|
|
129
113
|
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
minimumRunloopQueueDuration: 0, // All runloop queue durations will be added as spans.
|
|
133
|
-
};
|
|
134
|
-
```
|
|
114
|
+
```typescript
|
|
115
|
+
import * as Sentry from '@sentry/ember';
|
|
135
116
|
|
|
136
|
-
|
|
117
|
+
// Capture an error
|
|
118
|
+
Sentry.captureException(new Error('Something went wrong'));
|
|
137
119
|
|
|
138
|
-
|
|
120
|
+
// Capture a message
|
|
121
|
+
Sentry.captureMessage('Something happened');
|
|
139
122
|
|
|
140
|
-
|
|
123
|
+
// Set user context
|
|
124
|
+
Sentry.setUser({ id: '123', email: 'user@example.com' });
|
|
141
125
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
126
|
+
// Add breadcrumb
|
|
127
|
+
Sentry.addBreadcrumb({
|
|
128
|
+
category: 'ui.click',
|
|
129
|
+
message: 'User clicked button',
|
|
130
|
+
level: 'info',
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// Create a span
|
|
134
|
+
Sentry.startSpan({ name: 'my-operation', op: 'task' }, () => {
|
|
135
|
+
// ... do work
|
|
136
|
+
});
|
|
146
137
|
```
|
|
147
138
|
|
|
148
|
-
|
|
149
|
-
would like to change this threshold, add the following to your config:
|
|
139
|
+
## Migration from v1 Addon
|
|
150
140
|
|
|
151
|
-
|
|
152
|
-
ENV['@sentry/ember'] = {
|
|
153
|
-
minimumComponentRenderDuration: 0, // All (non-glimmer) component render durations will be added as spans.
|
|
154
|
-
};
|
|
155
|
-
```
|
|
141
|
+
If you're upgrading from an older version of `@sentry/ember` (v1 addon format), here are the key changes:
|
|
156
142
|
|
|
157
|
-
|
|
143
|
+
### What Changed
|
|
158
144
|
|
|
159
|
-
|
|
160
|
-
optionally enable a setting to show component definitions (which will indicate which components are being rendered) be
|
|
161
|
-
adding the following to your config:
|
|
145
|
+
1. **No automatic instance initializer**: You must now explicitly set up performance instrumentation by creating an instance-initializer that calls `instrumentAppInstancePerformance(appInstance)`.
|
|
162
146
|
|
|
163
|
-
|
|
164
|
-
ENV['@sentry/ember'] = {
|
|
165
|
-
enableComponentDefinition: true, // All component definitions will be added as spans.
|
|
166
|
-
};
|
|
167
|
-
```
|
|
147
|
+
2. **No `contentFor` hooks**: The addon no longer injects scripts via `contentFor`.
|
|
168
148
|
|
|
169
|
-
|
|
149
|
+
3. **No environment config via `ENV['@sentry/ember']`**: Configure Sentry directly via `Sentry.init()` in your app.ts.
|
|
170
150
|
|
|
171
|
-
|
|
172
|
-
- **Node**: v14.18 or above
|
|
151
|
+
4. **Simpler dependency tree**: The v2 addon format has fewer dependencies and works better with modern build tools like Vite and Embroider.
|
|
173
152
|
|
|
174
|
-
###
|
|
153
|
+
### Migration Steps
|
|
175
154
|
|
|
176
|
-
|
|
177
|
-
this Ember addon to offer more Ember-specific error and performancing monitoring.
|
|
155
|
+
1. Update your `app/app.ts` to call `Sentry.init()` directly with your configuration.
|
|
178
156
|
|
|
179
|
-
|
|
157
|
+
2. Create `app/instance-initializers/sentry-performance.ts` to set up performance monitoring using `instrumentAppInstancePerformance`.
|
|
180
158
|
|
|
181
|
-
|
|
182
|
-
testing. To test with the dummy application, you must pass the dsn as an environment variable.
|
|
159
|
+
3. Remove any `@sentry/ember` configuration from `config/environment.js`.
|
|
183
160
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
161
|
+
## Links
|
|
162
|
+
|
|
163
|
+
- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/ember/)
|
|
164
|
+
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
MIT
|
package/addon-main.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @sentry/ember - Official Sentry SDK for Ember.js
|
|
3
|
+
*
|
|
4
|
+
* @see {@link https://docs.sentry.io/platforms/javascript/guides/ember/ Sentry Ember Documentation}
|
|
5
|
+
*/
|
|
6
|
+
export * from '@sentry/browser';
|
|
7
|
+
export { init } from './init.ts';
|
|
8
|
+
export { instrumentRoutePerformance } from './utils/instrumentRoutePerformance.ts';
|
|
9
|
+
export { browserTracingIntegration, instrumentAppInstancePerformance } from './utils/browserTracingIntegration.ts';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BrowserOptions } from '@sentry/browser';
|
|
2
|
+
import type { Client } from '@sentry/core';
|
|
3
|
+
/**
|
|
4
|
+
* Initialize the Sentry SDK for Ember.
|
|
5
|
+
*
|
|
6
|
+
* This should be called early in your application's startup, typically in app/app.ts
|
|
7
|
+
* before your Application class is defined.
|
|
8
|
+
*
|
|
9
|
+
* @param config - Sentry browser options
|
|
10
|
+
* @returns The Sentry client instance
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as Sentry from '@sentry/ember';
|
|
15
|
+
*
|
|
16
|
+
* Sentry.init({
|
|
17
|
+
* dsn: 'YOUR_DSN_HERE',
|
|
18
|
+
* tracesSampleRate: 1.0,
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function init(config?: BrowserOptions): Client | undefined;
|
|
23
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAMhE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { browserTracingIntegration as originalBrowserTracingIntegration } from '@sentry/browser';
|
|
2
|
-
import {
|
|
2
|
+
import type { Integration } from '@sentry/core';
|
|
3
3
|
import type ApplicationInstance from '@ember/application/instance';
|
|
4
4
|
type EmberBrowserTracingIntegrationOptions = Parameters<typeof originalBrowserTracingIntegration>[0] & {
|
|
5
|
-
appInstance
|
|
5
|
+
appInstance: ApplicationInstance;
|
|
6
6
|
disableRunloopPerformance?: boolean;
|
|
7
7
|
minimumRunloopQueueDuration?: number;
|
|
8
8
|
disableInstrumentComponents?: boolean;
|
|
@@ -11,4 +11,9 @@ type EmberBrowserTracingIntegrationOptions = Parameters<typeof originalBrowserTr
|
|
|
11
11
|
disableInitialLoadInstrumentation?: boolean;
|
|
12
12
|
};
|
|
13
13
|
export declare function browserTracingIntegration(options: EmberBrowserTracingIntegrationOptions): Integration;
|
|
14
|
+
/**
|
|
15
|
+
* Utility to simplify adding the browser tracing integration to an app instance.
|
|
16
|
+
*/
|
|
17
|
+
export declare function instrumentAppInstancePerformance(appInstance: ApplicationInstance, options?: Partial<Parameters<typeof browserTracingIntegration>[0]>): void;
|
|
14
18
|
export {};
|
|
19
|
+
//# sourceMappingURL=browserTracingIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../src/utils/browserTracingIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,IAAI,iCAAiC,EAG/D,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAKnE,KAAK,qCAAqC,GAAG,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,CAAC,CAAC,GAAG;IACrG,WAAW,EAAE,mBAAmB,CAAC;IACjC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC7C,CAAC;AAIF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qCAAqC,GAAG,WAAW,CAmDrG;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,mBAAmB,EAChC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,GACjE,IAAI,CAaN"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import type ApplicationInstance from '@ember/application/instance';
|
|
2
2
|
import type { startBrowserTracingNavigationSpan as startBrowserTracingNavigationSpanType, startBrowserTracingPageLoadSpan as startBrowserTracingPageLoadSpanType } from '@sentry/browser';
|
|
3
|
-
import type
|
|
4
|
-
|
|
3
|
+
import { type Client } from '@sentry/core';
|
|
4
|
+
interface EmberRouterMain {
|
|
5
|
+
location: {
|
|
6
|
+
formatURL?: (url: string) => string;
|
|
7
|
+
getURL?: () => string;
|
|
8
|
+
implementation?: string;
|
|
9
|
+
rootURL: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
5
12
|
export declare function instrumentEmberAppInstanceForPerformance(client: Client, appInstance: ApplicationInstance, config: {
|
|
6
13
|
disableRunloopPerformance?: boolean;
|
|
7
14
|
instrumentPageLoad?: boolean;
|
|
8
15
|
instrumentNavigation?: boolean;
|
|
9
16
|
}, startBrowserTracingPageLoadSpan: typeof startBrowserTracingPageLoadSpanType, startBrowserTracingNavigationSpan: typeof startBrowserTracingNavigationSpanType): void;
|
|
10
|
-
export declare function _getRouteUrlAttributes(url: string, params?: Record<string, unknown>, fullUrl?: string): Record<string, string>;
|
|
11
17
|
export declare function _getLocationURL(location: EmberRouterMain['location']): string;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=instrumentEmberAppInstanceForPerformance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentEmberAppInstanceForPerformance.d.ts","sourceRoot":"","sources":["../../src/utils/instrumentEmberAppInstanceForPerformance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAGnE,OAAO,KAAK,EACV,iCAAiC,IAAI,qCAAqC,EAC1E,+BAA+B,IAAI,mCAAmC,EACvE,MAAM,iBAAiB,CAAC;AAUzB,OAAO,EAOL,KAAK,MAAM,EAEZ,MAAM,cAAc,CAAC;AAGtB,UAAU,eAAe;IACvB,QAAQ,EAAE;QACR,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;QACpC,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAID,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,mBAAmB,EAChC,MAAM,EAAE;IAAE,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAE,EAC7G,+BAA+B,EAAE,OAAO,mCAAmC,EAC3E,iCAAiC,EAAE,OAAO,qCAAqC,GAC9E,IAAI,CAyIN;AA+ED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,GAAG,MAAM,CAW7E"}
|
|
@@ -19,3 +19,4 @@ export declare function instrumentGlobalsForPerformance(config: {
|
|
|
19
19
|
export declare function _processComponentRenderBefore(payload: Payload, beforeEntries: RenderEntries): void;
|
|
20
20
|
export declare function _processComponentRenderAfter(payload: Payload, beforeEntries: RenderEntries, op: string, minComponentDuration: number): void;
|
|
21
21
|
export {};
|
|
22
|
+
//# sourceMappingURL=instrumentEmberGlobals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentEmberGlobals.d.ts","sourceRoot":"","sources":["../../src/utils/instrumentEmberGlobals.ts"],"names":[],"mappings":"AAYA,KAAK,OAAO,GAAG;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE1D,2DAA2D;AAC3D,wBAAgB,+BAA+B,CAAC,MAAM,EAAE;IACtD,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC7C,GAAG,IAAI,CAwBP;AAwED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,GAAG,IAAI,CAElG;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,EAAE,EAAE,MAAM,EACV,oBAAoB,EAAE,MAAM,GAC3B,IAAI,CA4BN"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type Route from '@ember/routing/route';
|
|
2
|
+
type RouteConstructor = new (...args: ConstructorParameters<typeof Route>) => Route;
|
|
3
|
+
/**
|
|
4
|
+
* Enables monitoring the performance of an Ember app.
|
|
5
|
+
*
|
|
6
|
+
* This wraps the route's lifecycle hooks (beforeModel, model, afterModel, setupController)
|
|
7
|
+
* with Sentry spans to track their performance.
|
|
8
|
+
*
|
|
9
|
+
* @param BaseRoute - The Route class to instrument
|
|
10
|
+
* @returns The instrumented Route class
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import Route from '@ember/routing/route';
|
|
15
|
+
* import { instrumentRoutePerformance } from '@sentry/ember';
|
|
16
|
+
*
|
|
17
|
+
* class ApplicationRoute extends Route {
|
|
18
|
+
* async model() {
|
|
19
|
+
* return this.store.findAll('post');
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* export default instrumentRoutePerformance(ApplicationRoute);
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function instrumentRoutePerformance<T extends RouteConstructor>(BaseRoute: T): T;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=instrumentRoutePerformance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentRoutePerformance.d.ts","sourceRoot":"","sources":["../../src/utils/instrumentRoutePerformance.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAE9C,KAAK,gBAAgB,GAAG,KAAK,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,KAAK,CAAC,KAAK,KAAK,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,gBAAgB,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CA8CtF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface ExtendedBackburner {
|
|
2
|
+
on(eventName: string, callback: (...args: unknown[]) => void): void;
|
|
3
|
+
off(eventName: string, callback: (...args: unknown[]) => void): void;
|
|
4
|
+
}
|
|
5
|
+
export declare function getBackburner(): Pick<ExtendedBackburner, 'on' | 'off'>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAAG,IAAI,CAAC;IACpE,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAAG,IAAI,CAAC;CACtE;AAED,wBAAgB,aAAa,IAAI,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,KAAK,CAAC,CAiBtE"}
|