n4auth/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.d.ts

45 lines
1.6 KiB
TypeScript
Raw Normal View History

2021-07-15 20:10:20 +00:00
import { CacheManager } from "../../cache/CacheManager";
import { AuthError } from "../../error/AuthError";
import { ServerTelemetryRequest } from "./ServerTelemetryRequest";
import { ServerTelemetryEntity } from "../../cache/entities/ServerTelemetryEntity";
export declare class ServerTelemetryManager {
private cacheManager;
private apiId;
private correlationId;
private forceRefresh;
private telemetryCacheKey;
private wrapperSKU;
private wrapperVer;
constructor(telemetryRequest: ServerTelemetryRequest, cacheManager: CacheManager);
/**
* API to add MSER Telemetry to request
*/
generateCurrentRequestHeaderValue(): string;
/**
* API to add MSER Telemetry for the last failed request
*/
generateLastRequestHeaderValue(): string;
/**
* API to cache token failures for MSER data capture
* @param error
*/
cacheFailedRequest(error: AuthError): void;
/**
* Update server telemetry cache entry by incrementing cache hit counter
*/
incrementCacheHits(): number;
/**
* Get the server telemetry entity from cache or initialize a new one
*/
getLastRequests(): ServerTelemetryEntity;
/**
* Remove server telemetry cache entry
*/
clearTelemetryCache(): void;
/**
* Returns the maximum number of errors that can be flushed to the server in the next network request
* @param serverTelemetryEntity
*/
static maxErrorsToSend(serverTelemetryEntity: ServerTelemetryEntity): number;
}
//# sourceMappingURL=ServerTelemetryManager.d.ts.map