@kubesense/kubesense-browser-core 1.4.0 → 1.5.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 +40 -15
- package/cjs/boot/init.js +1 -1
- package/cjs/domain/configuration/endpointBuilder.js +1 -1
- package/cjs/domain/configuration/index.d.ts +2 -0
- package/cjs/domain/configuration/index.js +14 -1
- package/cjs/domain/configuration/index.js.map +1 -1
- package/cjs/domain/configuration/remoteSdkConfig.d.ts +81 -0
- package/cjs/domain/configuration/remoteSdkConfig.js +185 -0
- package/cjs/domain/configuration/remoteSdkConfig.js.map +1 -0
- package/cjs/domain/contexts/userContext.d.ts +1 -0
- package/cjs/domain/contexts/userContext.js +4 -0
- package/cjs/domain/contexts/userContext.js.map +1 -1
- package/cjs/domain/tags.js +1 -1
- package/cjs/domain/telemetry/telemetry.js +1 -1
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +15 -3
- package/cjs/index.js.map +1 -1
- package/esm/boot/init.js +1 -1
- package/esm/domain/configuration/endpointBuilder.js +1 -1
- package/esm/domain/configuration/index.d.ts +2 -0
- package/esm/domain/configuration/index.js +1 -0
- package/esm/domain/configuration/index.js.map +1 -1
- package/esm/domain/configuration/remoteSdkConfig.d.ts +81 -0
- package/esm/domain/configuration/remoteSdkConfig.js +172 -0
- package/esm/domain/configuration/remoteSdkConfig.js.map +1 -0
- package/esm/domain/contexts/userContext.d.ts +1 -0
- package/esm/domain/contexts/userContext.js +4 -0
- package/esm/domain/contexts/userContext.js.map +1 -1
- package/esm/domain/tags.js +1 -1
- package/esm/domain/telemetry/telemetry.js +1 -1
- package/esm/index.d.ts +2 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/src/domain/configuration/index.ts +15 -0
- package/src/domain/configuration/remoteSdkConfig.ts +213 -0
- package/src/domain/contexts/userContext.ts +5 -0
- package/src/index.ts +13 -0
package/README.md
CHANGED
|
@@ -12,7 +12,32 @@ helpers.
|
|
|
12
12
|
>
|
|
13
13
|
> - [`@kubesense/kubesense-browser-rum`][rum] — Real User Monitoring
|
|
14
14
|
> - [`@kubesense/kubesense-browser-rum-slim`][rum-slim] — RUM without Session Replay
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
## Remote SDK configuration
|
|
17
|
+
|
|
18
|
+
`core` owns the storage and transport half of dashboard-managed configuration: the
|
|
19
|
+
local-storage cache (`_kubesense_sdk_config`), the background fetch against the
|
|
20
|
+
collector's `/rum/api/v1/sdk-config` endpoint, and the defensive readers each
|
|
21
|
+
product SDK uses to map a document onto its own init configuration.
|
|
22
|
+
|
|
23
|
+
Applications enable it through the product SDK with `enableRemoteSdkConfiguration:
|
|
24
|
+
true` — RUM and Logs opt in independently — and never call a fetch or refresh API
|
|
25
|
+
themselves. Every failure mode (no cache, unavailable storage, 404, offline,
|
|
26
|
+
timeout, malformed JSON) resolves to "keep the local value", so an unsynced or
|
|
27
|
+
invalid document can never take an application away from its own `init()` settings
|
|
28
|
+
or the SDK defaults. See [Remote SDK Configuration][remote-config].
|
|
29
|
+
|
|
30
|
+
## User identity and sessions
|
|
31
|
+
|
|
32
|
+
`User` carries `id`, `name`, `email`, `mobile`, and arbitrary custom properties;
|
|
33
|
+
all of the identity fields are coerced to strings, so a phone number passed as a
|
|
34
|
+
JS number is stored as `usr.mobile` correctly.
|
|
35
|
+
|
|
36
|
+
Changing the user id — through `setUser()`, `clearUser()`, or a page load where
|
|
37
|
+
the persisted session owner no longer matches — expires the current session and
|
|
38
|
+
starts a new one. This is deliberate: on a shared device it keeps one user's
|
|
39
|
+
events out of another user's session. Applications should call `setUser()` only
|
|
40
|
+
when the identity actually changes.
|
|
16
41
|
|
|
17
42
|
## Geolocation
|
|
18
43
|
|
|
@@ -88,7 +113,7 @@ kubsenseRum.init({
|
|
|
88
113
|
() => {} // Ignore errors
|
|
89
114
|
)
|
|
90
115
|
}
|
|
91
|
-
}
|
|
116
|
+
},
|
|
92
117
|
})
|
|
93
118
|
```
|
|
94
119
|
|
|
@@ -101,9 +126,9 @@ import { getCurrentPosition, reverseGeocodeWithPosition, getLocationName } from
|
|
|
101
126
|
|
|
102
127
|
getCurrentPosition((position) => {
|
|
103
128
|
reverseGeocodeWithPosition(position, (result) => {
|
|
104
|
-
console.log(result.city)
|
|
105
|
-
console.log(result.state)
|
|
106
|
-
console.log(result.country)
|
|
129
|
+
console.log(result.city) // "San Francisco"
|
|
130
|
+
console.log(result.state) // "California"
|
|
131
|
+
console.log(result.country) // "United States of America"
|
|
107
132
|
console.log(getLocationName(result)) // "San Francisco, California, United States of America"
|
|
108
133
|
})
|
|
109
134
|
})
|
|
@@ -127,15 +152,15 @@ const result = await reverseGeocodeWithPositionAsync(position)
|
|
|
127
152
|
|
|
128
153
|
```typescript
|
|
129
154
|
interface GeoLocationResult {
|
|
130
|
-
city?: string
|
|
131
|
-
state?: string
|
|
132
|
-
stateCode?: string
|
|
133
|
-
country?: string
|
|
134
|
-
countryCode?: string
|
|
135
|
-
continent?: string
|
|
136
|
-
timezone?: string
|
|
137
|
-
locality?: string
|
|
138
|
-
postalCode?: string
|
|
155
|
+
city?: string // "San Francisco"
|
|
156
|
+
state?: string // "California"
|
|
157
|
+
stateCode?: string // "CA"
|
|
158
|
+
country?: string // "United States of America"
|
|
159
|
+
countryCode?: string // "US"
|
|
160
|
+
continent?: string // "North America"
|
|
161
|
+
timezone?: string // "America/Los_Angeles"
|
|
162
|
+
locality?: string // Neighborhood or suburb
|
|
163
|
+
postalCode?: string // "94102"
|
|
139
164
|
raw?: GeocodingResponse // Raw API response
|
|
140
165
|
}
|
|
141
166
|
```
|
|
@@ -148,4 +173,4 @@ interface GeoLocationResult {
|
|
|
148
173
|
|
|
149
174
|
[rum]: https://www.npmjs.com/package/@kubesense/kubesense-browser-rum
|
|
150
175
|
[rum-slim]: https://www.npmjs.com/package/@kubesense/kubesense-browser-rum-slim
|
|
151
|
-
[
|
|
176
|
+
[remote-config]: https://github.com/kubesense-ai/kubesense-browser-sdk/blob/main/docs/REMOTE_SDK_CONFIG.md
|
package/cjs/boot/init.js
CHANGED
|
@@ -7,7 +7,7 @@ const monitor_1 = require("../tools/monitor");
|
|
|
7
7
|
const display_1 = require("../tools/display");
|
|
8
8
|
function makePublicApi(stub) {
|
|
9
9
|
const publicApi = {
|
|
10
|
-
version: "1.
|
|
10
|
+
version: "1.5.0",
|
|
11
11
|
// This API method is intentionally not monitored, since the only thing executed is the
|
|
12
12
|
// user-provided 'callback'. All SDK usages executed in the callback should be monitored, and
|
|
13
13
|
// we don't want to interfere with the user uncaught exceptions.
|
|
@@ -45,7 +45,7 @@ function buildEndpointParameters({ clientToken, internalAnalyticsSubdomain, sour
|
|
|
45
45
|
const parameters = [
|
|
46
46
|
`ksource=${source}`,
|
|
47
47
|
`kubesense-api-key=${clientToken}`,
|
|
48
|
-
`kubesense-evp-origin-version=${encodeURIComponent("1.
|
|
48
|
+
`kubesense-evp-origin-version=${encodeURIComponent("1.5.0")}`,
|
|
49
49
|
'kubesense-evp-origin=browser',
|
|
50
50
|
`kubesense-request-id=${(0, stringUtils_1.generateUUID)()}`,
|
|
51
51
|
].concat(extraParameters);
|
|
@@ -2,5 +2,7 @@ export type { Configuration, InitConfiguration, ProxyFn } from './configuration'
|
|
|
2
2
|
export { DefaultPrivacyLevel, TraceContextInjection, isSampleRate, validateAndBuildConfiguration, serializeConfiguration, } from './configuration';
|
|
3
3
|
export type { EndpointBuilder, TrackType } from './endpointBuilder';
|
|
4
4
|
export { createEndpointBuilder, buildEndpointHost } from './endpointBuilder';
|
|
5
|
+
export type { RemoteSdkConfig, RemoteSdkConfigFeatures } from './remoteSdkConfig';
|
|
6
|
+
export { SDK_CONFIG_CACHE_KEY, SDK_CONFIG_PATH, buildSdkConfigEndpoint, clearCachedSdkConfig, getCachedSdkConfig, parseSdkConfig, readBoolean, readEnum, readSampleRate, readString, refreshSdkConfig, setCachedSdkConfig, } from './remoteSdkConfig';
|
|
5
7
|
export * from '../intakeSites';
|
|
6
8
|
export { computeTransportConfiguration, isIntakeUrl } from './transportConfiguration';
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isIntakeUrl = exports.computeTransportConfiguration = exports.buildEndpointHost = exports.createEndpointBuilder = exports.serializeConfiguration = exports.validateAndBuildConfiguration = exports.isSampleRate = exports.TraceContextInjection = exports.DefaultPrivacyLevel = void 0;
|
|
17
|
+
exports.isIntakeUrl = exports.computeTransportConfiguration = exports.setCachedSdkConfig = exports.refreshSdkConfig = exports.readString = exports.readSampleRate = exports.readEnum = exports.readBoolean = exports.parseSdkConfig = exports.getCachedSdkConfig = exports.clearCachedSdkConfig = exports.buildSdkConfigEndpoint = exports.SDK_CONFIG_PATH = exports.SDK_CONFIG_CACHE_KEY = exports.buildEndpointHost = exports.createEndpointBuilder = exports.serializeConfiguration = exports.validateAndBuildConfiguration = exports.isSampleRate = exports.TraceContextInjection = exports.DefaultPrivacyLevel = void 0;
|
|
18
18
|
var configuration_1 = require("./configuration");
|
|
19
19
|
Object.defineProperty(exports, "DefaultPrivacyLevel", { enumerable: true, get: function () { return configuration_1.DefaultPrivacyLevel; } });
|
|
20
20
|
Object.defineProperty(exports, "TraceContextInjection", { enumerable: true, get: function () { return configuration_1.TraceContextInjection; } });
|
|
@@ -24,6 +24,19 @@ Object.defineProperty(exports, "serializeConfiguration", { enumerable: true, get
|
|
|
24
24
|
var endpointBuilder_1 = require("./endpointBuilder");
|
|
25
25
|
Object.defineProperty(exports, "createEndpointBuilder", { enumerable: true, get: function () { return endpointBuilder_1.createEndpointBuilder; } });
|
|
26
26
|
Object.defineProperty(exports, "buildEndpointHost", { enumerable: true, get: function () { return endpointBuilder_1.buildEndpointHost; } });
|
|
27
|
+
var remoteSdkConfig_1 = require("./remoteSdkConfig");
|
|
28
|
+
Object.defineProperty(exports, "SDK_CONFIG_CACHE_KEY", { enumerable: true, get: function () { return remoteSdkConfig_1.SDK_CONFIG_CACHE_KEY; } });
|
|
29
|
+
Object.defineProperty(exports, "SDK_CONFIG_PATH", { enumerable: true, get: function () { return remoteSdkConfig_1.SDK_CONFIG_PATH; } });
|
|
30
|
+
Object.defineProperty(exports, "buildSdkConfigEndpoint", { enumerable: true, get: function () { return remoteSdkConfig_1.buildSdkConfigEndpoint; } });
|
|
31
|
+
Object.defineProperty(exports, "clearCachedSdkConfig", { enumerable: true, get: function () { return remoteSdkConfig_1.clearCachedSdkConfig; } });
|
|
32
|
+
Object.defineProperty(exports, "getCachedSdkConfig", { enumerable: true, get: function () { return remoteSdkConfig_1.getCachedSdkConfig; } });
|
|
33
|
+
Object.defineProperty(exports, "parseSdkConfig", { enumerable: true, get: function () { return remoteSdkConfig_1.parseSdkConfig; } });
|
|
34
|
+
Object.defineProperty(exports, "readBoolean", { enumerable: true, get: function () { return remoteSdkConfig_1.readBoolean; } });
|
|
35
|
+
Object.defineProperty(exports, "readEnum", { enumerable: true, get: function () { return remoteSdkConfig_1.readEnum; } });
|
|
36
|
+
Object.defineProperty(exports, "readSampleRate", { enumerable: true, get: function () { return remoteSdkConfig_1.readSampleRate; } });
|
|
37
|
+
Object.defineProperty(exports, "readString", { enumerable: true, get: function () { return remoteSdkConfig_1.readString; } });
|
|
38
|
+
Object.defineProperty(exports, "refreshSdkConfig", { enumerable: true, get: function () { return remoteSdkConfig_1.refreshSdkConfig; } });
|
|
39
|
+
Object.defineProperty(exports, "setCachedSdkConfig", { enumerable: true, get: function () { return remoteSdkConfig_1.setCachedSdkConfig; } });
|
|
27
40
|
__exportStar(require("../intakeSites"), exports);
|
|
28
41
|
var transportConfiguration_1 = require("./transportConfiguration");
|
|
29
42
|
Object.defineProperty(exports, "computeTransportConfiguration", { enumerable: true, get: function () { return transportConfiguration_1.computeTransportConfiguration; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,iDAMwB;AALtB,oHAAA,mBAAmB,OAAA;AACnB,sHAAA,qBAAqB,OAAA;AACrB,6GAAA,YAAY,OAAA;AACZ,8HAAA,6BAA6B,OAAA;AAC7B,uHAAA,sBAAsB,OAAA;AAGxB,qDAA4E;AAAnE,wHAAA,qBAAqB,OAAA;AAAE,oHAAA,iBAAiB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,iDAMwB;AALtB,oHAAA,mBAAmB,OAAA;AACnB,sHAAA,qBAAqB,OAAA;AACrB,6GAAA,YAAY,OAAA;AACZ,8HAAA,6BAA6B,OAAA;AAC7B,uHAAA,sBAAsB,OAAA;AAGxB,qDAA4E;AAAnE,wHAAA,qBAAqB,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAEjD,qDAa0B;AAZxB,uHAAA,oBAAoB,OAAA;AACpB,kHAAA,eAAe,OAAA;AACf,yHAAA,sBAAsB,OAAA;AACtB,uHAAA,oBAAoB,OAAA;AACpB,qHAAA,kBAAkB,OAAA;AAClB,iHAAA,cAAc,OAAA;AACd,8GAAA,WAAW,OAAA;AACX,2GAAA,QAAQ,OAAA;AACR,iHAAA,cAAc,OAAA;AACd,6GAAA,UAAU,OAAA;AACV,mHAAA,gBAAgB,OAAA;AAChB,qHAAA,kBAAkB,OAAA;AAEpB,iDAA8B;AAC9B,mEAAqF;AAA5E,uIAAA,6BAA6B,OAAA;AAAE,qHAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { InitConfiguration } from './configuration';
|
|
2
|
+
/**
|
|
3
|
+
* Dashboard-managed SDK settings, served by the Kubesense collector.
|
|
4
|
+
*
|
|
5
|
+
* The document is fetched asynchronously *after* the SDK has started and cached in local
|
|
6
|
+
* storage, so it costs nothing on the initialization path. Cached values are applied on the
|
|
7
|
+
* next page load — SDK configuration is frozen at `init()` time by design.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SDK_CONFIG_CACHE_KEY = "_kubesense_sdk_config";
|
|
10
|
+
export declare const SDK_CONFIG_PATH = "/rum/api/v1/sdk-config";
|
|
11
|
+
/** Give up rather than let a hung request keep a page-load handle alive. */
|
|
12
|
+
export declare const SDK_CONFIG_FETCH_TIMEOUT = 10000;
|
|
13
|
+
/**
|
|
14
|
+
* A remote configuration document. Every field is optional: a missing (or invalid) field means
|
|
15
|
+
* "leave the SDK default alone", so a malformed document can never take an application away
|
|
16
|
+
* from its defaults.
|
|
17
|
+
*/
|
|
18
|
+
export interface RemoteSdkConfig {
|
|
19
|
+
/** Free-form number for dashboard bookkeeping. Not interpreted by the SDK. */
|
|
20
|
+
version?: number;
|
|
21
|
+
features?: RemoteSdkConfigFeatures;
|
|
22
|
+
rum?: {
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
sessionReplay?: {
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
profiling?: {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
logs?: {
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface RemoteSdkConfigFeatures {
|
|
37
|
+
rum?: boolean;
|
|
38
|
+
sessionReplay?: boolean;
|
|
39
|
+
profiling?: boolean;
|
|
40
|
+
logs?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Read the cached document. Synchronous, never touches the network, and never throws: a
|
|
44
|
+
* corrupted or unavailable cache resolves to `undefined` (pure SDK defaults).
|
|
45
|
+
*/
|
|
46
|
+
export declare function getCachedSdkConfig(): RemoteSdkConfig | undefined;
|
|
47
|
+
export declare function setCachedSdkConfig(rawConfig: string): void;
|
|
48
|
+
export declare function clearCachedSdkConfig(): void;
|
|
49
|
+
/**
|
|
50
|
+
* A document is only usable if it is a JSON object. Anything else (array, primitive, invalid
|
|
51
|
+
* JSON) is rejected wholesale.
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseSdkConfig(raw: string): RemoteSdkConfig | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* The config endpoint deliberately carries the same query parameters as the intake, for two
|
|
56
|
+
* reasons: it authenticates without a custom header (which would force a CORS preflight), and
|
|
57
|
+
* it makes `isIntakeUrl()` return true, so the SDK never reports its own configuration request
|
|
58
|
+
* as a resource or a network error.
|
|
59
|
+
*/
|
|
60
|
+
export declare function buildSdkConfigEndpoint(initConfiguration: InitConfiguration, applicationId?: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Fetch the document and refresh the cache for the *next* page load. Fire-and-forget: any
|
|
63
|
+
* failure (offline, 404 because the collector has no config file, 401, timeout, malformed
|
|
64
|
+
* body) leaves the existing cache untouched.
|
|
65
|
+
*
|
|
66
|
+
* The response is validated before it overwrites the cache, so a half-written document on the
|
|
67
|
+
* collector can never poison a client.
|
|
68
|
+
*/
|
|
69
|
+
export declare function refreshSdkConfig(initConfiguration: InitConfiguration, applicationId?: string): Promise<void>;
|
|
70
|
+
export declare function readBoolean(source: {
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
} | undefined, key: string): boolean | undefined;
|
|
73
|
+
export declare function readSampleRate(source: {
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
} | undefined, key: string): number | undefined;
|
|
76
|
+
export declare function readString(source: {
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
} | undefined, key: string): string | undefined;
|
|
79
|
+
export declare function readEnum<T extends string>(source: {
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
} | undefined, key: string, allowedValues: readonly T[]): T | undefined;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SDK_CONFIG_FETCH_TIMEOUT = exports.SDK_CONFIG_PATH = exports.SDK_CONFIG_CACHE_KEY = void 0;
|
|
4
|
+
exports.getCachedSdkConfig = getCachedSdkConfig;
|
|
5
|
+
exports.setCachedSdkConfig = setCachedSdkConfig;
|
|
6
|
+
exports.clearCachedSdkConfig = clearCachedSdkConfig;
|
|
7
|
+
exports.parseSdkConfig = parseSdkConfig;
|
|
8
|
+
exports.buildSdkConfigEndpoint = buildSdkConfigEndpoint;
|
|
9
|
+
exports.refreshSdkConfig = refreshSdkConfig;
|
|
10
|
+
exports.readBoolean = readBoolean;
|
|
11
|
+
exports.readSampleRate = readSampleRate;
|
|
12
|
+
exports.readString = readString;
|
|
13
|
+
exports.readEnum = readEnum;
|
|
14
|
+
const stringUtils_1 = require("../../tools/utils/stringUtils");
|
|
15
|
+
const display_1 = require("../../tools/display");
|
|
16
|
+
const monitor_1 = require("../../tools/monitor");
|
|
17
|
+
const endpointBuilder_1 = require("./endpointBuilder");
|
|
18
|
+
/**
|
|
19
|
+
* Dashboard-managed SDK settings, served by the Kubesense collector.
|
|
20
|
+
*
|
|
21
|
+
* The document is fetched asynchronously *after* the SDK has started and cached in local
|
|
22
|
+
* storage, so it costs nothing on the initialization path. Cached values are applied on the
|
|
23
|
+
* next page load — SDK configuration is frozen at `init()` time by design.
|
|
24
|
+
*/
|
|
25
|
+
exports.SDK_CONFIG_CACHE_KEY = '_kubesense_sdk_config';
|
|
26
|
+
exports.SDK_CONFIG_PATH = '/rum/api/v1/sdk-config';
|
|
27
|
+
/** Give up rather than let a hung request keep a page-load handle alive. */
|
|
28
|
+
exports.SDK_CONFIG_FETCH_TIMEOUT = 10000;
|
|
29
|
+
/**
|
|
30
|
+
* Read the cached document. Synchronous, never touches the network, and never throws: a
|
|
31
|
+
* corrupted or unavailable cache resolves to `undefined` (pure SDK defaults).
|
|
32
|
+
*/
|
|
33
|
+
function getCachedSdkConfig() {
|
|
34
|
+
let raw;
|
|
35
|
+
try {
|
|
36
|
+
raw = localStorage.getItem(exports.SDK_CONFIG_CACHE_KEY);
|
|
37
|
+
}
|
|
38
|
+
catch (_a) {
|
|
39
|
+
// Local storage can be unavailable (disabled, quota, sandboxed iframe).
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
if (!raw) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const config = parseSdkConfig(raw);
|
|
46
|
+
if (!config) {
|
|
47
|
+
// Drop a document we can no longer read so we stop paying for it on every page load.
|
|
48
|
+
clearCachedSdkConfig();
|
|
49
|
+
}
|
|
50
|
+
return config;
|
|
51
|
+
}
|
|
52
|
+
function setCachedSdkConfig(rawConfig) {
|
|
53
|
+
try {
|
|
54
|
+
localStorage.setItem(exports.SDK_CONFIG_CACHE_KEY, rawConfig);
|
|
55
|
+
}
|
|
56
|
+
catch (_a) {
|
|
57
|
+
// Ignore: caching is an optimization, not a requirement.
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function clearCachedSdkConfig() {
|
|
61
|
+
try {
|
|
62
|
+
localStorage.removeItem(exports.SDK_CONFIG_CACHE_KEY);
|
|
63
|
+
}
|
|
64
|
+
catch (_a) {
|
|
65
|
+
// Ignore.
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A document is only usable if it is a JSON object. Anything else (array, primitive, invalid
|
|
70
|
+
* JSON) is rejected wholesale.
|
|
71
|
+
*/
|
|
72
|
+
function parseSdkConfig(raw) {
|
|
73
|
+
try {
|
|
74
|
+
const parsed = JSON.parse(raw);
|
|
75
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
return parsed;
|
|
79
|
+
}
|
|
80
|
+
catch (_a) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The config endpoint deliberately carries the same query parameters as the intake, for two
|
|
86
|
+
* reasons: it authenticates without a custom header (which would force a CORS preflight), and
|
|
87
|
+
* it makes `isIntakeUrl()` return true, so the SDK never reports its own configuration request
|
|
88
|
+
* as a resource or a network error.
|
|
89
|
+
*/
|
|
90
|
+
function buildSdkConfigEndpoint(initConfiguration, applicationId) {
|
|
91
|
+
const host = (0, endpointBuilder_1.buildEndpointHost)('rum', initConfiguration);
|
|
92
|
+
const parameters = [
|
|
93
|
+
'ksource=browser',
|
|
94
|
+
`kubesense-api-key=${encodeURIComponent(initConfiguration.clientToken)}`,
|
|
95
|
+
`kubesense-request-id=${(0, stringUtils_1.generateUUID)()}`,
|
|
96
|
+
];
|
|
97
|
+
if (applicationId) {
|
|
98
|
+
// The collector resolves the application from this parameter first, falling back to the
|
|
99
|
+
// token -> application mapping. Sending it makes per-application configuration explicit.
|
|
100
|
+
parameters.push(`application_id=${encodeURIComponent(applicationId)}`);
|
|
101
|
+
}
|
|
102
|
+
return `https://${host}${exports.SDK_CONFIG_PATH}?${parameters.join('&')}`;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Fetch the document and refresh the cache for the *next* page load. Fire-and-forget: any
|
|
106
|
+
* failure (offline, 404 because the collector has no config file, 401, timeout, malformed
|
|
107
|
+
* body) leaves the existing cache untouched.
|
|
108
|
+
*
|
|
109
|
+
* The response is validated before it overwrites the cache, so a half-written document on the
|
|
110
|
+
* collector can never poison a client.
|
|
111
|
+
*/
|
|
112
|
+
function refreshSdkConfig(initConfiguration, applicationId) {
|
|
113
|
+
if (typeof fetch !== 'function') {
|
|
114
|
+
return Promise.resolve();
|
|
115
|
+
}
|
|
116
|
+
let endpoint;
|
|
117
|
+
try {
|
|
118
|
+
endpoint = buildSdkConfigEndpoint(initConfiguration, applicationId);
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
(0, monitor_1.monitorError)(error);
|
|
122
|
+
return Promise.resolve();
|
|
123
|
+
}
|
|
124
|
+
return fetch(endpoint, {
|
|
125
|
+
method: 'GET',
|
|
126
|
+
// Configuration is not user data: never attach cookies to it.
|
|
127
|
+
credentials: 'omit',
|
|
128
|
+
mode: 'cors',
|
|
129
|
+
// Always ask the collector, never a proxy cache — dashboard edits must propagate.
|
|
130
|
+
cache: 'no-store',
|
|
131
|
+
signal: createTimeoutSignal(exports.SDK_CONFIG_FETCH_TIMEOUT),
|
|
132
|
+
})
|
|
133
|
+
.then((response) => {
|
|
134
|
+
if (!response.ok) {
|
|
135
|
+
// 404 simply means "no configuration published"; keep whatever we already had.
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
return response.text();
|
|
139
|
+
})
|
|
140
|
+
.then((rawConfig) => {
|
|
141
|
+
if (rawConfig === undefined) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (!parseSdkConfig(rawConfig)) {
|
|
145
|
+
display_1.display.warn('Remote SDK configuration is not a valid JSON object, ignoring it.');
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
setCachedSdkConfig(rawConfig);
|
|
149
|
+
})
|
|
150
|
+
.catch(() => {
|
|
151
|
+
// Network failures are expected and must stay silent: the SDK keeps running on the
|
|
152
|
+
// cached configuration, or on its defaults.
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function createTimeoutSignal(timeout) {
|
|
156
|
+
// AbortSignal.timeout is not available on all supported browsers; without it the fetch
|
|
157
|
+
// simply runs to completion, which is acceptable for a fire-and-forget request.
|
|
158
|
+
if (typeof AbortSignal !== 'undefined' && typeof AbortSignal.timeout === 'function') {
|
|
159
|
+
return AbortSignal.timeout(timeout);
|
|
160
|
+
}
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
/* ------------------------------------------------------------------------------------------
|
|
164
|
+
* Defensive readers
|
|
165
|
+
*
|
|
166
|
+
* Each returns `undefined` when the value is missing or unusable, which callers translate into
|
|
167
|
+
* "do not override the SDK default".
|
|
168
|
+
* ---------------------------------------------------------------------------------------- */
|
|
169
|
+
function readBoolean(source, key) {
|
|
170
|
+
const value = source === null || source === void 0 ? void 0 : source[key];
|
|
171
|
+
return typeof value === 'boolean' ? value : undefined;
|
|
172
|
+
}
|
|
173
|
+
function readSampleRate(source, key) {
|
|
174
|
+
const value = source === null || source === void 0 ? void 0 : source[key];
|
|
175
|
+
return typeof value === 'number' && isFinite(value) && value >= 0 && value <= 100 ? value : undefined;
|
|
176
|
+
}
|
|
177
|
+
function readString(source, key) {
|
|
178
|
+
const value = source === null || source === void 0 ? void 0 : source[key];
|
|
179
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
180
|
+
}
|
|
181
|
+
function readEnum(source, key, allowedValues) {
|
|
182
|
+
const value = source === null || source === void 0 ? void 0 : source[key];
|
|
183
|
+
return typeof value === 'string' && allowedValues.includes(value) ? value : undefined;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=remoteSdkConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteSdkConfig.js","sourceRoot":"","sources":["../../../src/domain/configuration/remoteSdkConfig.ts"],"names":[],"mappings":";;;AA+CA,gDAmBC;AAED,gDAMC;AAED,oDAMC;AAMD,wCAUC;AAQD,wDAaC;AAUD,4CA2CC;AAkBD,kCAGC;AAED,wCAGC;AAED,gCAGC;AAED,4BAOC;AApND,+DAA4D;AAC5D,iDAA6C;AAC7C,iDAAkD;AAElD,uDAAqD;AAErD;;;;;;GAMG;AAEU,QAAA,oBAAoB,GAAG,uBAAuB,CAAA;AAC9C,QAAA,eAAe,GAAG,wBAAwB,CAAA;AAEvD,4EAA4E;AAC/D,QAAA,wBAAwB,GAAG,KAAM,CAAA;AAyB9C;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,IAAI,GAAkB,CAAA;IACtB,IAAI,CAAC;QACH,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,4BAAoB,CAAC,CAAA;IAClD,CAAC;IAAC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,GAAG,CAAC,CAAA;IAC3B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AAC1E,CAAC;AAED,SAAgB,QAAQ,CACtB,MAA8C,EAC9C,GAAW,EACX,aAA2B;IAE3B,MAAM,KAAK,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,GAAG,CAAC,CAAA;IAC3B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAW,CAAC,CAAC,CAAC,SAAS,CAAA;AACrH,CAAC"}
|
|
@@ -6,6 +6,7 @@ export interface User {
|
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
email?: string | undefined;
|
|
8
8
|
name?: string | undefined;
|
|
9
|
+
mobile?: string | undefined;
|
|
9
10
|
[key: string]: unknown;
|
|
10
11
|
}
|
|
11
12
|
export declare function startUserContext(hooks: AbstractHooks, configuration: Configuration, sessionManager: {
|
|
@@ -114,6 +114,10 @@ function buildUserContextManager() {
|
|
|
114
114
|
id: { type: 'string' },
|
|
115
115
|
name: { type: 'string' },
|
|
116
116
|
email: { type: 'string' },
|
|
117
|
+
// Coerced to string like the other identity fields: phone numbers are
|
|
118
|
+
// routinely passed as JS numbers, and the collector unmarshals
|
|
119
|
+
// usr.mobile into a string column.
|
|
120
|
+
mobile: { type: 'string' },
|
|
117
121
|
},
|
|
118
122
|
});
|
|
119
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userContext.js","sourceRoot":"","sources":["../../../src/domain/contexts/userContext.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"userContext.js","sourceRoot":"","sources":["../../../src/domain/contexts/userContext.ts"],"names":[],"mappings":";;AAiDA,4CAyFC;AAED,0DAYC;AAtJD,wEAAoE;AACpE,6DAA8D;AAC9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,WAAW;SACxE,CAAC,CAAA;KAAA,CAAC,CAAA;IAEH,OAAO,kBAAkB,CAAA;AAC3B,CAAC;AAED,SAAgB,uBAAuB;IACrC,OAAO,IAAA,qCAAoB,EAAC,MAAM,EAAE;QAClC,gBAAgB,EAAE;YAChB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,sEAAsE;YACtE,+DAA+D;YAC/D,mCAAmC;YACnC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC3B;KACF,CAAC,CAAA;AACJ,CAAC"}
|
package/cjs/domain/tags.js
CHANGED
|
@@ -9,7 +9,7 @@ const display_1 = require("../tools/display");
|
|
|
9
9
|
exports.TAG_SIZE_LIMIT = 200;
|
|
10
10
|
function buildTags(configuration) {
|
|
11
11
|
const { env, service, version, datacenter, sdkVersion, variant } = configuration;
|
|
12
|
-
const tags = [buildTag('sdk_version', sdkVersion !== null && sdkVersion !== void 0 ? sdkVersion : "1.
|
|
12
|
+
const tags = [buildTag('sdk_version', sdkVersion !== null && sdkVersion !== void 0 ? sdkVersion : "1.5.0")];
|
|
13
13
|
if (env) {
|
|
14
14
|
tags.push(buildTag('env', env));
|
|
15
15
|
}
|
|
@@ -109,7 +109,7 @@ function startTelemetryCollection(telemetryService, configuration, hooks, observ
|
|
|
109
109
|
type: 'telemetry',
|
|
110
110
|
date: clockNow.timeStamp,
|
|
111
111
|
service: telemetryService,
|
|
112
|
-
version: "1.
|
|
112
|
+
version: "1.5.0",
|
|
113
113
|
source: 'browser',
|
|
114
114
|
_kubesense: {
|
|
115
115
|
format_version: 2,
|
package/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { Configuration, InitConfiguration, EndpointBuilder, ProxyFn } from './domain/configuration';
|
|
2
|
-
export {
|
|
2
|
+
export type { RemoteSdkConfig, RemoteSdkConfigFeatures } from './domain/configuration';
|
|
3
|
+
export { validateAndBuildConfiguration, DefaultPrivacyLevel, TraceContextInjection, serializeConfiguration, isSampleRate, buildEndpointHost, INTAKE_URL_PARAMETERS, INTAKE_SITE_PROD, INTAKE_SITE_STAGING, isIntakeUrl, SDK_CONFIG_CACHE_KEY, SDK_CONFIG_PATH, buildSdkConfigEndpoint, clearCachedSdkConfig, getCachedSdkConfig, parseSdkConfig, readBoolean, readEnum, readSampleRate, readString, refreshSdkConfig, setCachedSdkConfig, } from './domain/configuration';
|
|
3
4
|
export * from './domain/intakeSites';
|
|
4
5
|
export type { TrackingConsentState } from './domain/trackingConsent';
|
|
5
6
|
export { TrackingConsent, createTrackingConsentState } from './domain/trackingConsent';
|
package/cjs/index.js
CHANGED
|
@@ -14,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.ErrorSource = exports.checkContext = exports.isSyntheticsTest = void 0;
|
|
17
|
+
exports.Observable = exports.monitorError = exports.setDebugMode = exports.callMonitored = exports.monitor = exports.monitored = exports.addTelemetryMetrics = exports.addTelemetryUsage = exports.addTelemetryConfiguration = exports.resetTelemetry = exports.addTelemetryError = exports.addTelemetryDebug = exports.startTelemetry = exports.RawReportType = exports.initReportObservable = exports.displayAlreadyInitializedError = exports.makePublicApi = exports.defineGlobal = exports.computeStackTrace = exports.trackRuntimeError = exports.ExperimentalFeature = exports.initFeatureFlags = exports.getExperimentalFeatures = exports.resetExperimentalFeatures = exports.addExperimentalFeatures = exports.isExperimentalFeatureEnabled = exports.createTrackingConsentState = exports.TrackingConsent = exports.setCachedSdkConfig = exports.refreshSdkConfig = exports.readString = exports.readSampleRate = exports.readEnum = exports.readBoolean = exports.parseSdkConfig = exports.getCachedSdkConfig = exports.clearCachedSdkConfig = exports.buildSdkConfigEndpoint = exports.SDK_CONFIG_PATH = exports.SDK_CONFIG_CACHE_KEY = exports.isIntakeUrl = exports.INTAKE_SITE_STAGING = exports.INTAKE_SITE_PROD = exports.INTAKE_URL_PARAMETERS = exports.buildEndpointHost = exports.isSampleRate = exports.serializeConfiguration = exports.TraceContextInjection = exports.DefaultPrivacyLevel = exports.validateAndBuildConfiguration = void 0;
|
|
18
|
+
exports.buildGlobalContextManager = exports.startGlobalContext = exports.buildAccountContextManager = exports.startAccountContext = exports.removeStorageListeners = exports.storeContextManager = exports.bufferContextCalls = exports.defineContextMethod = exports.createContextManager = exports.catchUserErrors = exports.createBoundedBuffer = exports.resetConsoleObservable = exports.initConsoleObservable = exports.isPageExitReason = exports.PageExitReason = exports.createPageMayExitObservable = exports.resetFetchObservable = exports.initFetchObservable = exports.initXhrObservable = exports.resetInitCookies = exports.deleteCookie = exports.setCookie = exports.getInitCookie = exports.getCookie = exports.areCookiesAuthorized = exports.NO_ERROR_STACK_PRESENT_MESSAGE = exports.isError = exports.getFileFromStackTraceString = exports.computeRawError = exports.instrumentSetter = exports.instrumentMethod = exports.getZoneJsOriginalValue = exports.asyncRunOnReadyState = exports.runOnReadyState = exports.sendToExtension = exports.AbstractLifeCycle = exports.createIdentityEncoder = exports.FLUSH_DURATION_LIMIT = exports.createFlushController = exports.createBatch = exports.bridgeSupports = exports.getEventBridge = exports.canUseEventBridge = exports.createHttpRequest = exports.SessionPersistence = exports.SESSION_NOT_TRACKED = exports.SESSION_TIME_OUT_DELAY = exports.stopSessionManager = exports.startSessionManager = exports.BufferedObservable = void 0;
|
|
19
|
+
exports.ErrorSource = exports.checkContext = exports.isSyntheticsTest = exports.getSyntheticsResultId = exports.getSyntheticsTestId = exports.willSyntheticsInjectRum = exports.SESSION_STORE_KEY = exports.STORAGE_POLL_DELAY = exports.readBytesFromStream = exports.CLEAR_OLD_VALUES_INTERVAL = exports.createValueHistory = exports.ContextManagerMethod = exports.CustomerContextKey = exports.buildUserContextManager = exports.startUserContext = void 0;
|
|
20
20
|
var configuration_1 = require("./domain/configuration");
|
|
21
21
|
Object.defineProperty(exports, "validateAndBuildConfiguration", { enumerable: true, get: function () { return configuration_1.validateAndBuildConfiguration; } });
|
|
22
22
|
Object.defineProperty(exports, "DefaultPrivacyLevel", { enumerable: true, get: function () { return configuration_1.DefaultPrivacyLevel; } });
|
|
@@ -28,6 +28,18 @@ Object.defineProperty(exports, "INTAKE_URL_PARAMETERS", { enumerable: true, get:
|
|
|
28
28
|
Object.defineProperty(exports, "INTAKE_SITE_PROD", { enumerable: true, get: function () { return configuration_1.INTAKE_SITE_PROD; } });
|
|
29
29
|
Object.defineProperty(exports, "INTAKE_SITE_STAGING", { enumerable: true, get: function () { return configuration_1.INTAKE_SITE_STAGING; } });
|
|
30
30
|
Object.defineProperty(exports, "isIntakeUrl", { enumerable: true, get: function () { return configuration_1.isIntakeUrl; } });
|
|
31
|
+
Object.defineProperty(exports, "SDK_CONFIG_CACHE_KEY", { enumerable: true, get: function () { return configuration_1.SDK_CONFIG_CACHE_KEY; } });
|
|
32
|
+
Object.defineProperty(exports, "SDK_CONFIG_PATH", { enumerable: true, get: function () { return configuration_1.SDK_CONFIG_PATH; } });
|
|
33
|
+
Object.defineProperty(exports, "buildSdkConfigEndpoint", { enumerable: true, get: function () { return configuration_1.buildSdkConfigEndpoint; } });
|
|
34
|
+
Object.defineProperty(exports, "clearCachedSdkConfig", { enumerable: true, get: function () { return configuration_1.clearCachedSdkConfig; } });
|
|
35
|
+
Object.defineProperty(exports, "getCachedSdkConfig", { enumerable: true, get: function () { return configuration_1.getCachedSdkConfig; } });
|
|
36
|
+
Object.defineProperty(exports, "parseSdkConfig", { enumerable: true, get: function () { return configuration_1.parseSdkConfig; } });
|
|
37
|
+
Object.defineProperty(exports, "readBoolean", { enumerable: true, get: function () { return configuration_1.readBoolean; } });
|
|
38
|
+
Object.defineProperty(exports, "readEnum", { enumerable: true, get: function () { return configuration_1.readEnum; } });
|
|
39
|
+
Object.defineProperty(exports, "readSampleRate", { enumerable: true, get: function () { return configuration_1.readSampleRate; } });
|
|
40
|
+
Object.defineProperty(exports, "readString", { enumerable: true, get: function () { return configuration_1.readString; } });
|
|
41
|
+
Object.defineProperty(exports, "refreshSdkConfig", { enumerable: true, get: function () { return configuration_1.refreshSdkConfig; } });
|
|
42
|
+
Object.defineProperty(exports, "setCachedSdkConfig", { enumerable: true, get: function () { return configuration_1.setCachedSdkConfig; } });
|
|
31
43
|
__exportStar(require("./domain/intakeSites"), exports);
|
|
32
44
|
var trackingConsent_1 = require("./domain/trackingConsent");
|
|
33
45
|
Object.defineProperty(exports, "TrackingConsent", { enumerable: true, get: function () { return trackingConsent_1.TrackingConsent; } });
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,wDAuB+B;AAtB7B,8HAAA,6BAA6B,OAAA;AAC7B,oHAAA,mBAAmB,OAAA;AACnB,sHAAA,qBAAqB,OAAA;AACrB,uHAAA,sBAAsB,OAAA;AACtB,6GAAA,YAAY,OAAA;AACZ,kHAAA,iBAAiB,OAAA;AACjB,sHAAA,qBAAqB,OAAA;AACrB,iHAAA,gBAAgB,OAAA;AAChB,oHAAA,mBAAmB,OAAA;AACnB,4GAAA,WAAW,OAAA;AACX,qHAAA,oBAAoB,OAAA;AACpB,gHAAA,eAAe,OAAA;AACf,uHAAA,sBAAsB,OAAA;AACtB,qHAAA,oBAAoB,OAAA;AACpB,mHAAA,kBAAkB,OAAA;AAClB,+GAAA,cAAc,OAAA;AACd,4GAAA,WAAW,OAAA;AACX,yGAAA,QAAQ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C,0DAAuE;AAA/C,0GAAA,WAAW,OAAA;AACnC,mDAAgC;AAChC,wDAAqC;AACrC,yDAAsC;AACtC,mEAAgD;AAChD,wDAAqC;AACrC,gDAA6B"}
|
package/esm/boot/init.js
CHANGED
|
@@ -3,7 +3,7 @@ import { setDebugMode } from '../tools/monitor';
|
|
|
3
3
|
import { display } from '../tools/display';
|
|
4
4
|
export function makePublicApi(stub) {
|
|
5
5
|
const publicApi = {
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.5.0",
|
|
7
7
|
// This API method is intentionally not monitored, since the only thing executed is the
|
|
8
8
|
// user-provided 'callback'. All SDK usages executed in the callback should be monitored, and
|
|
9
9
|
// we don't want to interfere with the user uncaught exceptions.
|
|
@@ -41,7 +41,7 @@ function buildEndpointParameters({ clientToken, internalAnalyticsSubdomain, sour
|
|
|
41
41
|
const parameters = [
|
|
42
42
|
`ksource=${source}`,
|
|
43
43
|
`kubesense-api-key=${clientToken}`,
|
|
44
|
-
`kubesense-evp-origin-version=${encodeURIComponent("1.
|
|
44
|
+
`kubesense-evp-origin-version=${encodeURIComponent("1.5.0")}`,
|
|
45
45
|
'kubesense-evp-origin=browser',
|
|
46
46
|
`kubesense-request-id=${generateUUID()}`,
|
|
47
47
|
].concat(extraParameters);
|
|
@@ -2,5 +2,7 @@ export type { Configuration, InitConfiguration, ProxyFn } from './configuration'
|
|
|
2
2
|
export { DefaultPrivacyLevel, TraceContextInjection, isSampleRate, validateAndBuildConfiguration, serializeConfiguration, } from './configuration';
|
|
3
3
|
export type { EndpointBuilder, TrackType } from './endpointBuilder';
|
|
4
4
|
export { createEndpointBuilder, buildEndpointHost } from './endpointBuilder';
|
|
5
|
+
export type { RemoteSdkConfig, RemoteSdkConfigFeatures } from './remoteSdkConfig';
|
|
6
|
+
export { SDK_CONFIG_CACHE_KEY, SDK_CONFIG_PATH, buildSdkConfigEndpoint, clearCachedSdkConfig, getCachedSdkConfig, parseSdkConfig, readBoolean, readEnum, readSampleRate, readString, refreshSdkConfig, setCachedSdkConfig, } from './remoteSdkConfig';
|
|
5
7
|
export * from '../intakeSites';
|
|
6
8
|
export { computeTransportConfiguration, isIntakeUrl } from './transportConfiguration';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { DefaultPrivacyLevel, TraceContextInjection, isSampleRate, validateAndBuildConfiguration, serializeConfiguration, } from './configuration';
|
|
2
2
|
export { createEndpointBuilder, buildEndpointHost } from './endpointBuilder';
|
|
3
|
+
export { SDK_CONFIG_CACHE_KEY, SDK_CONFIG_PATH, buildSdkConfigEndpoint, clearCachedSdkConfig, getCachedSdkConfig, parseSdkConfig, readBoolean, readEnum, readSampleRate, readString, refreshSdkConfig, setCachedSdkConfig, } from './remoteSdkConfig';
|
|
3
4
|
export * from '../intakeSites';
|
|
4
5
|
export { computeTransportConfiguration, isIntakeUrl } from './transportConfiguration';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/configuration/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/configuration/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE5E,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,QAAQ,EACR,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA"}
|