@sentry/browser 8.54.0 → 9.0.0-alpha.1

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.
Files changed (154) hide show
  1. package/LICENSE +1 -1
  2. package/build/npm/cjs/client.js +36 -28
  3. package/build/npm/cjs/client.js.map +1 -1
  4. package/build/npm/cjs/debug-build.js +1 -1
  5. package/build/npm/cjs/eventbuilder.js +8 -8
  6. package/build/npm/cjs/eventbuilder.js.map +1 -1
  7. package/build/npm/cjs/feedbackAsync.js +1 -1
  8. package/build/npm/cjs/feedbackSync.js +1 -1
  9. package/build/npm/cjs/helpers.js +3 -3
  10. package/build/npm/cjs/helpers.js.map +1 -1
  11. package/build/npm/cjs/index.js +1 -8
  12. package/build/npm/cjs/index.js.map +1 -1
  13. package/build/npm/cjs/integrations/breadcrumbs.js +15 -10
  14. package/build/npm/cjs/integrations/breadcrumbs.js.map +1 -1
  15. package/build/npm/cjs/integrations/browserapierrors.js +4 -5
  16. package/build/npm/cjs/integrations/browserapierrors.js.map +1 -1
  17. package/build/npm/cjs/integrations/browsersession.js +1 -1
  18. package/build/npm/cjs/integrations/contextlines.js +4 -4
  19. package/build/npm/cjs/integrations/contextlines.js.map +1 -1
  20. package/build/npm/cjs/integrations/featureFlags/featureFlagsIntegration.js +1 -1
  21. package/build/npm/cjs/integrations/featureFlags/launchdarkly/integration.js +1 -1
  22. package/build/npm/cjs/integrations/featureFlags/openfeature/integration.js +1 -1
  23. package/build/npm/cjs/integrations/featureFlags/unleash/integration.js +1 -1
  24. package/build/npm/cjs/integrations/globalhandlers.js +3 -3
  25. package/build/npm/cjs/integrations/globalhandlers.js.map +1 -1
  26. package/build/npm/cjs/integrations/httpclient.js +4 -4
  27. package/build/npm/cjs/integrations/httpclient.js.map +1 -1
  28. package/build/npm/cjs/integrations/httpcontext.js +8 -4
  29. package/build/npm/cjs/integrations/httpcontext.js.map +1 -1
  30. package/build/npm/cjs/integrations/linkederrors.js +1 -1
  31. package/build/npm/cjs/integrations/reportingobserver.js +1 -1
  32. package/build/npm/cjs/integrations/spotlight.js +2 -2
  33. package/build/npm/cjs/integrations/spotlight.js.map +1 -1
  34. package/build/npm/cjs/profiling/integration.js +5 -5
  35. package/build/npm/cjs/profiling/integration.js.map +1 -1
  36. package/build/npm/cjs/profiling/startProfileForSpan.js +1 -1
  37. package/build/npm/cjs/profiling/utils.js +16 -16
  38. package/build/npm/cjs/profiling/utils.js.map +1 -1
  39. package/build/npm/cjs/sdk.js +30 -43
  40. package/build/npm/cjs/sdk.js.map +1 -1
  41. package/build/npm/cjs/stack-parsers.js +1 -1
  42. package/build/npm/cjs/stack-parsers.js.map +1 -1
  43. package/build/npm/cjs/tracing/backgroundtab.js +2 -2
  44. package/build/npm/cjs/tracing/backgroundtab.js.map +1 -1
  45. package/build/npm/cjs/tracing/browserTracingIntegration.js +68 -56
  46. package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
  47. package/build/npm/cjs/tracing/request.js +7 -7
  48. package/build/npm/cjs/tracing/request.js.map +1 -1
  49. package/build/npm/cjs/transports/fetch.js +2 -2
  50. package/build/npm/cjs/transports/fetch.js.map +1 -1
  51. package/build/npm/cjs/transports/offline.js +1 -1
  52. package/build/npm/cjs/userfeedback.js +7 -8
  53. package/build/npm/cjs/userfeedback.js.map +1 -1
  54. package/build/npm/cjs/utils/featureFlags.js +1 -1
  55. package/build/npm/cjs/utils/featureFlags.js.map +1 -1
  56. package/build/npm/cjs/utils/lazyLoadIntegration.js +5 -8
  57. package/build/npm/cjs/utils/lazyLoadIntegration.js.map +1 -1
  58. package/build/npm/esm/client.js +36 -28
  59. package/build/npm/esm/client.js.map +1 -1
  60. package/build/npm/esm/eventbuilder.js +7 -7
  61. package/build/npm/esm/eventbuilder.js.map +1 -1
  62. package/build/npm/esm/helpers.js +2 -2
  63. package/build/npm/esm/helpers.js.map +1 -1
  64. package/build/npm/esm/index.js +2 -3
  65. package/build/npm/esm/index.js.map +1 -1
  66. package/build/npm/esm/integrations/breadcrumbs.js +14 -9
  67. package/build/npm/esm/integrations/breadcrumbs.js.map +1 -1
  68. package/build/npm/esm/integrations/browserapierrors.js +3 -4
  69. package/build/npm/esm/integrations/browserapierrors.js.map +1 -1
  70. package/build/npm/esm/integrations/contextlines.js +3 -3
  71. package/build/npm/esm/integrations/contextlines.js.map +1 -1
  72. package/build/npm/esm/integrations/globalhandlers.js +2 -2
  73. package/build/npm/esm/integrations/globalhandlers.js.map +1 -1
  74. package/build/npm/esm/integrations/httpclient.js +3 -3
  75. package/build/npm/esm/integrations/httpclient.js.map +1 -1
  76. package/build/npm/esm/integrations/httpcontext.js +8 -4
  77. package/build/npm/esm/integrations/httpcontext.js.map +1 -1
  78. package/build/npm/esm/integrations/spotlight.js +1 -1
  79. package/build/npm/esm/integrations/spotlight.js.map +1 -1
  80. package/build/npm/esm/package.json +1 -1
  81. package/build/npm/esm/profiling/integration.js +4 -4
  82. package/build/npm/esm/profiling/integration.js.map +1 -1
  83. package/build/npm/esm/profiling/utils.js +15 -15
  84. package/build/npm/esm/profiling/utils.js.map +1 -1
  85. package/build/npm/esm/sdk.js +30 -43
  86. package/build/npm/esm/sdk.js.map +1 -1
  87. package/build/npm/esm/stack-parsers.js.map +1 -1
  88. package/build/npm/esm/tracing/backgroundtab.js +1 -1
  89. package/build/npm/esm/tracing/backgroundtab.js.map +1 -1
  90. package/build/npm/esm/tracing/browserTracingIntegration.js +68 -56
  91. package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
  92. package/build/npm/esm/tracing/request.js +7 -7
  93. package/build/npm/esm/tracing/request.js.map +1 -1
  94. package/build/npm/esm/transports/fetch.js +1 -1
  95. package/build/npm/esm/transports/fetch.js.map +1 -1
  96. package/build/npm/esm/userfeedback.js +6 -7
  97. package/build/npm/esm/userfeedback.js.map +1 -1
  98. package/build/npm/esm/utils/featureFlags.js.map +1 -1
  99. package/build/npm/esm/utils/lazyLoadIntegration.js +4 -7
  100. package/build/npm/esm/utils/lazyLoadIntegration.js.map +1 -1
  101. package/build/npm/types/client.d.ts +4 -10
  102. package/build/npm/types/client.d.ts.map +1 -1
  103. package/build/npm/types/exports.d.ts +3 -4
  104. package/build/npm/types/exports.d.ts.map +1 -1
  105. package/build/npm/types/helpers.d.ts +26 -1
  106. package/build/npm/types/helpers.d.ts.map +1 -1
  107. package/build/npm/types/index.bundle.d.ts +2 -2
  108. package/build/npm/types/index.bundle.d.ts.map +1 -1
  109. package/build/npm/types/index.bundle.feedback.d.ts +2 -2
  110. package/build/npm/types/index.bundle.feedback.d.ts.map +1 -1
  111. package/build/npm/types/index.bundle.replay.d.ts +2 -2
  112. package/build/npm/types/index.bundle.replay.d.ts.map +1 -1
  113. package/build/npm/types/index.bundle.tracing.d.ts +0 -1
  114. package/build/npm/types/index.bundle.tracing.d.ts.map +1 -1
  115. package/build/npm/types/index.bundle.tracing.replay.d.ts +0 -1
  116. package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -1
  117. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +0 -1
  118. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -1
  119. package/build/npm/types/index.d.ts +2 -3
  120. package/build/npm/types/index.d.ts.map +1 -1
  121. package/build/npm/types/integrations/httpcontext.d.ts.map +1 -1
  122. package/build/npm/types/integrations-bundle/index.debug.d.ts +0 -1
  123. package/build/npm/types/integrations-bundle/index.debug.d.ts.map +1 -1
  124. package/build/npm/types/sdk.d.ts +4 -36
  125. package/build/npm/types/sdk.d.ts.map +1 -1
  126. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  127. package/build/npm/types/tracing/request.d.ts.map +1 -1
  128. package/build/npm/types/userfeedback.d.ts.map +1 -1
  129. package/build/npm/types/utils/lazyLoadIntegration.d.ts +0 -2
  130. package/build/npm/types/utils/lazyLoadIntegration.d.ts.map +1 -1
  131. package/build/npm/types-ts3.8/client.d.ts +4 -10
  132. package/build/npm/types-ts3.8/exports.d.ts +3 -4
  133. package/build/npm/types-ts3.8/helpers.d.ts +26 -1
  134. package/build/npm/types-ts3.8/index.bundle.d.ts +2 -2
  135. package/build/npm/types-ts3.8/index.bundle.feedback.d.ts +2 -2
  136. package/build/npm/types-ts3.8/index.bundle.replay.d.ts +2 -2
  137. package/build/npm/types-ts3.8/index.bundle.tracing.d.ts +0 -1
  138. package/build/npm/types-ts3.8/index.bundle.tracing.replay.d.ts +0 -1
  139. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +0 -1
  140. package/build/npm/types-ts3.8/index.d.ts +2 -3
  141. package/build/npm/types-ts3.8/integrations-bundle/index.debug.d.ts +0 -1
  142. package/build/npm/types-ts3.8/sdk.d.ts +4 -36
  143. package/build/npm/types-ts3.8/utils/lazyLoadIntegration.d.ts +0 -2
  144. package/package.json +9 -9
  145. package/build/npm/cjs/metrics.js +0 -79
  146. package/build/npm/cjs/metrics.js.map +0 -1
  147. package/build/npm/esm/metrics.js +0 -77
  148. package/build/npm/esm/metrics.js.map +0 -1
  149. package/build/npm/types/integrations-bundle/index.sessiontiming.d.ts +0 -2
  150. package/build/npm/types/integrations-bundle/index.sessiontiming.d.ts.map +0 -1
  151. package/build/npm/types/metrics.d.ts +0 -8
  152. package/build/npm/types/metrics.d.ts.map +0 -1
  153. package/build/npm/types-ts3.8/integrations-bundle/index.sessiontiming.d.ts +0 -2
  154. package/build/npm/types-ts3.8/metrics.d.ts +0 -8
