@embrace-io/web-sdk
Version:
106 lines (105 loc) • 3.61 kB
JavaScript
import { NoOpUserSessionManager } from "../NoOpUserSessionManager/NoOpUserSessionManager.js";
//#region src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts
const NOOP_USER_SESSION_MANAGER = new NoOpUserSessionManager();
var ProxyUserSessionManager = class {
_delegate;
getDelegate() {
return this._delegate ?? NOOP_USER_SESSION_MANAGER;
}
setDelegate(delegate) {
this._delegate = delegate;
}
addBreadcrumb(name) {
this.getDelegate().addBreadcrumb(name);
}
addProperty(key, value, options) {
this.getDelegate().addProperty(key, value, options);
}
removeProperty(key) {
this.getDelegate().removeProperty(key);
}
endSessionSpan() {
this.getDelegate().endSessionSpan();
}
/** @deprecated Will be removed in a future major version, always returns null. */
currentSessionAsReadableSpan(reason) {
return this.getDelegate().currentSessionAsReadableSpan(reason);
}
/** @deprecated Will be removed in a future version, use getUserSessionId(); returns null when no user session is active. */
getSessionId() {
return this.getDelegate().getSessionId();
}
/** @deprecated Will be removed in a future version, always returns null. Use getPreviousUserSessionId(). */
getPreviousSessionId() {
return null;
}
/** @deprecated Will be removed in a future version, use getSessionPartSpan(); returns null when no part is active. */
getSessionSpan() {
return this.getDelegate().getSessionSpan();
}
/** @deprecated Will be removed in a future version, use getUserSessionStartTime(); returns null when no user session is active. */
getSessionStartTime() {
return this.getDelegate().getSessionStartTime();
}
/** @deprecated Will be removed in a future version, no-op. */
startSessionSpan(_options) {}
/** @deprecated Will be removed in a future version, the returned unsubscribe is a no-op. */
addSessionStartedListener(_listener) {
return () => {};
}
/** @deprecated Will be removed in a future version, the returned unsubscribe is a no-op. */
addSessionEndedListener(_listener) {
return () => {};
}
getUserSessionId() {
return this.getDelegate().getUserSessionId();
}
getPreviousUserSessionId() {
return this.getDelegate().getPreviousUserSessionId();
}
getUserSessionStartTime() {
return this.getDelegate().getUserSessionStartTime();
}
endUserSession() {
this.getDelegate().endUserSession();
}
getUserSessionAttributes() {
return this.getDelegate().getUserSessionAttributes();
}
getSessionPartProperties() {
return this.getDelegate().getSessionPartProperties();
}
getSessionPartId() {
return this.getDelegate().getSessionPartId();
}
getSessionPartSpan() {
return this.getDelegate().getSessionPartSpan();
}
startSessionPartInternal(options) {
this.getDelegate().startSessionPartInternal(options);
}
endSessionPartInternal(options) {
this.getDelegate().endSessionPartInternal(options);
}
rolloverSessionPartInternal(options) {
this.getDelegate().rolloverSessionPartInternal(options);
}
incrSessionPartCountForKey(key) {
this.getDelegate().incrSessionPartCountForKey(key);
}
incrNextSessionPartCountForKey(key) {
this.getDelegate().incrNextSessionPartCountForKey(key);
}
addSessionPartStartedListener(listener) {
return this.getDelegate().addSessionPartStartedListener(listener);
}
addSessionPartEndedListener(listener) {
return this.getDelegate().addSessionPartEndedListener(listener);
}
setTracerProvider(tracerProvider) {
this.getDelegate().setTracerProvider(tracerProvider);
}
};
//#endregion
export { ProxyUserSessionManager };
//# sourceMappingURL=ProxyUserSessionManager.js.map