@fluidframework/telemetry-utils 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.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 +23 -0
- package/api-report/telemetry-utils.api.md +6 -6
- package/dist/config.d.ts +2 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -2
- package/dist/config.js.map +1 -1
- package/dist/error.d.ts +4 -2
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +5 -5
- package/dist/error.js.map +1 -1
- package/dist/errorLogging.d.ts +3 -2
- package/dist/errorLogging.d.ts.map +1 -1
- package/dist/errorLogging.js.map +1 -1
- package/dist/eventEmitterWithErrorHandling.d.ts +1 -1
- package/dist/eventEmitterWithErrorHandling.d.ts.map +1 -1
- package/dist/eventEmitterWithErrorHandling.js +2 -2
- package/dist/eventEmitterWithErrorHandling.js.map +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/fluidErrorBase.d.ts.map +1 -1
- package/dist/fluidErrorBase.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +28 -0
- package/dist/logger.d.ts +2 -2
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/mockLogger.d.ts +1 -1
- package/dist/mockLogger.d.ts.map +1 -1
- package/dist/mockLogger.js +3 -3
- package/dist/mockLogger.js.map +1 -1
- package/dist/public.d.ts +20 -0
- package/dist/sampledTelemetryHelper.d.ts +2 -2
- package/dist/sampledTelemetryHelper.d.ts.map +1 -1
- package/dist/sampledTelemetryHelper.js.map +1 -1
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +4 -0
- package/dist/utils.js.map +1 -1
- package/internal.d.ts +11 -0
- package/legacy.d.ts +11 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +5 -1
- package/lib/config.js.map +1 -1
- package/lib/error.d.ts +4 -2
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +1 -1
- package/lib/error.js.map +1 -1
- package/lib/errorLogging.d.ts +3 -2
- package/lib/errorLogging.d.ts.map +1 -1
- package/lib/errorLogging.js.map +1 -1
- package/lib/eventEmitterWithErrorHandling.d.ts +1 -1
- package/lib/eventEmitterWithErrorHandling.d.ts.map +1 -1
- package/lib/eventEmitterWithErrorHandling.js.map +1 -1
- package/lib/events.d.ts +1 -1
- package/lib/events.d.ts.map +1 -1
- package/lib/events.js.map +1 -1
- package/lib/fluidErrorBase.d.ts.map +1 -1
- package/lib/fluidErrorBase.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +28 -0
- package/lib/logger.d.ts +2 -2
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +2 -2
- package/lib/logger.js.map +1 -1
- package/lib/mockLogger.d.ts +1 -1
- package/lib/mockLogger.d.ts.map +1 -1
- package/lib/mockLogger.js +2 -2
- package/lib/mockLogger.js.map +1 -1
- package/lib/public.d.ts +20 -0
- package/lib/sampledTelemetryHelper.d.ts +2 -2
- package/lib/sampledTelemetryHelper.d.ts.map +1 -1
- package/lib/sampledTelemetryHelper.js.map +1 -1
- package/lib/utils.d.ts +4 -0
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +4 -0
- package/lib/utils.js.map +1 -1
- package/package.json +27 -48
- package/src/config.ts +5 -3
- package/src/error.ts +4 -4
- package/src/errorLogging.ts +6 -8
- package/src/eventEmitterWithErrorHandling.ts +2 -1
- package/src/events.ts +2 -1
- package/src/fluidErrorBase.ts +1 -0
- package/src/index.ts +1 -0
- package/src/logger.ts +7 -6
- package/src/mockLogger.ts +4 -3
- package/src/sampledTelemetryHelper.ts +3 -2
- package/src/utils.ts +2 -0
- package/api-extractor-cjs.json +0 -8
- package/dist/telemetry-utils-alpha.d.ts +0 -282
- package/dist/telemetry-utils-beta.d.ts +0 -239
- package/dist/telemetry-utils-public.d.ts +0 -239
- package/dist/telemetry-utils-untrimmed.d.ts +0 -1077
- package/lib/telemetry-utils-alpha.d.ts +0 -282
- package/lib/telemetry-utils-beta.d.ts +0 -239
- package/lib/telemetry-utils-public.d.ts +0 -239
- package/lib/telemetry-utils-untrimmed.d.ts +0 -1077
- package/lib/test/EventEmitterWithErrorHandling.spec.js +0 -86
- package/lib/test/EventEmitterWithErrorHandling.spec.js.map +0 -1
- package/lib/test/childLogger.spec.js +0 -233
- package/lib/test/childLogger.spec.js.map +0 -1
- package/lib/test/config.spec.js +0 -229
- package/lib/test/config.spec.js.map +0 -1
- package/lib/test/error.spec.js +0 -161
- package/lib/test/error.spec.js.map +0 -1
- package/lib/test/errorLogging.spec.js +0 -801
- package/lib/test/errorLogging.spec.js.map +0 -1
- package/lib/test/errorTypeLoggingTest.spec.js +0 -107
- package/lib/test/errorTypeLoggingTest.spec.js.map +0 -1
- package/lib/test/mockLogger.spec.js +0 -164
- package/lib/test/mockLogger.spec.js.map +0 -1
- package/lib/test/multiSinkLogger.spec.js +0 -84
- package/lib/test/multiSinkLogger.spec.js.map +0 -1
- package/lib/test/performanceEvent.spec.js +0 -86
- package/lib/test/performanceEvent.spec.js.map +0 -1
- package/lib/test/sampledTelemetryHelper.spec.js +0 -169
- package/lib/test/sampledTelemetryHelper.spec.js.map +0 -1
- package/lib/test/telemetryLogger.spec.js +0 -357
- package/lib/test/telemetryLogger.spec.js.map +0 -1
- package/lib/test/thresholdCounter.spec.js +0 -51
- package/lib/test/thresholdCounter.spec.js.map +0 -1
- package/lib/test/types/validateTelemetryUtilsPrevious.generated.js +0 -132
- package/lib/test/types/validateTelemetryUtilsPrevious.generated.js.map +0 -1
- package/lib/test/utils.spec.js +0 -284
- package/lib/test/utils.spec.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { ConfigTypes } from '@fluidframework/core-interfaces';
|
|
2
|
-
import type { EventEmitter } from '@fluid-internal/client-utils';
|
|
3
|
-
import { EventEmitterEventType } from '@fluid-internal/client-utils';
|
|
4
|
-
import { IConfigProviderBase } from '@fluidframework/core-interfaces';
|
|
5
|
-
import type { IDisposable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IErrorBase } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { IGenericError } from '@fluidframework/core-interfaces';
|
|
9
|
-
import type { ILoggingError } from '@fluidframework/core-interfaces';
|
|
10
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
11
|
-
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
12
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
13
|
-
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
|
|
14
|
-
import { IUsageError } from '@fluidframework/core-interfaces';
|
|
15
|
-
import { Lazy } from '@fluidframework/core-utils';
|
|
16
|
-
import { LogLevel } from '@fluidframework/core-interfaces';
|
|
17
|
-
import { Tagged } from '@fluidframework/core-interfaces';
|
|
18
|
-
import { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
19
|
-
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
20
|
-
|
|
21
|
-
/* Excluded from this release type: connectedEventName */
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Create a child logger based on the provided props object.
|
|
25
|
-
*
|
|
26
|
-
* @remarks
|
|
27
|
-
* Passing in no props object (i.e. undefined) will return a logger that is effectively a no-op.
|
|
28
|
-
*
|
|
29
|
-
* @param props - logger is the base logger the child will log to after it's processing, namespace will be prefixed to all event names, properties are default properties that will be applied events.
|
|
30
|
-
*
|
|
31
|
-
* @alpha
|
|
32
|
-
*/
|
|
33
|
-
export declare function createChildLogger(props?: {
|
|
34
|
-
logger?: ITelemetryBaseLogger;
|
|
35
|
-
namespace?: string;
|
|
36
|
-
properties?: ITelemetryLoggerPropertyBags;
|
|
37
|
-
}): ITelemetryLoggerExt;
|
|
38
|
-
|
|
39
|
-
/* Excluded from this release type: createChildMonitoringContext */
|
|
40
|
-
|
|
41
|
-
/* Excluded from this release type: createMultiSinkLogger */
|
|
42
|
-
|
|
43
|
-
/* Excluded from this release type: createSampledLogger */
|
|
44
|
-
|
|
45
|
-
/* Excluded from this release type: DataCorruptionError */
|
|
46
|
-
|
|
47
|
-
/* Excluded from this release type: DataProcessingError */
|
|
48
|
-
|
|
49
|
-
/* Excluded from this release type: disconnectedEventName */
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Event Emitter helper class
|
|
53
|
-
*
|
|
54
|
-
* @remarks
|
|
55
|
-
* Any exceptions thrown by listeners will be caught and raised through "error" event.
|
|
56
|
-
* Any exception thrown by "error" listeners will propagate to the caller.
|
|
57
|
-
* @privateRemarks
|
|
58
|
-
* This probably doesn't belong in this package, as it is not telemetry-specific, and is really only intended for internal fluid-framework use.
|
|
59
|
-
* We should consider moving it to the `core-utils` package.
|
|
60
|
-
* @alpha
|
|
61
|
-
*/
|
|
62
|
-
export declare class EventEmitterWithErrorHandling<TEvent extends IEvent = IEvent> extends TypedEventEmitter<TEvent> {
|
|
63
|
-
private readonly errorHandler;
|
|
64
|
-
constructor(errorHandler: (eventName: EventEmitterEventType, error: any) => void);
|
|
65
|
-
emit(event: EventEmitterEventType, ...args: unknown[]): boolean;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Excluded from this release type: eventNamespaceSeparator */
|
|
69
|
-
|
|
70
|
-
/* Excluded from this release type: extractLogSafeErrorProperties */
|
|
71
|
-
|
|
72
|
-
/* Excluded from this release type: extractSafePropertiesFromMessage */
|
|
73
|
-
|
|
74
|
-
/* Excluded from this release type: formatTick */
|
|
75
|
-
|
|
76
|
-
/* Excluded from this release type: generateErrorWithStack */
|
|
77
|
-
|
|
78
|
-
/* Excluded from this release type: generateStack */
|
|
79
|
-
|
|
80
|
-
/* Excluded from this release type: GenericError */
|
|
81
|
-
|
|
82
|
-
/* Excluded from this release type: getCircularReplacer */
|
|
83
|
-
|
|
84
|
-
/* Excluded from this release type: hasErrorInstanceId */
|
|
85
|
-
|
|
86
|
-
/* Excluded from this release type: IConfigProvider */
|
|
87
|
-
|
|
88
|
-
/* Excluded from this release type: IEventSampler */
|
|
89
|
-
|
|
90
|
-
/* Excluded from this release type: IFluidErrorAnnotations */
|
|
91
|
-
|
|
92
|
-
/* Excluded from this release type: IFluidErrorBase */
|
|
93
|
-
|
|
94
|
-
/* Excluded from this release type: IGenericError */
|
|
95
|
-
|
|
96
|
-
/* Excluded from this release type: ILoggingError */
|
|
97
|
-
|
|
98
|
-
/* Excluded from this release type: IPerformanceEventMarkers */
|
|
99
|
-
|
|
100
|
-
/* Excluded from this release type: ISampledTelemetryLogger */
|
|
101
|
-
|
|
102
|
-
/* Excluded from this release type: isExternalError */
|
|
103
|
-
|
|
104
|
-
/* Excluded from this release type: isFluidError */
|
|
105
|
-
|
|
106
|
-
/* Excluded from this release type: isILoggingError */
|
|
107
|
-
|
|
108
|
-
/* Excluded from this release type: isTaggedTelemetryPropertyValue */
|
|
109
|
-
|
|
110
|
-
/* Excluded from this release type: isValidLegacyError */
|
|
111
|
-
|
|
112
|
-
/* Excluded from this release type: ITaggedTelemetryPropertyTypeExt */
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Error telemetry event.
|
|
116
|
-
* @remarks Maps to category = "error"
|
|
117
|
-
* @public
|
|
118
|
-
*/
|
|
119
|
-
export declare interface ITelemetryErrorEventExt extends ITelemetryPropertiesExt {
|
|
120
|
-
eventName: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Excluded from this release type: ITelemetryEventExt */
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Informational (non-error) telemetry event
|
|
127
|
-
* @remarks Maps to category = "generic"
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
130
|
-
export declare interface ITelemetryGenericEventExt extends ITelemetryPropertiesExt {
|
|
131
|
-
eventName: string;
|
|
132
|
-
category?: TelemetryEventCategory;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* An extended {@link @fluidframework/core-interfaces#ITelemetryBaseLogger} which allows for more lenient event types.
|
|
137
|
-
*
|
|
138
|
-
* @remarks
|
|
139
|
-
* This interface is meant to be used internally within the Fluid Framework,
|
|
140
|
-
* and `ITelemetryBaseLogger` should be used when loggers are passed between layers.
|
|
141
|
-
* @public
|
|
142
|
-
*/
|
|
143
|
-
export declare interface ITelemetryLoggerExt extends ITelemetryBaseLogger {
|
|
144
|
-
/**
|
|
145
|
-
* Send information telemetry event
|
|
146
|
-
* @param event - Event to send
|
|
147
|
-
* @param error - optional error object to log
|
|
148
|
-
* @param logLevel - optional level of the log.
|
|
149
|
-
*/
|
|
150
|
-
sendTelemetryEvent(event: ITelemetryGenericEventExt, error?: unknown, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
|
|
151
|
-
/**
|
|
152
|
-
* Send error telemetry event
|
|
153
|
-
* @param event - Event to send
|
|
154
|
-
* @param error - optional error object to log
|
|
155
|
-
*/
|
|
156
|
-
sendErrorEvent(event: ITelemetryErrorEventExt, error?: unknown): void;
|
|
157
|
-
/**
|
|
158
|
-
* Send performance telemetry event
|
|
159
|
-
* @param event - Event to send
|
|
160
|
-
* @param error - optional error object to log
|
|
161
|
-
* @param logLevel - optional level of the log.
|
|
162
|
-
*/
|
|
163
|
-
sendPerformanceEvent(event: ITelemetryPerformanceEventExt, error?: unknown, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @alpha
|
|
168
|
-
*/
|
|
169
|
-
export declare interface ITelemetryLoggerPropertyBag {
|
|
170
|
-
[index: string]: TelemetryEventPropertyTypes | (() => TelemetryEventPropertyTypes);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @alpha
|
|
175
|
-
*/
|
|
176
|
-
export declare interface ITelemetryLoggerPropertyBags {
|
|
177
|
-
all?: ITelemetryLoggerPropertyBag;
|
|
178
|
-
error?: ITelemetryLoggerPropertyBag;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Performance telemetry event.
|
|
183
|
-
* @remarks Maps to category = "performance"
|
|
184
|
-
* @public
|
|
185
|
-
*/
|
|
186
|
-
export declare interface ITelemetryPerformanceEventExt extends ITelemetryGenericEventExt {
|
|
187
|
-
duration?: number;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* JSON-serializable properties, which will be logged with telemetry.
|
|
192
|
-
* @public
|
|
193
|
-
*/
|
|
194
|
-
export declare interface ITelemetryPropertiesExt {
|
|
195
|
-
[index: string]: TelemetryEventPropertyTypeExt | Tagged<TelemetryEventPropertyTypeExt>;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/* Excluded from this release type: IUsageError */
|
|
199
|
-
|
|
200
|
-
/* Excluded from this release type: Lazy */
|
|
201
|
-
|
|
202
|
-
/* Excluded from this release type: loggerToMonitoringContext */
|
|
203
|
-
|
|
204
|
-
/* Excluded from this release type: LoggingError */
|
|
205
|
-
|
|
206
|
-
/* Excluded from this release type: mixinMonitoringContext */
|
|
207
|
-
|
|
208
|
-
/* Excluded from this release type: MockLogger */
|
|
209
|
-
|
|
210
|
-
/* Excluded from this release type: MonitoringContext */
|
|
211
|
-
|
|
212
|
-
/* Excluded from this release type: MultiSinkLoggerProperties */
|
|
213
|
-
|
|
214
|
-
/* Excluded from this release type: NORMALIZED_ERROR_TYPE */
|
|
215
|
-
|
|
216
|
-
/* Excluded from this release type: normalizeError */
|
|
217
|
-
|
|
218
|
-
/* Excluded from this release type: numberFromString */
|
|
219
|
-
|
|
220
|
-
/* Excluded from this release type: overwriteStack */
|
|
221
|
-
|
|
222
|
-
/* Excluded from this release type: PerformanceEvent */
|
|
223
|
-
|
|
224
|
-
/* Excluded from this release type: raiseConnectedEvent */
|
|
225
|
-
|
|
226
|
-
/* Excluded from this release type: safeRaiseEvent */
|
|
227
|
-
|
|
228
|
-
/* Excluded from this release type: SampledTelemetryHelper */
|
|
229
|
-
|
|
230
|
-
/* Excluded from this release type: sessionStorageConfigProvider */
|
|
231
|
-
|
|
232
|
-
/* Excluded from this release type: tagCodeArtifacts */
|
|
233
|
-
|
|
234
|
-
/* Excluded from this release type: tagData */
|
|
235
|
-
|
|
236
|
-
/* Excluded from this release type: TaggedLoggerAdapter */
|
|
237
|
-
|
|
238
|
-
/* Excluded from this release type: TelemetryDataTag */
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* The categories FF uses when instrumenting the code.
|
|
242
|
-
*
|
|
243
|
-
* generic - Informational log event
|
|
244
|
-
*
|
|
245
|
-
* error - Error log event, ideally 0 of these are logged during a session
|
|
246
|
-
*
|
|
247
|
-
* performance - Includes duration, and often has _start, _end, or _cancel suffixes for activity tracking
|
|
248
|
-
* @public
|
|
249
|
-
*/
|
|
250
|
-
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Property types that can be logged.
|
|
254
|
-
*
|
|
255
|
-
* @remarks
|
|
256
|
-
* Includes extra types beyond {@link @fluidframework/core-interfaces#TelemetryBaseEventPropertyType}, which must be
|
|
257
|
-
* converted before sending to a base logger.
|
|
258
|
-
* @public
|
|
259
|
-
*/
|
|
260
|
-
export declare type TelemetryEventPropertyTypeExt = string | number | boolean | undefined | (string | number | boolean)[] | {
|
|
261
|
-
[key: string]: // Flat objects can have the same properties as the event itself
|
|
262
|
-
string | number | boolean | undefined | (string | number | boolean)[];
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* @alpha
|
|
267
|
-
*/
|
|
268
|
-
export declare type TelemetryEventPropertyTypes = ITelemetryBaseProperties[string];
|
|
269
|
-
|
|
270
|
-
/* Excluded from this release type: ThresholdCounter */
|
|
271
|
-
|
|
272
|
-
/* Excluded from this release type: UsageError */
|
|
273
|
-
|
|
274
|
-
/* Excluded from this release type: validatePrecondition */
|
|
275
|
-
|
|
276
|
-
/* Excluded from this release type: wrapConfigProviderWithDefaults */
|
|
277
|
-
|
|
278
|
-
/* Excluded from this release type: wrapError */
|
|
279
|
-
|
|
280
|
-
/* Excluded from this release type: wrapErrorAndLog */
|
|
281
|
-
|
|
282
|
-
export { }
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { ConfigTypes } from '@fluidframework/core-interfaces';
|
|
2
|
-
import type { EventEmitter } from '@fluid-internal/client-utils';
|
|
3
|
-
import { EventEmitterEventType } from '@fluid-internal/client-utils';
|
|
4
|
-
import { IConfigProviderBase } from '@fluidframework/core-interfaces';
|
|
5
|
-
import type { IDisposable } from '@fluidframework/core-interfaces';
|
|
6
|
-
import { IErrorBase } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { IGenericError } from '@fluidframework/core-interfaces';
|
|
9
|
-
import type { ILoggingError } from '@fluidframework/core-interfaces';
|
|
10
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
11
|
-
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
12
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
13
|
-
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
|
|
14
|
-
import { IUsageError } from '@fluidframework/core-interfaces';
|
|
15
|
-
import { Lazy } from '@fluidframework/core-utils';
|
|
16
|
-
import { LogLevel } from '@fluidframework/core-interfaces';
|
|
17
|
-
import { Tagged } from '@fluidframework/core-interfaces';
|
|
18
|
-
import { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
19
|
-
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
20
|
-
|
|
21
|
-
/* Excluded from this release type: connectedEventName */
|
|
22
|
-
|
|
23
|
-
/* Excluded from this release type: createChildLogger */
|
|
24
|
-
|
|
25
|
-
/* Excluded from this release type: createChildMonitoringContext */
|
|
26
|
-
|
|
27
|
-
/* Excluded from this release type: createMultiSinkLogger */
|
|
28
|
-
|
|
29
|
-
/* Excluded from this release type: createSampledLogger */
|
|
30
|
-
|
|
31
|
-
/* Excluded from this release type: DataCorruptionError */
|
|
32
|
-
|
|
33
|
-
/* Excluded from this release type: DataProcessingError */
|
|
34
|
-
|
|
35
|
-
/* Excluded from this release type: disconnectedEventName */
|
|
36
|
-
|
|
37
|
-
/* Excluded from this release type: EventEmitterWithErrorHandling */
|
|
38
|
-
|
|
39
|
-
/* Excluded from this release type: eventNamespaceSeparator */
|
|
40
|
-
|
|
41
|
-
/* Excluded from this release type: extractLogSafeErrorProperties */
|
|
42
|
-
|
|
43
|
-
/* Excluded from this release type: extractSafePropertiesFromMessage */
|
|
44
|
-
|
|
45
|
-
/* Excluded from this release type: formatTick */
|
|
46
|
-
|
|
47
|
-
/* Excluded from this release type: generateErrorWithStack */
|
|
48
|
-
|
|
49
|
-
/* Excluded from this release type: generateStack */
|
|
50
|
-
|
|
51
|
-
/* Excluded from this release type: GenericError */
|
|
52
|
-
|
|
53
|
-
/* Excluded from this release type: getCircularReplacer */
|
|
54
|
-
|
|
55
|
-
/* Excluded from this release type: hasErrorInstanceId */
|
|
56
|
-
|
|
57
|
-
/* Excluded from this release type: IConfigProvider */
|
|
58
|
-
|
|
59
|
-
/* Excluded from this release type: IEventSampler */
|
|
60
|
-
|
|
61
|
-
/* Excluded from this release type: IFluidErrorAnnotations */
|
|
62
|
-
|
|
63
|
-
/* Excluded from this release type: IFluidErrorBase */
|
|
64
|
-
|
|
65
|
-
/* Excluded from this release type: IGenericError */
|
|
66
|
-
|
|
67
|
-
/* Excluded from this release type: ILoggingError */
|
|
68
|
-
|
|
69
|
-
/* Excluded from this release type: IPerformanceEventMarkers */
|
|
70
|
-
|
|
71
|
-
/* Excluded from this release type: ISampledTelemetryLogger */
|
|
72
|
-
|
|
73
|
-
/* Excluded from this release type: isExternalError */
|
|
74
|
-
|
|
75
|
-
/* Excluded from this release type: isFluidError */
|
|
76
|
-
|
|
77
|
-
/* Excluded from this release type: isILoggingError */
|
|
78
|
-
|
|
79
|
-
/* Excluded from this release type: isTaggedTelemetryPropertyValue */
|
|
80
|
-
|
|
81
|
-
/* Excluded from this release type: isValidLegacyError */
|
|
82
|
-
|
|
83
|
-
/* Excluded from this release type: ITaggedTelemetryPropertyTypeExt */
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Error telemetry event.
|
|
87
|
-
* @remarks Maps to category = "error"
|
|
88
|
-
* @public
|
|
89
|
-
*/
|
|
90
|
-
export declare interface ITelemetryErrorEventExt extends ITelemetryPropertiesExt {
|
|
91
|
-
eventName: string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* Excluded from this release type: ITelemetryEventExt */
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Informational (non-error) telemetry event
|
|
98
|
-
* @remarks Maps to category = "generic"
|
|
99
|
-
* @public
|
|
100
|
-
*/
|
|
101
|
-
export declare interface ITelemetryGenericEventExt extends ITelemetryPropertiesExt {
|
|
102
|
-
eventName: string;
|
|
103
|
-
category?: TelemetryEventCategory;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* An extended {@link @fluidframework/core-interfaces#ITelemetryBaseLogger} which allows for more lenient event types.
|
|
108
|
-
*
|
|
109
|
-
* @remarks
|
|
110
|
-
* This interface is meant to be used internally within the Fluid Framework,
|
|
111
|
-
* and `ITelemetryBaseLogger` should be used when loggers are passed between layers.
|
|
112
|
-
* @public
|
|
113
|
-
*/
|
|
114
|
-
export declare interface ITelemetryLoggerExt extends ITelemetryBaseLogger {
|
|
115
|
-
/**
|
|
116
|
-
* Send information telemetry event
|
|
117
|
-
* @param event - Event to send
|
|
118
|
-
* @param error - optional error object to log
|
|
119
|
-
* @param logLevel - optional level of the log.
|
|
120
|
-
*/
|
|
121
|
-
sendTelemetryEvent(event: ITelemetryGenericEventExt, error?: unknown, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
|
|
122
|
-
/**
|
|
123
|
-
* Send error telemetry event
|
|
124
|
-
* @param event - Event to send
|
|
125
|
-
* @param error - optional error object to log
|
|
126
|
-
*/
|
|
127
|
-
sendErrorEvent(event: ITelemetryErrorEventExt, error?: unknown): void;
|
|
128
|
-
/**
|
|
129
|
-
* Send performance telemetry event
|
|
130
|
-
* @param event - Event to send
|
|
131
|
-
* @param error - optional error object to log
|
|
132
|
-
* @param logLevel - optional level of the log.
|
|
133
|
-
*/
|
|
134
|
-
sendPerformanceEvent(event: ITelemetryPerformanceEventExt, error?: unknown, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* Excluded from this release type: ITelemetryLoggerPropertyBag */
|
|
138
|
-
|
|
139
|
-
/* Excluded from this release type: ITelemetryLoggerPropertyBags */
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Performance telemetry event.
|
|
143
|
-
* @remarks Maps to category = "performance"
|
|
144
|
-
* @public
|
|
145
|
-
*/
|
|
146
|
-
export declare interface ITelemetryPerformanceEventExt extends ITelemetryGenericEventExt {
|
|
147
|
-
duration?: number;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* JSON-serializable properties, which will be logged with telemetry.
|
|
152
|
-
* @public
|
|
153
|
-
*/
|
|
154
|
-
export declare interface ITelemetryPropertiesExt {
|
|
155
|
-
[index: string]: TelemetryEventPropertyTypeExt | Tagged<TelemetryEventPropertyTypeExt>;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* Excluded from this release type: IUsageError */
|
|
159
|
-
|
|
160
|
-
/* Excluded from this release type: Lazy */
|
|
161
|
-
|
|
162
|
-
/* Excluded from this release type: loggerToMonitoringContext */
|
|
163
|
-
|
|
164
|
-
/* Excluded from this release type: LoggingError */
|
|
165
|
-
|
|
166
|
-
/* Excluded from this release type: mixinMonitoringContext */
|
|
167
|
-
|
|
168
|
-
/* Excluded from this release type: MockLogger */
|
|
169
|
-
|
|
170
|
-
/* Excluded from this release type: MonitoringContext */
|
|
171
|
-
|
|
172
|
-
/* Excluded from this release type: MultiSinkLoggerProperties */
|
|
173
|
-
|
|
174
|
-
/* Excluded from this release type: NORMALIZED_ERROR_TYPE */
|
|
175
|
-
|
|
176
|
-
/* Excluded from this release type: normalizeError */
|
|
177
|
-
|
|
178
|
-
/* Excluded from this release type: numberFromString */
|
|
179
|
-
|
|
180
|
-
/* Excluded from this release type: overwriteStack */
|
|
181
|
-
|
|
182
|
-
/* Excluded from this release type: PerformanceEvent */
|
|
183
|
-
|
|
184
|
-
/* Excluded from this release type: raiseConnectedEvent */
|
|
185
|
-
|
|
186
|
-
/* Excluded from this release type: safeRaiseEvent */
|
|
187
|
-
|
|
188
|
-
/* Excluded from this release type: SampledTelemetryHelper */
|
|
189
|
-
|
|
190
|
-
/* Excluded from this release type: sessionStorageConfigProvider */
|
|
191
|
-
|
|
192
|
-
/* Excluded from this release type: tagCodeArtifacts */
|
|
193
|
-
|
|
194
|
-
/* Excluded from this release type: tagData */
|
|
195
|
-
|
|
196
|
-
/* Excluded from this release type: TaggedLoggerAdapter */
|
|
197
|
-
|
|
198
|
-
/* Excluded from this release type: TelemetryDataTag */
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* The categories FF uses when instrumenting the code.
|
|
202
|
-
*
|
|
203
|
-
* generic - Informational log event
|
|
204
|
-
*
|
|
205
|
-
* error - Error log event, ideally 0 of these are logged during a session
|
|
206
|
-
*
|
|
207
|
-
* performance - Includes duration, and often has _start, _end, or _cancel suffixes for activity tracking
|
|
208
|
-
* @public
|
|
209
|
-
*/
|
|
210
|
-
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Property types that can be logged.
|
|
214
|
-
*
|
|
215
|
-
* @remarks
|
|
216
|
-
* Includes extra types beyond {@link @fluidframework/core-interfaces#TelemetryBaseEventPropertyType}, which must be
|
|
217
|
-
* converted before sending to a base logger.
|
|
218
|
-
* @public
|
|
219
|
-
*/
|
|
220
|
-
export declare type TelemetryEventPropertyTypeExt = string | number | boolean | undefined | (string | number | boolean)[] | {
|
|
221
|
-
[key: string]: // Flat objects can have the same properties as the event itself
|
|
222
|
-
string | number | boolean | undefined | (string | number | boolean)[];
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
/* Excluded from this release type: TelemetryEventPropertyTypes */
|
|
226
|
-
|
|
227
|
-
/* Excluded from this release type: ThresholdCounter */
|
|
228
|
-
|
|
229
|
-
/* Excluded from this release type: UsageError */
|
|
230
|
-
|
|
231
|
-
/* Excluded from this release type: validatePrecondition */
|
|
232
|
-
|
|
233
|
-
/* Excluded from this release type: wrapConfigProviderWithDefaults */
|
|
234
|
-
|
|
235
|
-
/* Excluded from this release type: wrapError */
|
|
236
|
-
|
|
237
|
-
/* Excluded from this release type: wrapErrorAndLog */
|
|
238
|
-
|
|
239
|
-
export { }
|