@@ -1,5 +1,5 @@
1
- import { browserTracingIntegrationShim, feedbackIntegrationShim, metricsShim } from '@sentry-internal/integration-shims';
1
+ import { browserTracingIntegrationShim, feedbackIntegrationShim } from '@sentry-internal/integration-shims';
2
2
  export * from './index.bundle.base';
3
3
  export { replayIntegration, getReplay } from '@sentry-internal/replay';
4
- export { browserTracingIntegrationShim as browserTracingIntegration, feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration, metricsShim as metrics, };
4
+ export { browserTracingIntegrationShim as browserTracingIntegration, feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration, };
5
5
  //# sourceMappingURL=index.bundle.replay.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims';
2
2
  export * from './index.bundle.base';
3
- export * from './metrics';
4
3
  export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement, } from '@sentry/core';
5
4
  export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
6
5
  export { feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration, replayIntegrationShim as replayIntegration, };
@@ -1,5 +1,4 @@
1
1
  export * from './index.bundle.base';
2
- export * from './metrics';
3
2
  export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement, } from '@sentry/core';
4
3
  export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
5
4
  import { feedbackIntegrationShim } from '@sentry-internal/integration-shims';
@@ -1,5 +1,4 @@
1
1
  export * from './index.bundle.base';
