@grafana/faro-web-sdk 1.2.8 → 1.3.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/dist/bundle/faro-web-sdk.iife.js +1 -1
- package/dist/bundle/types/index.d.ts +2 -1
- package/dist/bundle/types/instrumentations/console/instrumentation.d.ts +1 -1
- package/dist/bundle/types/instrumentations/errors/instrumentation.d.ts +1 -1
- package/dist/bundle/types/instrumentations/index.d.ts +1 -0
- package/dist/bundle/types/instrumentations/session/index.d.ts +2 -1
- package/dist/bundle/types/instrumentations/session/instrumentation.d.ts +1 -2
- package/dist/bundle/types/instrumentations/session/sessionManager/PersistentSessionsManager.d.ts +1 -2
- package/dist/bundle/types/instrumentations/session/sessionManager/VolatileSessionManager.d.ts +1 -2
- package/dist/bundle/types/instrumentations/session/sessionManager/index.d.ts +2 -1
- package/dist/bundle/types/instrumentations/session/sessionManager/sampling.d.ts +1 -0
- package/dist/bundle/types/instrumentations/session/sessionManager/sessionConstants.d.ts +2 -5
- package/dist/bundle/types/instrumentations/session/sessionManager/sessionManagerUtils.d.ts +5 -1
- package/dist/bundle/types/instrumentations/session/sessionManager/types.d.ts +1 -0
- package/dist/bundle/types/instrumentations/view/instrumentation.d.ts +1 -1
- package/dist/bundle/types/instrumentations/webVitals/instrumentation.d.ts +1 -1
- package/dist/bundle/types/transports/console/transport.d.ts +1 -1
- package/dist/bundle/types/transports/fetch/transport.d.ts +1 -1
- package/dist/bundle/types/utils/index.d.ts +2 -2
- package/dist/cjs/config/makeCoreConfig.js +2 -7
- package/dist/cjs/config/makeCoreConfig.js.map +1 -1
- package/dist/cjs/index.js +16 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/instrumentations/index.js +9 -1
- package/dist/cjs/instrumentations/index.js.map +1 -1
- package/dist/cjs/instrumentations/session/index.js +12 -16
- package/dist/cjs/instrumentations/session/index.js.map +1 -1
- package/dist/cjs/instrumentations/session/instrumentation.js +47 -30
- package/dist/cjs/instrumentations/session/instrumentation.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/PersistentSessionsManager.js +3 -4
- package/dist/cjs/instrumentations/session/sessionManager/PersistentSessionsManager.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/VolatileSessionManager.js +3 -4
- package/dist/cjs/instrumentations/session/sessionManager/VolatileSessionManager.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/index.js +11 -16
- package/dist/cjs/instrumentations/session/sessionManager/index.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/sampling.js +17 -0
- package/dist/cjs/instrumentations/session/sessionManager/sampling.js.map +1 -0
- package/dist/cjs/instrumentations/session/sessionManager/sessionConstants.js +3 -3
- package/dist/cjs/instrumentations/session/sessionManager/sessionConstants.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/sessionManagerUtils.js +8 -8
- package/dist/cjs/instrumentations/session/sessionManager/sessionManagerUtils.js.map +1 -1
- package/dist/cjs/instrumentations/session/sessionManager/types.js.map +1 -1
- package/dist/cjs/instrumentations/view/instrumentation.js +6 -2
- package/dist/cjs/instrumentations/view/instrumentation.js.map +1 -1
- package/dist/cjs/utils/index.js +11 -16
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/esm/config/makeCoreConfig.js +3 -8
- package/dist/esm/config/makeCoreConfig.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/instrumentations/index.js +1 -0
- package/dist/esm/instrumentations/index.js.map +1 -1
- package/dist/esm/instrumentations/session/index.js +1 -1
- package/dist/esm/instrumentations/session/index.js.map +1 -1
- package/dist/esm/instrumentations/session/instrumentation.js +39 -24
- package/dist/esm/instrumentations/session/instrumentation.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/PersistentSessionsManager.js +3 -4
- package/dist/esm/instrumentations/session/sessionManager/PersistentSessionsManager.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/VolatileSessionManager.js +3 -4
- package/dist/esm/instrumentations/session/sessionManager/VolatileSessionManager.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/index.js +2 -1
- package/dist/esm/instrumentations/session/sessionManager/index.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/sampling.js +13 -0
- package/dist/esm/instrumentations/session/sessionManager/sampling.js.map +1 -0
- package/dist/esm/instrumentations/session/sessionManager/sessionConstants.js +3 -3
- package/dist/esm/instrumentations/session/sessionManager/sessionConstants.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/sessionManagerUtils.js +7 -8
- package/dist/esm/instrumentations/session/sessionManager/sessionManagerUtils.js.map +1 -1
- package/dist/esm/instrumentations/session/sessionManager/types.js.map +1 -1
- package/dist/esm/instrumentations/view/instrumentation.js +6 -2
- package/dist/esm/instrumentations/view/instrumentation.js.map +1 -1
- package/dist/esm/utils/index.js +2 -2
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/instrumentations/console/instrumentation.d.ts +1 -1
- package/dist/types/instrumentations/errors/instrumentation.d.ts +1 -1
- package/dist/types/instrumentations/index.d.ts +1 -0
- package/dist/types/instrumentations/session/index.d.ts +2 -1
- package/dist/types/instrumentations/session/instrumentation.d.ts +1 -2
- package/dist/types/instrumentations/session/sessionManager/PersistentSessionsManager.d.ts +1 -2
- package/dist/types/instrumentations/session/sessionManager/VolatileSessionManager.d.ts +1 -2
- package/dist/types/instrumentations/session/sessionManager/index.d.ts +2 -1
- package/dist/types/instrumentations/session/sessionManager/sampling.d.ts +1 -0
- package/dist/types/instrumentations/session/sessionManager/sessionConstants.d.ts +2 -5
- package/dist/types/instrumentations/session/sessionManager/sessionManagerUtils.d.ts +5 -1
- package/dist/types/instrumentations/session/sessionManager/types.d.ts +1 -0
- package/dist/types/instrumentations/view/instrumentation.d.ts +1 -1
- package/dist/types/instrumentations/webVitals/instrumentation.d.ts +1 -1
- package/dist/types/transports/console/transport.d.ts +1 -1
- package/dist/types/transports/fetch/transport.d.ts +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/package.json +3 -3
|
@@ -7,10 +7,14 @@ export class ViewInstrumentation extends BaseInstrumentation {
|
|
|
7
7
|
this.version = VERSION;
|
|
8
8
|
}
|
|
9
9
|
sendViewChangedEvent(meta) {
|
|
10
|
+
var _a, _b, _c;
|
|
10
11
|
const view = meta.view;
|
|
11
|
-
if (view && view !== this.notifiedView) {
|
|
12
|
+
if (view && view.name !== ((_a = this.notifiedView) === null || _a === void 0 ? void 0 : _a.name)) {
|
|
13
|
+
this.api.pushEvent(EVENT_VIEW_CHANGED, {
|
|
14
|
+
fromView: (_c = (_b = this.notifiedView) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '',
|
|
15
|
+
toView: view.name,
|
|
16
|
+
}, undefined, { skipDedupe: true });
|
|
12
17
|
this.notifiedView = view;
|
|
13
|
-
this.api.pushEvent(EVENT_VIEW_CHANGED, {}, undefined, { skipDedupe: true });
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
initialize() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../../../src/instrumentations/view/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAkB,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEtG,2CAA2C;AAC3C,MAAM,OAAO,mBAAoB,SAAQ,mBAAmB;IAA5D;;QACW,SAAI,GAAG,4CAA4C,CAAC;QACpD,YAAO,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../../../src/instrumentations/view/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAkB,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEtG,2CAA2C;AAC3C,MAAM,OAAO,mBAAoB,SAAQ,mBAAmB;IAA5D;;QACW,SAAI,GAAG,4CAA4C,CAAC;QACpD,YAAO,GAAG,OAAO,CAAC;IA6B7B,CAAC;IAvBS,oBAAoB,CAAC,IAAU;;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAEvB,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,MAAK,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAA,EAAE;YACjD,IAAI,CAAC,GAAG,CAAC,SAAS,CAChB,kBAAkB,EAClB;gBACE,QAAQ,EAAE,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,mCAAI,EAAE;gBACvC,MAAM,EAAE,IAAI,CAAC,IAAI;aAClB,EACD,SAAS,EACT,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB,CAAC;YAEF,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;SAC1B;IACH,CAAC;IAED,UAAU;QACR,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE5C,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF","sourcesContent":["import { BaseInstrumentation, EVENT_VIEW_CHANGED, Meta, MetaView, VERSION } from '@grafana/faro-core';\n\n// all this does is send VIEW_CHANGED event\nexport class ViewInstrumentation extends BaseInstrumentation {\n readonly name = '@grafana/faro-web-sdk:instrumentation-view';\n readonly version = VERSION;\n\n // previously notified view, to ensure we don't send view changed\n // event twice for the same view\n private notifiedView: MetaView | undefined;\n\n private sendViewChangedEvent(meta: Meta): void {\n const view = meta.view;\n\n if (view && view.name !== this.notifiedView?.name) {\n this.api.pushEvent(\n EVENT_VIEW_CHANGED,\n {\n fromView: this.notifiedView?.name ?? '',\n toView: view.name,\n },\n undefined,\n { skipDedupe: true }\n );\n\n this.notifiedView = view;\n }\n }\n\n initialize() {\n this.sendViewChangedEvent(this.metas.value);\n\n this.metas.addListener(this.sendViewChangedEvent.bind(this));\n }\n}\n"]}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { isLocalStorageAvailable, isSessionStorageAvailable, webStorageType, getItem, isWebStorageAvailable, removeItem, setItem, } from './webStorage';
|
|
2
|
+
export { throttle } from './throttle';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,OAAO,EACP,qBAAqB,EACrB,UAAU,EACV,OAAO,GACR,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export {\n isLocalStorageAvailable,\n isSessionStorageAvailable,\n webStorageType,\n getItem,\n isWebStorageAvailable,\n removeItem,\n setItem,\n} from './webStorage';\n\nexport { throttle } from './throttle';\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export type { ConsoleInstrumentationOptions, ErrorEvent, ExtendedPromiseRejectio
|
|
|
7
7
|
export { browserMeta, createSession, defaultMetas, defaultViewMeta, pageMeta, sdkMeta } from './metas';
|
|
8
8
|
export { ConsoleTransport, FetchTransport } from './transports';
|
|
9
9
|
export type { ClockFn, ConsoleTransportOptions, FetchTransportOptions, FetchTransportRequestOptions, } from './transports';
|
|
10
|
-
export { faro, allLogLevels, BaseExtension, BaseInstrumentation, BaseTransport, Conventions, createInternalLogger, createPromiseBuffer, deepEqual, defaultExceptionType, defaultGlobalObjectKey, defaultInternalLoggerLevel, defaultLogLevel, genShortID, getCurrentTimestamp, getInternalFaroFromGlobalObject, getTransportBody, globalObject, internalGlobalObjectKey, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isInternalFaroOnGlobalObject, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, InternalLoggerLevel, LogLevel, noop, setInternalFaroOnGlobalObject, TransportItemType, transportItemTypeToBodyKey, VERSION, } from '@grafana/faro-core';
|
|
10
|
+
export { faro, allLogLevels, BaseExtension, BaseInstrumentation, BaseTransport, Conventions, createInternalLogger, createPromiseBuffer, deepEqual, defaultExceptionType, defaultGlobalObjectKey, defaultInternalLoggerLevel, defaultLogLevel, genShortID, getCurrentTimestamp, getInternalFaroFromGlobalObject, getTransportBody, globalObject, internalGlobalObjectKey, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isInternalFaroOnGlobalObject, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, InternalLoggerLevel, LogLevel, noop, setInternalFaroOnGlobalObject, TransportItemType, transportItemTypeToBodyKey, VERSION, EVENT_CLICK, EVENT_NAVIGATION, EVENT_ROUTE_CHANGE, EVENT_SESSION_EXTEND, EVENT_SESSION_RESUME, EVENT_SESSION_START, EVENT_VIEW_CHANGED, } from '@grafana/faro-core';
|
|
11
11
|
export type { Faro, API, APIEvent, BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue, BeforeSendHook, BufferItem, Config, EventAttributes, EventEvent, EventsAPI, ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, Extension, GlobalObject, Instrumentation, Instrumentations, InternalLogger, LogContext, LogEvent, LogsAPI, MeasurementEvent, MeasurementsAPI, Meta, MetaAPI, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, MetaView, OTELApi, Patterns, PromiseBuffer, PromiseBufferOptions, PromiseProducer, PushErrorOptions, PushLogOptions, PushMeasurementOptions, Stacktrace, StacktraceParser, TraceContext, TraceEvent, TracesAPI, Transport, TransportBody, TransportItem, TransportItemPayload, Transports, UnpatchedConsole, } from '@grafana/faro-core';
|
|
12
|
+
export { PersistentSessionsManager, VolatileSessionsManager, MAX_SESSION_PERSISTENCE_TIME, MAX_SESSION_PERSISTENCE_TIME_BUFFER, SESSION_EXPIRATION_TIME, SESSION_INACTIVITY_TIME, STORAGE_KEY, } from './instrumentations/session';
|
|
@@ -3,7 +3,7 @@ import type { ConsoleInstrumentationOptions } from './types';
|
|
|
3
3
|
export declare class ConsoleInstrumentation extends BaseInstrumentation {
|
|
4
4
|
private options;
|
|
5
5
|
readonly name = "@grafana/faro-web-sdk:instrumentation-console";
|
|
6
|
-
readonly version = "1.
|
|
6
|
+
readonly version = "1.3.0";
|
|
7
7
|
static defaultDisabledLevels: LogLevel[];
|
|
8
8
|
constructor(options?: ConsoleInstrumentationOptions);
|
|
9
9
|
initialize(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class ErrorsInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-errors";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.3.0";
|
|
5
5
|
initialize(): void;
|
|
6
6
|
}
|
|
@@ -5,3 +5,4 @@ export { buildStackFrame, ErrorsInstrumentation, getDataFromSafariExtensions, ge
|
|
|
5
5
|
export type { ErrorEvent, ExtendedPromiseRejectionEvent } from './errors';
|
|
6
6
|
export { ViewInstrumentation } from './view';
|
|
7
7
|
export { WebVitalsInstrumentation } from './webVitals';
|
|
8
|
+
export { PersistentSessionsManager, VolatileSessionsManager, MAX_SESSION_PERSISTENCE_TIME, MAX_SESSION_PERSISTENCE_TIME_BUFFER, SESSION_EXPIRATION_TIME, SESSION_INACTIVITY_TIME, STORAGE_KEY, } from './session';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { SessionInstrumentation } from './instrumentation';
|
|
2
|
-
export
|
|
2
|
+
export { MAX_SESSION_PERSISTENCE_TIME, MAX_SESSION_PERSISTENCE_TIME_BUFFER, PersistentSessionsManager, SESSION_EXPIRATION_TIME, SESSION_INACTIVITY_TIME, STORAGE_KEY, STORAGE_UPDATE_DELAY, VolatileSessionsManager, defaultSessionTrackingConfig, isSampled, } from './sessionManager';
|
|
3
|
+
export type { FaroUserSession } from './sessionManager';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class SessionInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-session";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.3.0";
|
|
5
5
|
private notifiedSession;
|
|
6
6
|
private sendSessionStartEvent;
|
|
7
|
-
private getSessionManagerInstanceByConfiguredStrategy;
|
|
8
7
|
private createInitialSessionMeta;
|
|
9
8
|
initialize(): void;
|
|
10
9
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { FaroUserSession } from './types';
|
|
2
2
|
export declare class PersistentSessionsManager {
|
|
3
|
-
private initialSessionId?;
|
|
4
3
|
private static storageTypeLocal;
|
|
5
4
|
private updateUserSession;
|
|
6
|
-
constructor(
|
|
5
|
+
constructor();
|
|
7
6
|
static removeUserSession(): void;
|
|
8
7
|
static storeUserSession(session: FaroUserSession): void;
|
|
9
8
|
static fetchUserSession(): FaroUserSession | null;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { FaroUserSession } from './types';
|
|
2
2
|
export declare class VolatileSessionsManager {
|
|
3
|
-
private initialSessionId?;
|
|
4
3
|
private static storageTypeSession;
|
|
5
4
|
private updateUserSession;
|
|
6
|
-
constructor(
|
|
5
|
+
constructor();
|
|
7
6
|
static removeUserSession(): void;
|
|
8
7
|
static storeUserSession(session: FaroUserSession): void;
|
|
9
8
|
static fetchUserSession(): FaroUserSession | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { PersistentSessionsManager } from './PersistentSessionsManager';
|
|
2
2
|
export { VolatileSessionsManager } from './VolatileSessionManager';
|
|
3
|
-
export
|
|
3
|
+
export { MAX_SESSION_PERSISTENCE_TIME, MAX_SESSION_PERSISTENCE_TIME_BUFFER, SESSION_EXPIRATION_TIME, SESSION_INACTIVITY_TIME, STORAGE_KEY, STORAGE_UPDATE_DELAY, defaultSessionTrackingConfig, } from './sessionConstants';
|
|
4
|
+
export { isSampled } from './sampling';
|
|
4
5
|
export type { FaroUserSession } from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSampled(): boolean;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import type { Config } from '@grafana/faro-core';
|
|
1
2
|
export declare const STORAGE_KEY = "__FARO_SESSION__";
|
|
2
3
|
export declare const SESSION_EXPIRATION_TIME: number;
|
|
3
4
|
export declare const SESSION_INACTIVITY_TIME: number;
|
|
4
5
|
export declare const STORAGE_UPDATE_DELAY: number;
|
|
5
6
|
export declare const MAX_SESSION_PERSISTENCE_TIME_BUFFER: number;
|
|
6
7
|
export declare const MAX_SESSION_PERSISTENCE_TIME: number;
|
|
7
|
-
export declare const defaultSessionTrackingConfig:
|
|
8
|
-
readonly enabled: false;
|
|
9
|
-
readonly persistent: false;
|
|
10
|
-
readonly maxSessionPersistenceTime: number;
|
|
11
|
-
};
|
|
8
|
+
export declare const defaultSessionTrackingConfig: Config['sessionTracking'];
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { FaroUserSession } from './types';
|
|
2
|
-
|
|
2
|
+
type CreateUserSessionObjectParams = {
|
|
3
|
+
sessionId?: string;
|
|
4
|
+
isSampled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function createUserSessionObject({ sessionId, isSampled, }?: CreateUserSessionObjectParams): FaroUserSession;
|
|
3
7
|
export declare function isUserSessionValid(session: FaroUserSession | null): boolean;
|
|
4
8
|
type GetUserSessionUpdaterParams = {
|
|
5
9
|
storeUserSession: (session: FaroUserSession) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class ViewInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-view";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.3.0";
|
|
5
5
|
private notifiedView;
|
|
6
6
|
private sendViewChangedEvent;
|
|
7
7
|
initialize(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseInstrumentation } from '@grafana/faro-core';
|
|
2
2
|
export declare class WebVitalsInstrumentation extends BaseInstrumentation {
|
|
3
3
|
readonly name = "@grafana/faro-web-sdk:instrumentation-web-vitals";
|
|
4
|
-
readonly version = "1.
|
|
4
|
+
readonly version = "1.3.0";
|
|
5
5
|
static mapping: {
|
|
6
6
|
cls: (onReport: import("web-vitals").CLSReportCallback, opts?: import("web-vitals").ReportOpts | undefined) => void;
|
|
7
7
|
fcp: (onReport: import("web-vitals").FCPReportCallback, opts?: import("web-vitals").ReportOpts | undefined) => void;
|
|
@@ -4,7 +4,7 @@ import type { ConsoleTransportOptions } from './types';
|
|
|
4
4
|
export declare class ConsoleTransport extends BaseTransport {
|
|
5
5
|
private options;
|
|
6
6
|
readonly name = "@grafana/faro-web-sdk:transport-console";
|
|
7
|
-
readonly version = "1.
|
|
7
|
+
readonly version = "1.3.0";
|
|
8
8
|
constructor(options?: ConsoleTransportOptions);
|
|
9
9
|
send(item: TransportItem): void;
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import type { FetchTransportOptions } from './types';
|
|
|
4
4
|
export declare class FetchTransport extends BaseTransport {
|
|
5
5
|
private options;
|
|
6
6
|
readonly name = "@grafana/faro-web-sdk:transport-fetch";
|
|
7
|
-
readonly version = "1.
|
|
7
|
+
readonly version = "1.3.0";
|
|
8
8
|
promiseBuffer: PromiseBuffer<Response | void>;
|
|
9
9
|
private readonly rateLimitBackoffMs;
|
|
10
10
|
private readonly getNow;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { isLocalStorageAvailable, isSessionStorageAvailable, webStorageType, getItem, isWebStorageAvailable, removeItem, setItem, } from './webStorage';
|
|
2
|
+
export { throttle } from './throttle';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/faro-web-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Faro instrumentations, metas, transports for web.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"observability",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"quality:circular-deps": "madge --circular ."
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@grafana/faro-core": "^1.
|
|
55
|
+
"@grafana/faro-core": "^1.3.0",
|
|
56
56
|
"ua-parser-js": "^1.0.32",
|
|
57
57
|
"web-vitals": "^3.1.1"
|
|
58
58
|
},
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "aaa72f48785d422b9093833c90de9ae688149d9a"
|
|
67
67
|
}
|