@fluidframework/telemetry-utils 2.0.0-internal.7.0.0 → 2.0.0-internal.7.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/telemetry-utils
2
2
 
3
+ ## 2.0.0-internal.7.1.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.0.0-internal.7.0.0
4
8
 
5
9
  ### Major Changes
@@ -1,4 +1,12 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-common-report.json"
3
+ "extends": "@fluidframework/build-common/api-extractor-base.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ "ae-missing-release-tag": {
7
+ // TODO: Fix violations and remove this rule override
8
+ "logLevel": "none"
9
+ }
10
+ }
11
+ }
4
12
  }
@@ -0,0 +1,444 @@
1
+ ## API Report File for "@fluidframework/telemetry-utils"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { EventEmitter } from 'events';
8
+ import { EventEmitterEventType } from '@fluid-internal/client-utils';
9
+ import { IDisposable } from '@fluidframework/core-interfaces';
10
+ import { IErrorBase } from '@fluidframework/core-interfaces';
11
+ import { IEvent } from '@fluidframework/core-interfaces';
12
+ import { IGenericError } from '@fluidframework/core-interfaces';
13
+ import { ILoggingError } from '@fluidframework/core-interfaces';
14
+ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
15
+ import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
16
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
17
+ import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
18
+ import { ITelemetryErrorEvent } from '@fluidframework/core-interfaces';
19
+ import { ITelemetryGenericEvent } from '@fluidframework/core-interfaces';
20
+ import { ITelemetryPerformanceEvent } from '@fluidframework/core-interfaces';
21
+ import { ITelemetryProperties } from '@fluidframework/core-interfaces';
22
+ import { IUsageError } from '@fluidframework/core-interfaces';
23
+ import { Lazy } from '@fluidframework/core-utils';
24
+ import { LogLevel } from '@fluidframework/core-interfaces';
25
+ import { Tagged } from '@fluidframework/core-interfaces';
26
+ import { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
27
+ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
28
+ import { TypedEventEmitter } from '@fluid-internal/client-utils';
29
+
30
+ // @public (undocumented)
31
+ export type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;
32
+
33
+ // @public (undocumented)
34
+ export const connectedEventName = "connected";
35
+
36
+ // @public
37
+ export function createChildLogger(props?: {
38
+ logger?: ITelemetryBaseLogger;
39
+ namespace?: string;
40
+ properties?: ITelemetryLoggerPropertyBags;
41
+ }): ITelemetryLoggerExt;
42
+
43
+ // @public (undocumented)
44
+ export function createChildMonitoringContext(props: Parameters<typeof createChildLogger>[0]): MonitoringContext;
45
+
46
+ // @public
47
+ export function createMultiSinkLogger(props: {
48
+ namespace?: string;
49
+ properties?: ITelemetryLoggerPropertyBags;
50
+ loggers?: (ITelemetryBaseLogger | undefined)[];
51
+ tryInheritProperties?: true;
52
+ }): ITelemetryLoggerExt;
53
+
54
+ // @internal
55
+ export function createSampledLogger(logger: ITelemetryLoggerExt, eventSampler?: IEventSampler): ISampledTelemetryLogger;
56
+
57
+ // @internal
58
+ export class DataCorruptionError extends LoggingError implements IErrorBase, IFluidErrorBase {
59
+ constructor(message: string, props: ITelemetryBaseProperties);
60
+ // (undocumented)
61
+ readonly canRetry = false;
62
+ // (undocumented)
63
+ readonly errorType: "dataCorruptionError";
64
+ }
65
+
66
+ // @internal
67
+ export class DataProcessingError extends LoggingError implements IErrorBase, IFluidErrorBase {
68
+ // (undocumented)
69
+ readonly canRetry = false;
70
+ static create(errorMessage: string, dataProcessingCodepath: string, sequencedMessage?: ISequencedDocumentMessage, props?: ITelemetryBaseProperties): IFluidErrorBase;
71
+ readonly errorType: "dataProcessingError";
72
+ static wrapIfUnrecognized(originalError: unknown, dataProcessingCodepath: string, messageLike?: Partial<Pick<ISequencedDocumentMessage, "clientId" | "sequenceNumber" | "clientSequenceNumber" | "referenceSequenceNumber" | "minimumSequenceNumber" | "timestamp">>): IFluidErrorBase;
73
+ }
74
+
75
+ // @public (undocumented)
76
+ export const disconnectedEventName = "disconnected";
77
+
78
+ // @public
79
+ export class EventEmitterWithErrorHandling<TEvent extends IEvent = IEvent> extends TypedEventEmitter<TEvent> {
80
+ constructor(errorHandler: (eventName: EventEmitterEventType, error: any) => void);
81
+ // (undocumented)
82
+ emit(event: EventEmitterEventType, ...args: unknown[]): boolean;
83
+ }
84
+
85
+ // @public (undocumented)
86
+ export const eventNamespaceSeparator: ":";
87
+
88
+ // @internal
89
+ export function extractLogSafeErrorProperties(error: unknown, sanitizeStack: boolean): {
90
+ message: string;
91
+ errorType?: string | undefined;
92
+ stack?: string | undefined;
93
+ };
94
+
95
+ // @public
96
+ export const extractSafePropertiesFromMessage: (messageLike: Partial<Pick<ISequencedDocumentMessage, "clientId" | "sequenceNumber" | "clientSequenceNumber" | "referenceSequenceNumber" | "minimumSequenceNumber" | "timestamp">>) => {
97
+ messageClientId: string | undefined;
98
+ messageSequenceNumber: number | undefined;
99
+ messageClientSequenceNumber: number | undefined;
100
+ messageReferenceSequenceNumber: number | undefined;
101
+ messageMinimumSequenceNumber: number | undefined;
102
+ messageTimestamp: number | undefined;
103
+ };
104
+
105
+ // @public (undocumented)
106
+ export function formatTick(tick: number): number;
107
+
108
+ // @internal
109
+ export function generateErrorWithStack(): Error;
110
+
111
+ // @internal
112
+ export function generateStack(): string | undefined;
113
+
114
+ // @internal
115
+ export class GenericError extends LoggingError implements IGenericError, IFluidErrorBase {
116
+ constructor(message: string, error?: any, props?: ITelemetryBaseProperties);
117
+ // (undocumented)
118
+ readonly error?: any;
119
+ // (undocumented)
120
+ readonly errorType: "genericError";
121
+ }
122
+
123
+ // @internal
124
+ export const getCircularReplacer: () => (key: string, value: unknown) => any;
125
+
126
+ // @public
127
+ export const hasErrorInstanceId: (x: unknown) => x is {
128
+ errorInstanceId: string;
129
+ };
130
+
131
+ // @public
132
+ export interface IConfigProvider extends IConfigProviderBase {
133
+ // (undocumented)
134
+ getBoolean(name: string): boolean | undefined;
135
+ // (undocumented)
136
+ getBooleanArray(name: string): boolean[] | undefined;
137
+ // (undocumented)
138
+ getNumber(name: string): number | undefined;
139
+ // (undocumented)
140
+ getNumberArray(name: string): number[] | undefined;
141
+ // (undocumented)
142
+ getString(name: string): string | undefined;
143
+ // (undocumented)
144
+ getStringArray(name: string): string[] | undefined;
145
+ }
146
+
147
+ // @public
148
+ export interface IConfigProviderBase {
149
+ // (undocumented)
150
+ getRawConfig(name: string): ConfigTypes;
151
+ }
152
+
153
+ // @internal
154
+ export interface IEventSampler {
155
+ // (undocumented)
156
+ sample: () => boolean | undefined;
157
+ }
158
+
159
+ // @internal
160
+ export interface IFluidErrorAnnotations {
161
+ props?: ITelemetryBaseProperties;
162
+ }
163
+
164
+ // @public
165
+ export interface IFluidErrorBase extends Error {
166
+ addTelemetryProperties: (props: ITelemetryProperties) => void;
167
+ readonly errorInstanceId: string;
168
+ readonly errorType: string;
169
+ getTelemetryProperties(): ITelemetryProperties;
170
+ readonly message: string;
171
+ readonly name: string;
172
+ readonly stack?: string;
173
+ }
174
+
175
+ // @public
176
+ export interface IPerformanceEventMarkers {
177
+ // (undocumented)
178
+ cancel?: "generic" | "error";
179
+ // (undocumented)
180
+ end?: true;
181
+ // (undocumented)
182
+ start?: true;
183
+ }
184
+
185
+ // @internal
186
+ export interface ISampledTelemetryLogger extends ITelemetryLoggerExt {
187
+ isSamplingDisabled: boolean;
188
+ }
189
+
190
+ // @internal
191
+ export function isExternalError(error: unknown): boolean;
192
+
193
+ // @public
194
+ export function isFluidError(error: unknown): error is IFluidErrorBase;
195
+
196
+ // @public
197
+ export const isILoggingError: (x: unknown) => x is ILoggingError;
198
+
199
+ // @public
200
+ export function isTaggedTelemetryPropertyValue(x: Tagged<TelemetryEventPropertyTypeExt> | TelemetryEventPropertyTypeExt): x is Tagged<TelemetryEventPropertyTypeExt>;
201
+
202
+ // @public
203
+ export function isValidLegacyError(error: unknown): error is Omit<IFluidErrorBase, "errorInstanceId">;
204
+
205
+ // @public @deprecated
206
+ export interface ITaggedTelemetryPropertyTypeExt {
207
+ // (undocumented)
208
+ tag: string;
209
+ // (undocumented)
210
+ value: TelemetryEventPropertyTypeExt;
211
+ }
212
+
213
+ // @public
214
+ export interface ITelemetryErrorEventExt extends ITelemetryPropertiesExt {
215
+ // (undocumented)
216
+ eventName: string;
217
+ }
218
+
219
+ // @public
220
+ export interface ITelemetryEventExt extends ITelemetryPropertiesExt {
221
+ // (undocumented)
222
+ category: string;
223
+ // (undocumented)
224
+ eventName: string;
225
+ }
226
+
227
+ // @public
228
+ export interface ITelemetryGenericEventExt extends ITelemetryPropertiesExt {
229
+ // (undocumented)
230
+ category?: TelemetryEventCategory;
231
+ // (undocumented)
232
+ eventName: string;
233
+ }
234
+
235
+ // @public
236
+ export interface ITelemetryLoggerExt extends ITelemetryBaseLogger {
237
+ sendErrorEvent(event: ITelemetryErrorEventExt, error?: unknown): void;
238
+ sendPerformanceEvent(event: ITelemetryPerformanceEventExt, error?: unknown, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
239
+ sendTelemetryEvent(event: ITelemetryGenericEventExt, error?: unknown, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
240
+ }
241
+
242
+ // @public (undocumented)
243
+ export interface ITelemetryLoggerPropertyBag {
244
+ // (undocumented)
245
+ [index: string]: TelemetryEventPropertyTypes | (() => TelemetryEventPropertyTypes);
246
+ }
247
+
248
+ // @public (undocumented)
249
+ export interface ITelemetryLoggerPropertyBags {
250
+ // (undocumented)
251
+ all?: ITelemetryLoggerPropertyBag;
252
+ // (undocumented)
253
+ error?: ITelemetryLoggerPropertyBag;
254
+ }
255
+
256
+ // @public
257
+ export interface ITelemetryPerformanceEventExt extends ITelemetryGenericEventExt {
258
+ // (undocumented)
259
+ duration?: number;
260
+ }
261
+
262
+ // @public
263
+ export interface ITelemetryPropertiesExt {
264
+ // (undocumented)
265
+ [index: string]: TelemetryEventPropertyTypeExt | Tagged<TelemetryEventPropertyTypeExt>;
266
+ }
267
+
268
+ // @public (undocumented)
269
+ export function loggerToMonitoringContext<L extends ITelemetryBaseLogger = ITelemetryLoggerExt>(logger: L): MonitoringContext<L>;
270
+
271
+ // @internal
272
+ export class LoggingError extends Error implements ILoggingError, Omit<IFluidErrorBase, "errorType"> {
273
+ constructor(message: string, props?: ITelemetryBaseProperties, omitPropsFromLogging?: Set<string>);
274
+ addTelemetryProperties(props: ITelemetryBaseProperties): void;
275
+ // (undocumented)
276
+ get errorInstanceId(): string;
277
+ getTelemetryProperties(): ITelemetryBaseProperties;
278
+ // (undocumented)
279
+ overwriteErrorInstanceId(id: string): void;
280
+ static typeCheck(object: unknown): object is LoggingError;
281
+ }
282
+
283
+ // @public
284
+ export function logIfFalse(condition: unknown, logger: ITelemetryBaseLogger, event: string | ITelemetryGenericEvent): condition is true;
285
+
286
+ // @public (undocumented)
287
+ export function mixinMonitoringContext<L extends ITelemetryBaseLogger = ITelemetryLoggerExt>(logger: L, ...configs: (IConfigProviderBase | undefined)[]): MonitoringContext<L>;
288
+
289
+ // @public
290
+ export class MockLogger implements ITelemetryBaseLogger {
291
+ constructor(minLogLevel?: LogLevel | undefined);
292
+ assertMatch(expectedEvents: Omit<ITelemetryBaseEvent, "category">[], message?: string, inlineDetailsProp?: boolean): void;
293
+ assertMatchAny(expectedEvents: Omit<ITelemetryBaseEvent, "category">[], message?: string, inlineDetailsProp?: boolean): void;
294
+ assertMatchNone(disallowedEvents: Omit<ITelemetryBaseEvent, "category">[], message?: string, inlineDetailsProp?: boolean): void;
295
+ assertMatchStrict(expectedEvents: Omit<ITelemetryBaseEvent, "category">[], message?: string, inlineDetailsProp?: boolean): void;
296
+ // (undocumented)
297
+ clear(): void;
298
+ // (undocumented)
299
+ events: ITelemetryBaseEvent[];
300
+ matchAnyEvent(expectedEvents: Omit<ITelemetryBaseEvent, "category">[], inlineDetailsProp?: boolean): boolean;
301
+ matchEvents(expectedEvents: Omit<ITelemetryBaseEvent, "category">[], inlineDetailsProp?: boolean): boolean;
302
+ matchEventStrict(expectedEvents: Omit<ITelemetryBaseEvent, "category">[], inlineDetailsProp?: boolean): boolean;
303
+ // (undocumented)
304
+ readonly minLogLevel?: LogLevel | undefined;
305
+ // (undocumented)
306
+ send(event: ITelemetryBaseEvent): void;
307
+ // (undocumented)
308
+ toTelemetryLogger(): ITelemetryLoggerExt;
309
+ }
310
+
311
+ // @public
312
+ export interface MonitoringContext<L extends ITelemetryBaseLogger = ITelemetryLoggerExt> {
313
+ // (undocumented)
314
+ config: IConfigProvider;
315
+ // (undocumented)
316
+ logger: L;
317
+ }
318
+
319
+ // @internal
320
+ export const NORMALIZED_ERROR_TYPE = "genericError";
321
+
322
+ // @internal
323
+ export function normalizeError(error: unknown, annotations?: IFluidErrorAnnotations): IFluidErrorBase;
324
+
325
+ // @public
326
+ export function numberFromString(str: string | null | undefined): string | number | undefined;
327
+
328
+ // @internal
329
+ export function overwriteStack(error: IFluidErrorBase | LoggingError, stack: string): void;
330
+
331
+ // @public
332
+ export class PerformanceEvent {
333
+ protected constructor(logger: ITelemetryLoggerExt, event: ITelemetryGenericEvent, markers?: IPerformanceEventMarkers, recordHeapSize?: boolean, emitLogs?: boolean);
334
+ // (undocumented)
335
+ cancel(props?: ITelemetryProperties, error?: unknown): void;
336
+ // (undocumented)
337
+ get duration(): number;
338
+ // (undocumented)
339
+ end(props?: ITelemetryProperties): void;
340
+ reportEvent(eventNameSuffix: string, props?: ITelemetryProperties, error?: unknown): void;
341
+ // (undocumented)
342
+ reportProgress(props?: ITelemetryProperties, eventNameSuffix?: string): void;
343
+ static start(logger: ITelemetryLoggerExt, event: ITelemetryGenericEvent, markers?: IPerformanceEventMarkers, recordHeapSize?: boolean, emitLogs?: boolean): PerformanceEvent;
344
+ static timedExec<T>(logger: ITelemetryLoggerExt, event: ITelemetryGenericEvent, callback: (event: PerformanceEvent) => T, markers?: IPerformanceEventMarkers, sampleThreshold?: number): T;
345
+ static timedExecAsync<T>(logger: ITelemetryLoggerExt, event: ITelemetryGenericEvent, callback: (event: PerformanceEvent) => Promise<T>, markers?: IPerformanceEventMarkers, recordHeapSize?: boolean, sampleThreshold?: number): Promise<T>;
346
+ }
347
+
348
+ // @public
349
+ export function raiseConnectedEvent(logger: ITelemetryLoggerExt, emitter: EventEmitter, connected: boolean, clientId?: string, disconnectedReason?: string): void;
350
+
351
+ // @public (undocumented)
352
+ export function safeRaiseEvent(emitter: EventEmitter, logger: ITelemetryLoggerExt, event: string, ...args: unknown[]): void;
353
+
354
+ // @public
355
+ export class SampledTelemetryHelper implements IDisposable {
356
+ constructor(eventBase: ITelemetryGenericEvent, logger: ITelemetryLoggerExt, sampleThreshold: number, includeAggregateMetrics?: boolean, perBucketProperties?: Map<string, ITelemetryProperties>);
357
+ // (undocumented)
358
+ dispose(error?: Error | undefined): void;
359
+ // (undocumented)
360
+ disposed: boolean;
361
+ measure<T>(codeToMeasure: () => T, bucket?: string): T;
362
+ }
363
+
364
+ // @public
365
+ export const sessionStorageConfigProvider: Lazy<IConfigProviderBase>;
366
+
367
+ // @public
368
+ export const tagCodeArtifacts: <T extends Record<string, TelemetryEventPropertyType | (() => TelemetryBaseEventPropertyType)>>(values: T) => { [P in keyof T]: (T[P] extends () => TelemetryBaseEventPropertyType ? () => {
369
+ value: ReturnType<T[P]>;
370
+ tag: TelemetryDataTag.CodeArtifact;
371
+ } : {
372
+ value: Exclude<T[P], undefined>;
373
+ tag: TelemetryDataTag.CodeArtifact;
374
+ }) | (T[P] extends undefined ? undefined : never); };
375
+
376
+ // @public (undocumented)
377
+ export const tagData: <T extends TelemetryDataTag, V extends Record<string, TelemetryEventPropertyType | (() => TelemetryBaseEventPropertyType)>>(tag: T, values: V) => { [P in keyof V]: (V[P] extends () => TelemetryBaseEventPropertyType ? () => {
378
+ value: ReturnType<V[P]>;
379
+ tag: T;
380
+ } : {
381
+ value: Exclude<V[P], undefined>;
382
+ tag: T;
383
+ }) | (V[P] extends undefined ? undefined : never); };
384
+
385
+ // @public @deprecated (undocumented)
386
+ export class TaggedLoggerAdapter implements ITelemetryBaseLogger {
387
+ constructor(logger: ITelemetryBaseLogger);
388
+ // (undocumented)
389
+ send(eventWithTagsMaybe: ITelemetryBaseEvent): void;
390
+ }
391
+
392
+ // @public
393
+ export enum TelemetryDataTag {
394
+ CodeArtifact = "CodeArtifact",
395
+ UserData = "UserData"
396
+ }
397
+
398
+ // @public
399
+ export type TelemetryEventCategory = "generic" | "error" | "performance";
400
+
401
+ // @public
402
+ export type TelemetryEventPropertyTypeExt = string | number | boolean | undefined | (string | number | boolean)[] | {
403
+ [key: string]: // Flat objects can have the same properties as the event itself
404
+ string | number | boolean | undefined | (string | number | boolean)[];
405
+ };
406
+
407
+ // @public (undocumented)
408
+ export type TelemetryEventPropertyTypes = ITelemetryBaseProperties[string];
409
+
410
+ // @public @deprecated
411
+ export class TelemetryNullLogger implements ITelemetryLoggerExt {
412
+ // (undocumented)
413
+ send(event: ITelemetryBaseEvent): void;
414
+ // (undocumented)
415
+ sendErrorEvent(event: ITelemetryErrorEvent, error?: unknown): void;
416
+ // (undocumented)
417
+ sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: unknown): void;
418
+ // (undocumented)
419
+ sendTelemetryEvent(event: ITelemetryGenericEvent, error?: unknown): void;
420
+ }
421
+
422
+ // @public
423
+ export class ThresholdCounter {
424
+ constructor(threshold: number, logger: ITelemetryLoggerExt, thresholdMultiple?: number);
425
+ send(eventName: string, value: number): void;
426
+ sendIfMultiple(eventName: string, value: number): void;
427
+ }
428
+
429
+ // @internal
430
+ export class UsageError extends LoggingError implements IUsageError, IFluidErrorBase {
431
+ constructor(message: string, props?: ITelemetryBaseProperties);
432
+ // (undocumented)
433
+ readonly errorType: "usageError";
434
+ }
435
+
436
+ // @internal
437
+ export function wrapError<T extends LoggingError>(innerError: unknown, newErrorFn: (message: string) => T): T;
438
+
439
+ // @internal
440
+ export function wrapErrorAndLog<T extends LoggingError>(innerError: unknown, newErrorFn: (message: string) => T, logger: ITelemetryLoggerExt): T;
441
+
442
+ // (No @packageDocumentation comment for this package)
443
+
444
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,aAAa,EACb,UAAU,EACV,wBAAwB,EACxB,WAAW,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,OAAO,EACN,YAAY,EAKZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,YAAa,YAAW,aAAa,EAAE,eAAe;aAW1C,KAAK,CAAC;IAVnD,QAAQ,CAAC,SAAS,iBAAgC;IAElD;;;;;OAKG;gBAGS,OAAO,EAAE,MAAM,EAAkB,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,wBAAwB;CAI1F;AAED;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,YAAa,YAAW,WAAW,EAAE,eAAe;IACnF,QAAQ,CAAC,SAAS,eAA8B;gBAEpC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,wBAAwB;CAG7D;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,UAAU,EAAE,eAAe;IAC3F,QAAQ,CAAC,SAAS,wBAAuC;IACzD,QAAQ,CAAC,QAAQ,SAAS;gBAEd,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB;CAG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GACzB,uBAAuB,GACvB,WAAW,CACb,CACD,GACC,eAAe;CA6BlB;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,gBAC/B,QACZ,KACC,yBAAyB,EACvB,UAAU,GACV,gBAAgB,GAChB,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,WAAW,CACb,CACD,KACC;IACF,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,2BAA2B,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,8BAA8B,EAAE,MAAM,GAAG,SAAS,CAAC;IACnD,4BAA4B,EAAE,MAAM,GAAG,SAAS,CAAC;IACjD,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CAQpC,CAAC"}
package/dist/error.js CHANGED
@@ -19,9 +19,10 @@ class GenericError extends errorLogging_1.LoggingError {
19
19
  * @param error - inner error object
20
20
  * @param props - Telemetry props to include when the error is logged
21
21
  */
22
+ constructor(message,
22
23
  // TODO: Use `unknown` instead (API breaking change because error is not just an input parameter, but a public member of the class)
23
24
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
- constructor(message, error, props) {
25
+ error, props) {
25
26
  // Don't try to log the inner error
26
27
  super(message, props, new Set(["error"]));
27
28
  this.error = error;
package/dist/error.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qEAMyC;AAGzC,iDAMwB;AAGxB;;;;GAIG;AACH,MAAa,YAAa,SAAQ,2BAAY;IAG7C;;;;;OAKG;IACH,mIAAmI;IACnI,iHAAiH;IACjH,YAAY,OAAe,EAAkB,KAAW,EAAE,KAAgC;QACzF,mCAAmC;QACnC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QA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contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tFluidErrorTypes,\n\tIGenericError,\n\tIErrorBase,\n\tITelemetryBaseProperties,\n\tIUsageError,\n} from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\n\nimport {\n\tLoggingError,\n\tNORMALIZED_ERROR_TYPE,\n\tisExternalError,\n\tnormalizeError,\n\twrapError,\n} from \"./errorLogging\";\nimport { IFluidErrorBase } from \"./fluidErrorBase\";\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n *\n * @internal\n */\nexport class GenericError extends LoggingError implements IGenericError, IFluidErrorBase {\n\treadonly errorType = FluidErrorTypes.genericError;\n\n\t/**\n\t * Create a new GenericError\n\t * @param message - Error message\n\t * @param error - inner error object\n\t * @param props - Telemetry props to include when the error is logged\n\t */\n\t// TODO: Use `unknown` instead (API breaking change because error is not just an input parameter, but a public member of the class)\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n\tconstructor(message: string, public readonly error?: any, props?: ITelemetryBaseProperties) {\n\t\t// Don't try to log the inner error\n\t\tsuper(message, props, new Set([\"error\"]));\n\t}\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n *\n * @internal\n */\nexport class UsageError extends LoggingError implements IUsageError, IFluidErrorBase {\n\treadonly errorType = FluidErrorTypes.usageError;\n\n\tconstructor(message: string, props?: ITelemetryBaseProperties) {\n\t\tsuper(message, { ...props, usageError: true });\n\t}\n}\n\n/**\n * DataCorruptionError indicates that we encountered definitive evidence that the data at rest\n * backing this container is corrupted, and this container would never be expected to load properly again\n *\n * @internal\n */\nexport class DataCorruptionError extends LoggingError implements IErrorBase, IFluidErrorBase {\n\treadonly errorType = FluidErrorTypes.dataCorruptionError;\n\treadonly canRetry = false;\n\n\tconstructor(message: string, props: ITelemetryBaseProperties) {\n\t\tsuper(message, { ...props, dataProcessingError: 1 });\n\t}\n}\n\n/**\n * Indicates we hit a fatal error while processing incoming data from the Fluid Service.\n *\n * @remarks\n *\n * The error will often originate in the dataStore or DDS implementation that is responding to incoming changes.\n * This differs from {@link DataCorruptionError} in that this may be a transient error that will not repro in another\n * client or session.\n *\n * @internal\n */\nexport class DataProcessingError extends LoggingError implements IErrorBase, IFluidErrorBase {\n\t/**\n\t * {@inheritDoc IFluidErrorBase.errorType}\n\t */\n\tpublic readonly errorType = FluidErrorTypes.dataProcessingError;\n\n\tpublic readonly canRetry = false;\n\n\tprivate constructor(errorMessage: string, props?: ITelemetryBaseProperties) {\n\t\tsuper(errorMessage, props);\n\t}\n\n\t/**\n\t * Create a new `DataProcessingError` detected and raised within the Fluid Framework.\n\t */\n\tpublic static create(\n\t\terrorMessage: string,\n\t\tdataProcessingCodepath: string,\n\t\tsequencedMessage?: ISequencedDocumentMessage,\n\t\tprops: ITelemetryBaseProperties = {},\n\t): IFluidErrorBase {\n\t\tconst dataProcessingError = DataProcessingError.wrapIfUnrecognized(\n\t\t\terrorMessage,\n\t\t\tdataProcessingCodepath,\n\t\t\tsequencedMessage,\n\t\t);\n\t\tdataProcessingError.addTelemetryProperties(props);\n\n\t\treturn dataProcessingError;\n\t}\n\n\t/**\n\t * Wrap the given error in a `DataProcessingError`, unless the error is already of a known type\n\t * with the exception of a normalized {@link LoggingError}, which will still be wrapped.\n\t *\n\t * In either case, the error will have some relevant properties added for telemetry.\n\t *\n\t * @remarks\n\t *\n\t * We wrap conditionally since known error types represent well-understood failure modes, and ideally\n\t * one day we will move away from throwing these errors but rather we'll return them.\n\t * But an unrecognized error needs to be classified as `DataProcessingError`.\n\t *\n\t * @param originalError - The error to be converted.\n\t * @param dataProcessingCodepath - Which code-path failed while processing data.\n\t * @param messageLike - Message to include info about via telemetry props.\n\t *\n\t * @returns Either a new `DataProcessingError`, or (if wrapping is deemed unnecessary) the given error.\n\t */\n\tpublic static wrapIfUnrecognized(\n\t\toriginalError: unknown,\n\t\tdataProcessingCodepath: string,\n\t\tmessageLike?: Partial<\n\t\t\tPick<\n\t\t\t\tISequencedDocumentMessage,\n\t\t\t\t| \"clientId\"\n\t\t\t\t| \"sequenceNumber\"\n\t\t\t\t| \"clientSequenceNumber\"\n\t\t\t\t| \"referenceSequenceNumber\"\n\t\t\t\t| \"minimumSequenceNumber\"\n\t\t\t\t| \"timestamp\"\n\t\t\t>\n\t\t>,\n\t): IFluidErrorBase {\n\t\tconst props = {\n\t\t\tdataProcessingError: 1,\n\t\t\tdataProcessingCodepath,\n\t\t\t...(messageLike === undefined\n\t\t\t\t? undefined\n\t\t\t\t: extractSafePropertiesFromMessage(messageLike)),\n\t\t};\n\n\t\tconst normalizedError = normalizeError(originalError, { props });\n\t\t// Note that other errors may have the NORMALIZED_ERROR_TYPE errorType,\n\t\t// but if so they are still suitable to be wrapped as DataProcessingError.\n\t\tif (\n\t\t\tisExternalError(normalizedError) ||\n\t\t\tnormalizedError.errorType === NORMALIZED_ERROR_TYPE\n\t\t) {\n\t\t\t// Create a new DataProcessingError to wrap this external error\n\t\t\tconst dataProcessingError = wrapError(\n\t\t\t\tnormalizedError,\n\t\t\t\t(message: string) => new DataProcessingError(message),\n\t\t\t);\n\n\t\t\t// Copy over the props above and any others added to this error since first being normalized\n\t\t\tdataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties());\n\n\t\t\treturn dataProcessingError;\n\t\t}\n\t\treturn normalizedError;\n\t}\n}\n\n/**\n * Extracts specific properties from the provided message that we know are safe to log.\n *\n * @param messageLike - Message to include info about via telemetry props.\n */\nexport const extractSafePropertiesFromMessage = (\n\tmessageLike: Partial<\n\t\tPick<\n\t\t\tISequencedDocumentMessage,\n\t\t\t| \"clientId\"\n\t\t\t| \"sequenceNumber\"\n\t\t\t| \"clientSequenceNumber\"\n\t\t\t| \"referenceSequenceNumber\"\n\t\t\t| \"minimumSequenceNumber\"\n\t\t\t| \"timestamp\"\n\t\t>\n\t>,\n): {\n\tmessageClientId: string | undefined;\n\tmessageSequenceNumber: number | undefined;\n\tmessageClientSequenceNumber: number | undefined;\n\tmessageReferenceSequenceNumber: number | undefined;\n\tmessageMinimumSequenceNumber: number | undefined;\n\tmessageTimestamp: number | undefined;\n} => ({\n\tmessageClientId: messageLike.clientId === null ? \"null\" : messageLike.clientId,\n\tmessageSequenceNumber: messageLike.sequenceNumber,\n\tmessageClientSequenceNumber: messageLike.clientSequenceNumber,\n\tmessageReferenceSequenceNumber: messageLike.referenceSequenceNumber,\n\tmessageMinimumSequenceNumber: messageLike.minimumSequenceNumber,\n\tmessageTimestamp: messageLike.timestamp,\n});\n"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qEAMyC;AAGzC,iDAMwB;AAGxB;;;;GAIG;AACH,MAAa,YAAa,SAAQ,2BAAY;IAG7C;;;;;OAKG;IACH,YACC,OAAe;IACf,mIAAmI;IACnI,iHAAiH;IACjG,KAAW,EAC3B,KAAgC;QAEhC,mCAAmC;QACnC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAJ1B,UAAK,GAAL,KAAK,CAAM;QAZnB,cAAS,GAAG,iCAAe,CAAC,YAAY,CAAC;IAiBlD,CAAC;CACD;AAnBD,oCAmBC;AAED;;;;GAIG;AACH,MAAa,UAAW,SAAQ,2BAAY;IAG3C,YAAY,OAAe,EAAE,KAAgC;QAC5D,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAHvC,cAAS,GAAG,iCAAe,CAAC,UAAU,CAAC;IAIhD,CAAC;CACD;AAND,gCAMC;AAED;;;;;GAKG;AACH,MAAa,mBAAoB,SAAQ,2BAAY;IAIpD,YAAY,OAAe,EAAE,KAA+B;QAC3D,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,KAAK,EAAE,mBAAmB,EAAE,CAAC,EAAE,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AAe,EAAE,EAAE,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC,CACrD,CAAC;YAEF,4FAA4F;YAC5F,mBAAmB,CAAC,sBAAsB,CAAC,eAAe,CAAC,sBAAsB,EAAE,CAAC,CAAC;YAErF,OAAO,mBAAmB,CAAC;SAC3B;QACD,OAAO,eAAe,CAAC;IACxB,CAAC;CACD;AA5FD,kDA4FC;AAED;;;;GAIG;AACI,MAAM,gCAAgC,GAAG,CAC/C,WAUC,EAQA,EAAE,CAAC,CAAC;IACL,eAAe,EAAE,WAAW,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ;IAC9E,qBAAqB,EAAE,WAAW,CAAC,cAAc;IACjD,2BAA2B,EAAE,WAAW,CAAC,oBAAoB;IAC7D,8BAA8B,EAAE,WAAW,CAAC,uBAAuB;IACnE,4BAA4B,EAAE,WAAW,CAAC,qBAAqB;IAC/D,gBAAgB,EAAE,WAAW,CAAC,SAAS;CACvC,CAAC,CAAC;AA1BU,QAAA,gCAAgC,oCA0B1C","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tFluidErrorTypes,\n\tIGenericError,\n\tIErrorBase,\n\tITelemetryBaseProperties,\n\tIUsageError,\n} from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\n\nimport {\n\tLoggingError,\n\tNORMALIZED_ERROR_TYPE,\n\tisExternalError,\n\tnormalizeError,\n\twrapError,\n} from \"./errorLogging\";\nimport { IFluidErrorBase } from \"./fluidErrorBase\";\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n *\n * @internal\n */\nexport class GenericError extends LoggingError implements IGenericError, IFluidErrorBase {\n\treadonly errorType = FluidErrorTypes.genericError;\n\n\t/**\n\t * Create a new GenericError\n\t * @param message - Error message\n\t * @param error - inner error object\n\t * @param props - Telemetry props to include when the error is logged\n\t */\n\tconstructor(\n\t\tmessage: string,\n\t\t// TODO: Use `unknown` instead (API breaking change because error is not just an input parameter, but a public member of the class)\n\t\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n\t\tpublic readonly error?: any,\n\t\tprops?: ITelemetryBaseProperties,\n\t) {\n\t\t// Don't try to log the inner error\n\t\tsuper(message, props, new Set([\"error\"]));\n\t}\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n *\n * @internal\n */\nexport class UsageError extends LoggingError implements IUsageError, IFluidErrorBase {\n\treadonly errorType = FluidErrorTypes.usageError;\n\n\tconstructor(message: string, props?: ITelemetryBaseProperties) {\n\t\tsuper(message, { ...props, usageError: true });\n\t}\n}\n\n/**\n * DataCorruptionError indicates that we encountered definitive evidence that the data at rest\n * backing this container is corrupted, and this container would never be expected to load properly again\n *\n * @internal\n */\nexport class DataCorruptionError extends LoggingError implements IErrorBase, IFluidErrorBase {\n\treadonly errorType = FluidErrorTypes.dataCorruptionError;\n\treadonly canRetry = false;\n\n\tconstructor(message: string, props: ITelemetryBaseProperties) {\n\t\tsuper(message, { ...props, dataProcessingError: 1 });\n\t}\n}\n\n/**\n * Indicates we hit a fatal error while processing incoming data from the Fluid Service.\n *\n * @remarks\n *\n * The error will often originate in the dataStore or DDS implementation that is responding to incoming changes.\n * This differs from {@link DataCorruptionError} in that this may be a transient error that will not repro in another\n * client or session.\n *\n * @internal\n */\nexport class DataProcessingError extends LoggingError implements IErrorBase, IFluidErrorBase {\n\t/**\n\t * {@inheritDoc IFluidErrorBase.errorType}\n\t */\n\tpublic readonly errorType = FluidErrorTypes.dataProcessingError;\n\n\tpublic readonly canRetry = false;\n\n\tprivate constructor(errorMessage: string, props?: ITelemetryBaseProperties) {\n\t\tsuper(errorMessage, props);\n\t}\n\n\t/**\n\t * Create a new `DataProcessingError` detected and raised within the Fluid Framework.\n\t */\n\tpublic static create(\n\t\terrorMessage: string,\n\t\tdataProcessingCodepath: string,\n\t\tsequencedMessage?: ISequencedDocumentMessage,\n\t\tprops: ITelemetryBaseProperties = {},\n\t): IFluidErrorBase {\n\t\tconst dataProcessingError = DataProcessingError.wrapIfUnrecognized(\n\t\t\terrorMessage,\n\t\t\tdataProcessingCodepath,\n\t\t\tsequencedMessage,\n\t\t);\n\t\tdataProcessingError.addTelemetryProperties(props);\n\n\t\treturn dataProcessingError;\n\t}\n\n\t/**\n\t * Wrap the given error in a `DataProcessingError`, unless the error is already of a known type\n\t * with the exception of a normalized {@link LoggingError}, which will still be wrapped.\n\t *\n\t * In either case, the error will have some relevant properties added for telemetry.\n\t *\n\t * @remarks\n\t *\n\t * We wrap conditionally since known error types represent well-understood failure modes, and ideally\n\t * one day we will move away from throwing these errors but rather we'll return them.\n\t * But an unrecognized error needs to be classified as `DataProcessingError`.\n\t *\n\t * @param originalError - The error to be converted.\n\t * @param dataProcessingCodepath - Which code-path failed while processing data.\n\t * @param messageLike - Message to include info about via telemetry props.\n\t *\n\t * @returns Either a new `DataProcessingError`, or (if wrapping is deemed unnecessary) the given error.\n\t */\n\tpublic static wrapIfUnrecognized(\n\t\toriginalError: unknown,\n\t\tdataProcessingCodepath: string,\n\t\tmessageLike?: Partial<\n\t\t\tPick<\n\t\t\t\tISequencedDocumentMessage,\n\t\t\t\t| \"clientId\"\n\t\t\t\t| \"sequenceNumber\"\n\t\t\t\t| \"clientSequenceNumber\"\n\t\t\t\t| \"referenceSequenceNumber\"\n\t\t\t\t| \"minimumSequenceNumber\"\n\t\t\t\t| \"timestamp\"\n\t\t\t>\n\t\t>,\n\t): IFluidErrorBase {\n\t\tconst props = {\n\t\t\tdataProcessingError: 1,\n\t\t\tdataProcessingCodepath,\n\t\t\t...(messageLike === undefined\n\t\t\t\t? undefined\n\t\t\t\t: extractSafePropertiesFromMessage(messageLike)),\n\t\t};\n\n\t\tconst normalizedError = normalizeError(originalError, { props });\n\t\t// Note that other errors may have the NORMALIZED_ERROR_TYPE errorType,\n\t\t// but if so they are still suitable to be wrapped as DataProcessingError.\n\t\tif (\n\t\t\tisExternalError(normalizedError) ||\n\t\t\tnormalizedError.errorType === NORMALIZED_ERROR_TYPE\n\t\t) {\n\t\t\t// Create a new DataProcessingError to wrap this external error\n\t\t\tconst dataProcessingError = wrapError(\n\t\t\t\tnormalizedError,\n\t\t\t\t(message: string) => new DataProcessingError(message),\n\t\t\t);\n\n\t\t\t// Copy over the props above and any others added to this error since first being normalized\n\t\t\tdataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties());\n\n\t\t\treturn dataProcessingError;\n\t\t}\n\t\treturn normalizedError;\n\t}\n}\n\n/**\n * Extracts specific properties from the provided message that we know are safe to log.\n *\n * @param messageLike - Message to include info about via telemetry props.\n */\nexport const extractSafePropertiesFromMessage = (\n\tmessageLike: Partial<\n\t\tPick<\n\t\t\tISequencedDocumentMessage,\n\t\t\t| \"clientId\"\n\t\t\t| \"sequenceNumber\"\n\t\t\t| \"clientSequenceNumber\"\n\t\t\t| \"referenceSequenceNumber\"\n\t\t\t| \"minimumSequenceNumber\"\n\t\t\t| \"timestamp\"\n\t\t>\n\t>,\n): {\n\tmessageClientId: string | undefined;\n\tmessageSequenceNumber: number | undefined;\n\tmessageClientSequenceNumber: number | undefined;\n\tmessageReferenceSequenceNumber: number | undefined;\n\tmessageMinimumSequenceNumber: number | undefined;\n\tmessageTimestamp: number | undefined;\n} => ({\n\tmessageClientId: messageLike.clientId === null ? \"null\" : messageLike.clientId,\n\tmessageSequenceNumber: messageLike.sequenceNumber,\n\tmessageClientSequenceNumber: messageLike.clientSequenceNumber,\n\tmessageReferenceSequenceNumber: messageLike.referenceSequenceNumber,\n\tmessageMinimumSequenceNumber: messageLike.minimumSequenceNumber,\n\tmessageTimestamp: messageLike.timestamp,\n});\n"]}
package/dist/index.d.ts CHANGED
@@ -12,6 +12,6 @@ export { eventNamespaceSeparator, createChildLogger, createMultiSinkLogger, form
12
12
  export { MockLogger } from "./mockLogger";
13
13
  export { ThresholdCounter } from "./thresholdCounter";
14
14
  export { SampledTelemetryHelper } from "./sampledTelemetryHelper";
15
- export { logIfFalse } from "./utils";
15
+ export { logIfFalse, createSampledLogger, IEventSampler, ISampledTelemetryLogger } from "./utils";
16
16
  export { TelemetryEventPropertyTypeExt, ITelemetryEventExt, ITelemetryGenericEventExt, ITelemetryErrorEventExt, ITelemetryPerformanceEventExt, ITelemetryLoggerExt, ITaggedTelemetryPropertyTypeExt, ITelemetryPropertiesExt, TelemetryEventCategory, } from "./telemetryTypes";
17
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACN,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,yBAAyB,GACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,mBAAmB,EACnB,mBAAmB,EACnB,gCAAgC,EAChC,YAAY,EACZ,UAAU,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,6BAA6B,EAC7B,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,8BAA8B,EAC9B,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,SAAS,EACT,eAAe,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EACN,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,kBAAkB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EACN,6BAA6B,EAC7B,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,mBAAmB,EACnB,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,GACtB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACN,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,yBAAyB,GACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,mBAAmB,EACnB,mBAAmB,EACnB,gCAAgC,EAChC,YAAY,EACZ,UAAU,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,6BAA6B,EAC7B,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,8BAA8B,EAC9B,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,SAAS,EACT,eAAe,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EACN,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,kBAAkB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EACN,6BAA6B,EAC7B,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,mBAAmB,EACnB,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,GACtB,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logIfFalse = exports.SampledTelemetryHelper = exports.ThresholdCounter = exports.MockLogger = exports.TelemetryNullLogger = exports.TelemetryDataTag = exports.tagCodeArtifacts = exports.tagData = exports.TaggedLoggerAdapter = exports.PerformanceEvent = exports.numberFromString = exports.formatTick = exports.createMultiSinkLogger = exports.createChildLogger = exports.eventNamespaceSeparator = exports.isValidLegacyError = exports.isFluidError = exports.hasErrorInstanceId = exports.safeRaiseEvent = exports.raiseConnectedEvent = exports.disconnectedEventName = exports.connectedEventName = exports.EventEmitterWithErrorHandling = exports.wrapErrorAndLog = exports.wrapError = exports.overwriteStack = exports.normalizeError = exports.NORMALIZED_ERROR_TYPE = exports.LoggingError = exports.isTaggedTelemetryPropertyValue = exports.isILoggingError = exports.isExternalError = exports.getCircularReplacer = exports.generateStack = exports.generateErrorWithStack = exports.extractLogSafeErrorProperties = exports.UsageError = exports.GenericError = exports.extractSafePropertiesFromMessage = exports.DataProcessingError = exports.DataCorruptionError = exports.loggerToMonitoringContext = exports.mixinMonitoringContext = exports.sessionStorageConfigProvider = exports.createChildMonitoringContext = void 0;
3
+ exports.createSampledLogger = exports.logIfFalse = exports.SampledTelemetryHelper = exports.ThresholdCounter = exports.MockLogger = exports.TelemetryNullLogger = exports.TelemetryDataTag = exports.tagCodeArtifacts = exports.tagData = exports.TaggedLoggerAdapter = exports.PerformanceEvent = exports.numberFromString = exports.formatTick = exports.createMultiSinkLogger = exports.createChildLogger = exports.eventNamespaceSeparator = exports.isValidLegacyError = exports.isFluidError = exports.hasErrorInstanceId = exports.safeRaiseEvent = exports.raiseConnectedEvent = exports.disconnectedEventName = exports.connectedEventName = exports.EventEmitterWithErrorHandling = exports.wrapErrorAndLog = exports.wrapError = exports.overwriteStack = exports.normalizeError = exports.NORMALIZED_ERROR_TYPE = exports.LoggingError = exports.isTaggedTelemetryPropertyValue = exports.isILoggingError = exports.isExternalError = exports.getCircularReplacer = exports.generateStack = exports.generateErrorWithStack = exports.extractLogSafeErrorProperties = exports.UsageError = exports.GenericError = exports.extractSafePropertiesFromMessage = exports.DataProcessingError = exports.DataCorruptionError = exports.loggerToMonitoringContext = exports.mixinMonitoringContext = exports.sessionStorageConfigProvider = exports.createChildMonitoringContext = void 0;
4
4
  /*!
5
5
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
6
6
  * Licensed under the MIT License.
@@ -61,4 +61,5 @@ var sampledTelemetryHelper_1 = require("./sampledTelemetryHelper");
61
61
  Object.defineProperty(exports, "SampledTelemetryHelper", { enumerable: true, get: function () { return sampledTelemetryHelper_1.SampledTelemetryHelper; } });
62
62
  var utils_1 = require("./utils");
63
63
  Object.defineProperty(exports, "logIfFalse", { enumerable: true, get: function () { return utils_1.logIfFalse; } });
64
+ Object.defineProperty(exports, "createSampledLogger", { enumerable: true, get: function () { return utils_1.createSampledLogger; } });
64
65
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,mCASkB;AARjB,sHAAA,4BAA4B,OAAA;AAG5B,sHAAA,4BAA4B,OAAA;AAC5B,gHAAA,sBAAsB,OAAA;AAGtB,mHAAA,yBAAyB,OAAA;AAE1B,iCAMiB;AALhB,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,yHAAA,gCAAgC,OAAA;AAChC,qGAAA,YAAY,OAAA;AACZ,mGAAA,UAAU,OAAA;AAEX,+CAewB;AAdvB,6HAAA,6BAA6B,OAAA;AAC7B,sHAAA,sBAAsB,OAAA;AACtB,6GAAA,aAAa,OAAA;AACb,mHAAA,mBAAmB,OAAA;AAEnB,+GAAA,eAAe,OAAA;AACf,+GAAA,eAAe,OAAA;AACf,8HAAA,8BAA8B,OAAA;AAC9B,4GAAA,YAAY,OAAA;AACZ,qHAAA,qBAAqB,OAAA;AACrB,8GAAA,cAAc,OAAA;AACd,8GAAA,cAAc,OAAA;AACd,yGAAA,SAAS,OAAA;AACT,+GAAA,eAAe,OAAA;AAEhB,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA;AACtC,mCAKkB;AAJjB,4GAAA,kBAAkB,OAAA;AAClB,+GAAA,qBAAqB,OAAA;AACrB,6GAAA,mBAAmB,OAAA;AACnB,wGAAA,cAAc,OAAA;AAEf,mDAK0B;AAJzB,oHAAA,kBAAkB,OAAA;AAElB,8GAAA,YAAY,OAAA;AACZ,oHAAA,kBAAkB,OAAA;AAEnB,mCAgBkB;AAfjB,iHAAA,uBAAuB,OAAA;AACvB,2GAAA,iBAAiB,OAAA;AACjB,+GAAA,qBAAqB,OAAA;AACrB,oGAAA,UAAU,OAAA;AAIV,0GAAA,gBAAgB,OAAA;AAChB,0GAAA,gBAAgB,OAAA;AAChB,6GAAA,mBAAmB,OAAA;AACnB,iGAAA,OAAO,OAAA;AACP,0GAAA,gBAAgB,OAAA;AAChB,0GAAA,gBAAgB,OAAA;AAEhB,6GAAA,mBAAmB,OAAA;AAEpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,iCAAqC;AAA5B,mGAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nexport {\n\tcreateChildMonitoringContext,\n\tMonitoringContext,\n\tIConfigProviderBase,\n\tsessionStorageConfigProvider,\n\tmixinMonitoringContext,\n\tIConfigProvider,\n\tConfigTypes,\n\tloggerToMonitoringContext,\n} from \"./config\";\nexport {\n\tDataCorruptionError,\n\tDataProcessingError,\n\textractSafePropertiesFromMessage,\n\tGenericError,\n\tUsageError,\n} from \"./error\";\nexport {\n\textractLogSafeErrorProperties,\n\tgenerateErrorWithStack,\n\tgenerateStack,\n\tgetCircularReplacer,\n\tIFluidErrorAnnotations,\n\tisExternalError,\n\tisILoggingError,\n\tisTaggedTelemetryPropertyValue,\n\tLoggingError,\n\tNORMALIZED_ERROR_TYPE,\n\tnormalizeError,\n\toverwriteStack,\n\twrapError,\n\twrapErrorAndLog,\n} from \"./errorLogging\";\nexport { EventEmitterWithErrorHandling } from \"./eventEmitterWithErrorHandling\";\nexport {\n\tconnectedEventName,\n\tdisconnectedEventName,\n\traiseConnectedEvent,\n\tsafeRaiseEvent,\n} from \"./events\";\nexport {\n\thasErrorInstanceId,\n\tIFluidErrorBase,\n\tisFluidError,\n\tisValidLegacyError,\n} from \"./fluidErrorBase\";\nexport {\n\teventNamespaceSeparator,\n\tcreateChildLogger,\n\tcreateMultiSinkLogger,\n\tformatTick,\n\tIPerformanceEventMarkers,\n\tITelemetryLoggerPropertyBag,\n\tITelemetryLoggerPropertyBags,\n\tnumberFromString,\n\tPerformanceEvent,\n\tTaggedLoggerAdapter,\n\ttagData,\n\ttagCodeArtifacts,\n\tTelemetryDataTag,\n\tTelemetryEventPropertyTypes,\n\tTelemetryNullLogger,\n} from \"./logger\";\nexport { MockLogger } from \"./mockLogger\";\nexport { ThresholdCounter } from \"./thresholdCounter\";\nexport { SampledTelemetryHelper } from \"./sampledTelemetryHelper\";\nexport { logIfFalse } from \"./utils\";\nexport {\n\tTelemetryEventPropertyTypeExt,\n\tITelemetryEventExt,\n\tITelemetryGenericEventExt,\n\tITelemetryErrorEventExt,\n\tITelemetryPerformanceEventExt,\n\tITelemetryLoggerExt,\n\tITaggedTelemetryPropertyTypeExt,\n\tITelemetryPropertiesExt,\n\tTelemetryEventCategory,\n} from \"./telemetryTypes\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,mCASkB;AARjB,sHAAA,4BAA4B,OAAA;AAG5B,sHAAA,4BAA4B,OAAA;AAC5B,gHAAA,sBAAsB,OAAA;AAGtB,mHAAA,yBAAyB,OAAA;AAE1B,iCAMiB;AALhB,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,yHAAA,gCAAgC,OAAA;AAChC,qGAAA,YAAY,OAAA;AACZ,mGAAA,UAAU,OAAA;AAEX,+CAewB;AAdvB,6HAAA,6BAA6B,OAAA;AAC7B,sHAAA,sBAAsB,OAAA;AACtB,6GAAA,aAAa,OAAA;AACb,mHAAA,mBAAmB,OAAA;AAEnB,+GAAA,eAAe,OAAA;AACf,+GAAA,eAAe,OAAA;AACf,8HAAA,8BAA8B,OAAA;AAC9B,4GAAA,YAAY,OAAA;AACZ,qHAAA,qBAAqB,OAAA;AACrB,8GAAA,cAAc,OAAA;AACd,8GAAA,cAAc,OAAA;AACd,yGAAA,SAAS,OAAA;AACT,+GAAA,eAAe,OAAA;AAEhB,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA;AACtC,mCAKkB;AAJjB,4GAAA,kBAAkB,OAAA;AAClB,+GAAA,qBAAqB,OAAA;AACrB,6GAAA,mBAAmB,OAAA;AACnB,wGAAA,cAAc,OAAA;AAEf,mDAK0B;AAJzB,oHAAA,kBAAkB,OAAA;AAElB,8GAAA,YAAY,OAAA;AACZ,oHAAA,kBAAkB,OAAA;AAEnB,mCAgBkB;AAfjB,iHAAA,uBAAuB,OAAA;AACvB,2GAAA,iBAAiB,OAAA;AACjB,+GAAA,qBAAqB,OAAA;AACrB,oGAAA,UAAU,OAAA;AAIV,0GAAA,gBAAgB,OAAA;AAChB,0GAAA,gBAAgB,OAAA;AAChB,6GAAA,mBAAmB,OAAA;AACnB,iGAAA,OAAO,OAAA;AACP,0GAAA,gBAAgB,OAAA;AAChB,0GAAA,gBAAgB,OAAA;AAEhB,6GAAA,mBAAmB,OAAA;AAEpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,iCAAkG;AAAzF,mGAAA,UAAU,OAAA;AAAE,4GAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nexport {\n\tcreateChildMonitoringContext,\n\tMonitoringContext,\n\tIConfigProviderBase,\n\tsessionStorageConfigProvider,\n\tmixinMonitoringContext,\n\tIConfigProvider,\n\tConfigTypes,\n\tloggerToMonitoringContext,\n} from \"./config\";\nexport {\n\tDataCorruptionError,\n\tDataProcessingError,\n\textractSafePropertiesFromMessage,\n\tGenericError,\n\tUsageError,\n} from \"./error\";\nexport {\n\textractLogSafeErrorProperties,\n\tgenerateErrorWithStack,\n\tgenerateStack,\n\tgetCircularReplacer,\n\tIFluidErrorAnnotations,\n\tisExternalError,\n\tisILoggingError,\n\tisTaggedTelemetryPropertyValue,\n\tLoggingError,\n\tNORMALIZED_ERROR_TYPE,\n\tnormalizeError,\n\toverwriteStack,\n\twrapError,\n\twrapErrorAndLog,\n} from \"./errorLogging\";\nexport { EventEmitterWithErrorHandling } from \"./eventEmitterWithErrorHandling\";\nexport {\n\tconnectedEventName,\n\tdisconnectedEventName,\n\traiseConnectedEvent,\n\tsafeRaiseEvent,\n} from \"./events\";\nexport {\n\thasErrorInstanceId,\n\tIFluidErrorBase,\n\tisFluidError,\n\tisValidLegacyError,\n} from \"./fluidErrorBase\";\nexport {\n\teventNamespaceSeparator,\n\tcreateChildLogger,\n\tcreateMultiSinkLogger,\n\tformatTick,\n\tIPerformanceEventMarkers,\n\tITelemetryLoggerPropertyBag,\n\tITelemetryLoggerPropertyBags,\n\tnumberFromString,\n\tPerformanceEvent,\n\tTaggedLoggerAdapter,\n\ttagData,\n\ttagCodeArtifacts,\n\tTelemetryDataTag,\n\tTelemetryEventPropertyTypes,\n\tTelemetryNullLogger,\n} from \"./logger\";\nexport { MockLogger } from \"./mockLogger\";\nexport { ThresholdCounter } from \"./thresholdCounter\";\nexport { SampledTelemetryHelper } from \"./sampledTelemetryHelper\";\nexport { logIfFalse, createSampledLogger, IEventSampler, ISampledTelemetryLogger } from \"./utils\";\nexport {\n\tTelemetryEventPropertyTypeExt,\n\tITelemetryEventExt,\n\tITelemetryGenericEventExt,\n\tITelemetryErrorEventExt,\n\tITelemetryPerformanceEventExt,\n\tITelemetryLoggerExt,\n\tITaggedTelemetryPropertyTypeExt,\n\tITelemetryPropertiesExt,\n\tTelemetryEventCategory,\n} from \"./telemetryTypes\";\n"]}