2
- export * from './metrics';
3
2
  export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement, captureFeedback, } from '@sentry/core';
4
3
  export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
5
4
  import { feedbackAsyncIntegration } from './feedbackAsync';
@@ -2,7 +2,7 @@ export * from './exports';
2
2
  export { reportingObserverIntegration } from './integrations/reportingobserver';
3
3
  export { httpClientIntegration } from './integrations/httpclient';
4
4
  export { contextLinesIntegration } from './integrations/contextlines';
5
- export { captureConsoleIntegration, debugIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, captureFeedback, } from '@sentry/core';
5
+ export { captureConsoleIntegration, extraErrorDataIntegration, rewriteFramesIntegration, captureFeedback, } from '@sentry/core';
6
6
  export { replayIntegration, getReplay } from '@sentry-internal/replay';
7
7
  export { ReplayEventType, ReplayEventWithTime, ReplayBreadcrumbFrame, ReplayBreadcrumbFrameEvent, ReplayOptionFrameEvent, ReplayFrame, ReplayFrameEvent, ReplaySpanFrame, ReplaySpanFrameEvent, } from '@sentry-internal/replay';
8
8
  export { replayCanvasIntegration } from '@sentry-internal/replay-canvas';
@@ -10,11 +10,10 @@ import { feedbackAsyncIntegration } from './feedbackAsync';
10
10
  import { feedbackSyncIntegration } from './feedbackSync';
