singularity-core 0.17.2 → 0.17.3
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.
|
@@ -61,11 +61,13 @@ export type SentryDataCollection = {
|
|
|
61
61
|
/**
|
|
62
62
|
* Options for `Sentry.init`, the same on the browser and the server. The app
|
|
63
63
|
* adds what is its own: the browser's `tunnel` and integrations.
|
|
64
|
+
* `environment` and `release` are only present when the app gave them, so the
|
|
65
|
+
* SDK's own defaults apply otherwise.
|
|
64
66
|
*/
|
|
65
67
|
export type SentrySharedOptions = {
|
|
66
68
|
dsn: string;
|
|
67
|
-
environment
|
|
68
|
-
release
|
|
69
|
+
environment?: string;
|
|
70
|
+
release?: string;
|
|
69
71
|
/** 10% of requests and page loads as traces, as in the webapi. */
|
|
70
72
|
tracesSampleRate: number;
|
|
71
73
|
dataCollection: SentryDataCollection;
|
|
@@ -106,6 +108,11 @@ export declare function scrubSentrySpan<T extends SentrySpan>(span: T): T;
|
|
|
106
108
|
* Options for `Sentry.init` that both sides of an app share, or `undefined`
|
|
107
109
|
* when `dsn` is not a usable DSN, which turns reporting off. Spread them
|
|
108
110
|
* into `init` and add the app's own, such as the browser's `tunnel`.
|
|
111
|
+
*
|
|
112
|
+
* Without a `release`, the options have no `release` key at all, so the SDK
|
|
113
|
+
* uses the release the Sentry bundler plugin injected at build time. The
|
|
114
|
+
* browser SDK spreads `init`'s options over that default, so a key set to
|
|
115
|
+
* `undefined` would replace it. The same goes for `environment`.
|
|
109
116
|
*/
|
|
110
117
|
export declare function sentryOptions(options: {
|
|
111
118
|
dsn: string | undefined;
|
package/dist/telemetry/sentry.js
CHANGED
|
@@ -132,6 +132,11 @@ export function scrubSentrySpan(span) {
|
|
|
132
132
|
* Options for `Sentry.init` that both sides of an app share, or `undefined`
|
|
133
133
|
* when `dsn` is not a usable DSN, which turns reporting off. Spread them
|
|
134
134
|
* into `init` and add the app's own, such as the browser's `tunnel`.
|
|
135
|
+
*
|
|
136
|
+
* Without a `release`, the options have no `release` key at all, so the SDK
|
|
137
|
+
* uses the release the Sentry bundler plugin injected at build time. The
|
|
138
|
+
* browser SDK spreads `init`'s options over that default, so a key set to
|
|
139
|
+
* `undefined` would replace it. The same goes for `environment`.
|
|
135
140
|
*/
|
|
136
141
|
export function sentryOptions(options) {
|
|
137
142
|
if (!isSentryDsn(options.dsn)) {
|
|
@@ -139,8 +144,10 @@ export function sentryOptions(options) {
|
|
|
139
144
|
}
|
|
140
145
|
return {
|
|
141
146
|
dsn: options.dsn,
|
|
142
|
-
|
|
143
|
-
|
|
147
|
+
...(options.environment === undefined
|
|
148
|
+
? {}
|
|
149
|
+
: { environment: options.environment }),
|
|
150
|
+
...(options.release === undefined ? {} : { release: options.release }),
|
|
144
151
|
tracesSampleRate: 0.1,
|
|
145
152
|
dataCollection: {
|
|
146
153
|
userInfo: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "singularity-core",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"description": "Shared non-UI code for Singularity TanStack Start apps: auth sessions, API client middleware, API schemas, paging, route data, images, formatting, HTTP helpers, theme, cookie notice, SEO, security headers and telemetry.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Filip",
|