@dash0/sdk-web 0.21.0 → 0.22.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.
- package/README.md +12 -0
- package/dist/dash0.iife.js +1 -1
- package/dist/dash0.iife.js.map +1 -1
- package/dist/dash0.js +1 -1
- package/dist/dash0.js.map +1 -1
- package/dist/dash0.umd.cjs +1 -1
- package/dist/dash0.umd.cjs.map +1 -1
- package/dist/modules/api/browser-env.js +33 -0
- package/dist/modules/api/init.js +42 -19
- package/dist/modules/api/init_test.js +54 -2
- package/dist/modules/api/vcs.js +11 -17
- package/dist/modules/transport/index.js +4 -0
- package/dist/modules/utils/index.js +1 -0
- package/dist/modules/utils/session-sampling.js +16 -0
- package/dist/modules/utils/session-sampling_test.js +72 -0
- package/dist/modules/vars.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/api/browser-env.d.ts +54 -0
- package/dist/types/types/options.d.ts +12 -3
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/session-sampling.d.ts +9 -0
- package/dist/types/utils/session-sampling_test.d.ts +1 -0
- package/dist/types/vars.d.ts +5 -0
- package/package.json +4 -5
- package/src/api/browser-env.ts +94 -0
- package/src/api/init.ts +82 -21
- package/src/api/init_test.ts +70 -1
- package/src/api/vcs.ts +11 -42
- package/src/transport/index.ts +3 -0
- package/src/types/options.ts +13 -3
- package/src/utils/index.ts +1 -0
- package/src/utils/session-sampling.ts +15 -0
- package/src/utils/session-sampling_test.ts +83 -0
- package/src/vars.ts +7 -0
package/src/vars.ts
CHANGED
|
@@ -171,6 +171,12 @@ export type Vars = {
|
|
|
171
171
|
* experimental - in rare cases causes Chrome to crash to use at your own risk.
|
|
172
172
|
*/
|
|
173
173
|
enableTransportCompression: boolean;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Whether the current session is sampled in (true) or out (false).
|
|
177
|
+
* Determined at init time based on sessionSamplingRate and the session ID.
|
|
178
|
+
*/
|
|
179
|
+
isSessionSampled: boolean;
|
|
174
180
|
};
|
|
175
181
|
|
|
176
182
|
export const vars: Vars = {
|
|
@@ -198,4 +204,5 @@ export const vars: Vars = {
|
|
|
198
204
|
includeParts: [],
|
|
199
205
|
},
|
|
200
206
|
enableTransportCompression: false,
|
|
207
|
+
isSessionSampled: true,
|
|
201
208
|
};
|