11
11
  export { feedbackAsyncIntegration, feedbackSyncIntegration, feedbackSyncIntegration as feedbackIntegration };
12
12
  export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
13
- export * from './metrics';
14
13
  export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './tracing/request';
15
14
  export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
16
15
  export { RequestInstrumentationOptions } from './tracing/request';
17
- export { addTracingExtensions, registerSpanErrorInstrumentation, getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, startNewTrace, getSpanDescendants, setMeasurement, getSpanStatusFromHttpCode, setHttpStatus, makeMultiplexedTransport, moduleMetadataIntegration, zodErrorsIntegration, thirdPartyErrorFilterIntegration, } from '@sentry/core';
16
+ export { registerSpanErrorInstrumentation, getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, startNewTrace, getSpanDescendants, setMeasurement, getSpanStatusFromHttpCode, setHttpStatus, makeMultiplexedTransport, moduleMetadataIntegration, zodErrorsIntegration, thirdPartyErrorFilterIntegration, } from '@sentry/core';
18
17
  export { Span } from '@sentry/core';
19
18
  export { makeBrowserOfflineTransport } from './transports/offline';
20
19
  export { browserProfilingIntegration } from './profiling/integration';
@@ -1,3 +1,2 @@
1
- export { debugIntegration } from '@sentry/core';
2
1
  export { spotlightBrowserIntegration } from '../integrations/spotlight';
3
2
  //# sourceMappingURL=index.debug.d.ts.map
@@ -1,7 +1,9 @@
1
- import { Client, DsnLike, Integration, Options, UserFeedback } from '@sentry/core';
1
+ import { Client, Integration, Options, ReportDialogOptions } from '@sentry/core';
2
2
  import { BrowserOptions } from './client';
3
3
  /** Get the default integrations for the browser SDK. */
4
- export declare function getDefaultIntegrations(options: Options): Integration[];
4
+ export declare function getDefaultIntegrations(_options: Options): Integration[];
5
+ /** Exported only for tests. */
6
+ export declare function applyDefaultOptions(optionsArg?: BrowserOptions): BrowserOptions;
5
7
  /**
6
8
  * The Sentry Browser SDK Client.
7
9
  *
@@ -49,34 +51,6 @@ export declare function getDefaultIntegrations(options: Options): Integration[];
49
51
  * @see {@link BrowserOptions} for documentation on configuration options.
50
52
  */
51
53
  export declare function init(browserOptions?: BrowserOptions): Client | undefined;
52
- /**
53
- * All properties the report dialog supports
54
- */
55
- export interface ReportDialogOptions {
56
- [key: string]: any;
57
- eventId?: string;
58
- dsn?: DsnLike;
59
- user?: {
60
- email?: string;
61
- name?: string;
62
- };
63
- lang?: string;
64
- title?: string;
65
- subtitle?: string;
66
- subtitle2?: string;
67
- labelName?: string;
68
- labelEmail?: string;
69
- labelComments?: string;
70
- labelClose?: string;
71
- labelSubmit?: string;
72
- errorGeneric?: string;
73
- errorFormEntry?: string;
74
- successMessage?: string;
75
- /** Callback after reportDialog showed up */
76
- onLoad?(this: void): void;
77
- /** Callback after reportDialog closed */
78
- onClose?(this: void): void;
79
- }
80
54
  /**
81
55
  * Present the user with a report dialog.
82
56
  *
@@ -93,10 +67,4 @@ export declare function forceLoad(): void;
93
67
  * @hidden
94
68
  */
95
69
  export declare function onLoad(callback: () => void): void;
96
- /**
97
- * Captures user feedback and sends it to Sentry.
98
- *
99
- * @deprecated Use `captureFeedback` instead.
100
- */
101
- export declare function captureUserFeedback(feedback: UserFeedback): void;
102
70
  //# sourceMappingURL=sdk.d.ts.map
@@ -8,13 +8,11 @@ declare const LazyLoadableIntegrations: {
8
8
  readonly captureConsoleIntegration: "captureconsole";
9
9
  readonly contextLinesIntegration: "contextlines";
10
10
  readonly linkedErrorsIntegration: "linkederrors";
11
- readonly debugIntegration: "debug";
12
11
  readonly dedupeIntegration: "dedupe";
13
12
  readonly extraErrorDataIntegration: "extraerrordata";
14
13
  readonly httpClientIntegration: "httpclient";
15
14
  readonly reportingObserverIntegration: "reportingobserver";
16
15
  readonly rewriteFramesIntegration: "rewriteframes";
17
- readonly sessionTimingIntegration: "sessiontiming";
18
16
  readonly browserProfilingIntegration: "browserprofiling";
19
17
  readonly moduleMetadataIntegration: "modulemetadata";
20
18
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sentry/browser",
3
- "version": "8.54.0",
3
+ "version": "9.0.0-alpha.1",
4
4
  "description": "Official Sentry SDK for browsers",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
7
7
  "author": "Sentry",
8
8
  "license": "MIT",
9
9
  "engines": {
10
- "node": ">=14.18"
10
+ "node": ">=18"
11
11
  },
12
12
  "files": [
13
13
  "/build/npm"
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "typesVersions": {
32
- "<4.9": {
32
+ "<5.0": {
33
33
  "build/npm/types/index.d.ts": [
34
34
  "build/npm/types-ts3.8/index.d.ts"
35
35
  ]
@@ -39,14 +39,14 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@sentry-internal/browser-utils": "8.54.0",
43
- "@sentry-internal/feedback": "8.54.0",
44
- "@sentry-internal/replay": "8.54.0",
45
- "@sentry-internal/replay-canvas": "8.54.0",
46
- "@sentry/core": "8.54.0"
42
+ "@sentry-internal/browser-utils": "9.0.0-alpha.1",
43
+ "@sentry-internal/feedback": "9.0.0-alpha.1",
44
+ "@sentry-internal/replay": "9.0.0-alpha.1",
45
+ "@sentry-internal/replay-canvas": "9.0.0-alpha.1",
46
+ "@sentry/core": "9.0.0-alpha.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@sentry-internal/integration-shims": "8.54.0",
49
+ "@sentry-internal/integration-shims": "9.0.0-alpha.1",
50
50
  "fake-indexeddb": "^4.0.1"
51
51
  },
52
52
  "scripts": {
@@ -1,79 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
-
3
- const core = require('@sentry/core');
4
-
5
- /**
6
- * Adds a value to a counter metric
7
- *
8
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
9
- */
10
- function increment(name, value = 1, data) {
11
- // eslint-disable-next-line deprecation/deprecation
12
- core.metrics.increment(core.BrowserMetricsAggregator, name, value, data);
13
- }
14
-
15
- /**
16
- * Adds a value to a distribution metric
17
- *
18
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
19
- */
20
- function distribution(name, value, data) {
21
- // eslint-disable-next-line deprecation/deprecation
22
- core.metrics.distribution(core.BrowserMetricsAggregator, name, value, data);
23
- }
24
-
25
- /**
26
- * Adds a value to a set metric. Value must be a string or integer.
27
- *
28
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
29
- */
30
- function set(name, value, data) {
31
- // eslint-disable-next-line deprecation/deprecation
32
- core.metrics.set(core.BrowserMetricsAggregator, name, value, data);
33
- }
34
-
35
- /**
36
- * Adds a value to a gauge metric
37
- *
38
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
39
- */
40
- function gauge(name, value, data) {
41
- // eslint-disable-next-line deprecation/deprecation
42
- core.metrics.gauge(core.BrowserMetricsAggregator, name, value, data);
43
- }
44
-
45
- /**
46
- * Adds a timing metric.
47
- * The metric is added as a distribution metric.
48
- *
49
- * You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
50
- * In the latter case, the duration of the callback execution will be captured as a span & a metric.
51
- *
52
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
53
- */
54
-
55
- function timing(
56
- name,
57
- value,
58
- unit = 'second',
59
- data,
60
- ) {
61
- // eslint-disable-next-line deprecation/deprecation
62
- return core.metrics.timing(core.BrowserMetricsAggregator, name, value, unit, data);
63
- }
64
-
65
- /**
66
- * The metrics API is used to capture custom metrics in Sentry.
67
- *
68
- * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.
69
- */
70
- const metrics = {
71
- increment,
72
- distribution,
73
- set,
74
- gauge,
75
- timing,
76
- };
77
-
78
- exports.metrics = metrics;
79
- //# sourceMappingURL=metrics.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metrics.js","sources":["../../../src/metrics.ts"],"sourcesContent":["import { BrowserMetricsAggregator, metrics as metricsCore } from '@sentry/core';\nimport type { DurationUnit, MetricData, Metrics } from '@sentry/core';\n\n/**\n * Adds a value to a counter metric\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction increment(name: string, value: number = 1, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.increment(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a value to a distribution metric\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction distribution(name: string, value: number, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.distribution(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a value to a set metric. Value must be a string or integer.\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction set(name: string, value: number | string, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.set(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a value to a gauge metric\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction gauge(name: string, value: number, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.gauge(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a timing metric.\n * The metric is added as a distribution metric.\n *\n * You can either directly capture a numeric `value`, or wrap a callback function in `timing`.\n * In the latter case, the duration of the callback execution will be captured as a span & a metric.\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction timing(name: string, value: number, unit?: DurationUnit, data?: Omit<MetricData, 'unit'>): void;\nfunction timing<T>(name: string, callback: () => T, unit?: DurationUnit, data?: Omit<MetricData, 'unit'>): T;\nfunction timing<T = void>(\n name: string,\n value: number | (() => T),\n unit: DurationUnit = 'second',\n data?: Omit<MetricData, 'unit'>,\n): T | void {\n // eslint-disable-next-line deprecation/deprecation\n return metricsCore.timing(BrowserMetricsAggregator, name, value, unit, data);\n}\n\n/**\n * The metrics API is used to capture custom metrics in Sentry.\n *\n * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.\n */\nexport const metrics: Metrics = {\n increment,\n distribution,\n set,\n gauge,\n timing,\n};\n"],"names":["metricsCore","BrowserMetricsAggregator"],"mappings":";;;;AAGA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS,CAAC,IAAI,EAAU,KAAK,GAAW,CAAC,EAAE,IAAI,EAAqB;AAC7E;AACA,EAAEA,YAAW,CAAC,SAAS,CAACC,6BAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,IAAI,EAAU,KAAK,EAAU,IAAI,EAAqB;AAC5E;AACA,EAAED,YAAW,CAAC,YAAY,CAACC,6BAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG,CAAC,IAAI,EAAU,KAAK,EAAmB,IAAI,EAAqB;AAC5E;AACA,EAAED,YAAW,CAAC,GAAG,CAACC,6BAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,KAAK,CAAC,IAAI,EAAU,KAAK,EAAU,IAAI,EAAqB;AACrE;AACA,EAAED,YAAW,CAAC,KAAK,CAACC,6BAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAAS,MAAM;AACf,EAAE,IAAI;AACN,EAAE,KAAK;AACP,EAAE,IAAI,GAAiB,QAAQ;AAC/B,EAAE,IAAI;AACN,EAAY;AACZ;AACA,EAAE,OAAOD,YAAW,CAAC,MAAM,CAACC,6BAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,OAAO,GAAY;AAChC,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,GAAG;AACL,EAAE,KAAK;AACP,EAAE,MAAM;AACR;;;;"}
@@ -1,77 +0,0 @@
1
- import { metrics as metrics$1, BrowserMetricsAggregator } from '@sentry/core';
2
-
3
- /**
4
- * Adds a value to a counter metric
5
- *
6
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
7
- */
8
- function increment(name, value = 1, data) {
9
- // eslint-disable-next-line deprecation/deprecation
10
- metrics$1.increment(BrowserMetricsAggregator, name, value, data);
11
- }
12
-
13
- /**
14
- * Adds a value to a distribution metric
15
- *
16
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
17
- */
18
- function distribution(name, value, data) {
19
- // eslint-disable-next-line deprecation/deprecation
20
- metrics$1.distribution(BrowserMetricsAggregator, name, value, data);
21
- }
22
-
23
- /**
24
- * Adds a value to a set metric. Value must be a string or integer.
25
- *
26
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
27
- */
28
- function set(name, value, data) {
29
- // eslint-disable-next-line deprecation/deprecation
30
- metrics$1.set(BrowserMetricsAggregator, name, value, data);
31
- }
32
-
33
- /**
34
- * Adds a value to a gauge metric
35
- *
36
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
37
- */
38
- function gauge(name, value, data) {
39
- // eslint-disable-next-line deprecation/deprecation
40
- metrics$1.gauge(BrowserMetricsAggregator, name, value, data);
41
- }
42
-
43
- /**
44
- * Adds a timing metric.
45
- * The metric is added as a distribution metric.
46
- *
47
- * You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
48
- * In the latter case, the duration of the callback execution will be captured as a span & a metric.
49
- *
50
- * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.
51
- */
52
-
53
- function timing(
54
- name,
55
- value,
56
- unit = 'second',
57
- data,
58
- ) {
59
- // eslint-disable-next-line deprecation/deprecation
60
- return metrics$1.timing(BrowserMetricsAggregator, name, value, unit, data);
61
- }
62
-
63
- /**
64
- * The metrics API is used to capture custom metrics in Sentry.
65
- *
66
- * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.
67
- */
68
- const metrics = {
69
- increment,
70
- distribution,
71
- set,
72
- gauge,
73
- timing,
74
- };
75
-
76
- export { metrics };
77
- //# sourceMappingURL=metrics.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metrics.js","sources":["../../../src/metrics.ts"],"sourcesContent":["import { BrowserMetricsAggregator, metrics as metricsCore } from '@sentry/core';\nimport type { DurationUnit, MetricData, Metrics } from '@sentry/core';\n\n/**\n * Adds a value to a counter metric\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction increment(name: string, value: number = 1, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.increment(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a value to a distribution metric\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction distribution(name: string, value: number, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.distribution(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a value to a set metric. Value must be a string or integer.\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction set(name: string, value: number | string, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.set(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a value to a gauge metric\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction gauge(name: string, value: number, data?: MetricData): void {\n // eslint-disable-next-line deprecation/deprecation\n metricsCore.gauge(BrowserMetricsAggregator, name, value, data);\n}\n\n/**\n * Adds a timing metric.\n * The metric is added as a distribution metric.\n *\n * You can either directly capture a numeric `value`, or wrap a callback function in `timing`.\n * In the latter case, the duration of the callback execution will be captured as a span & a metric.\n *\n * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release.\n */\nfunction timing(name: string, value: number, unit?: DurationUnit, data?: Omit<MetricData, 'unit'>): void;\nfunction timing<T>(name: string, callback: () => T, unit?: DurationUnit, data?: Omit<MetricData, 'unit'>): T;\nfunction timing<T = void>(\n name: string,\n value: number | (() => T),\n unit: DurationUnit = 'second',\n data?: Omit<MetricData, 'unit'>,\n): T | void {\n // eslint-disable-next-line deprecation/deprecation\n return metricsCore.timing(BrowserMetricsAggregator, name, value, unit, data);\n}\n\n/**\n * The metrics API is used to capture custom metrics in Sentry.\n *\n * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.\n */\nexport const metrics: Metrics = {\n increment,\n distribution,\n set,\n gauge,\n timing,\n};\n"],"names":["metricsCore"],"mappings":";;AAGA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS,CAAC,IAAI,EAAU,KAAK,GAAW,CAAC,EAAE,IAAI,EAAqB;AAC7E;AACA,EAAEA,SAAW,CAAC,SAAS,CAAC,wBAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,IAAI,EAAU,KAAK,EAAU,IAAI,EAAqB;AAC5E;AACA,EAAEA,SAAW,CAAC,YAAY,CAAC,wBAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG,CAAC,IAAI,EAAU,KAAK,EAAmB,IAAI,EAAqB;AAC5E;AACA,EAAEA,SAAW,CAAC,GAAG,CAAC,wBAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,KAAK,CAAC,IAAI,EAAU,KAAK,EAAU,IAAI,EAAqB;AACrE;AACA,EAAEA,SAAW,CAAC,KAAK,CAAC,wBAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAAS,MAAM;AACf,EAAE,IAAI;AACN,EAAE,KAAK;AACP,EAAE,IAAI,GAAiB,QAAQ;AAC/B,EAAE,IAAI;AACN,EAAY;AACZ;AACA,EAAE,OAAOA,SAAW,CAAC,MAAM,CAAC,wBAAwB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,OAAO,GAAY;AAChC,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,GAAG;AACL,EAAE,KAAK;AACP,EAAE,MAAM;AACR;;;;"}
@@ -1,2 +0,0 @@
1
- export { sessionTimingIntegration } from '@sentry/core';
2
- //# sourceMappingURL=index.sessiontiming.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.sessiontiming.d.ts","sourceRoot":"","sources":["../../../../src/integrations-bundle/index.sessiontiming.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { Metrics } from '@sentry/core';
2
- /**
3
- * The metrics API is used to capture custom metrics in Sentry.
4
- *
5
- * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.
6
- */
7
- export declare const metrics: Metrics;
8
- //# sourceMappingURL=metrics.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/metrics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA4B,OAAO,EAAE,MAAM,cAAc,CAAC;AA+DtE;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,OAMrB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { sessionTimingIntegration } from '@sentry/core';
2
- //# sourceMappingURL=index.sessiontiming.d.ts.map
@@ -1,8 +0,0 @@
1
- import { Metrics } from '@sentry/core';
2
- /**
3
- * The metrics API is used to capture custom metrics in Sentry.
4
- *
5
- * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.
6
- */
7
- export declare const metrics: Metrics;
8
- //# sourceMappingURL=metrics.d.ts.map