Packages > @fluidframework/telemetry-utils

@fluidframework/telemetry-utils Package

Interfaces

Interface Alerts Description
ITelemetryErrorEventExt Legacy, Alpha Error telemetry event.
ITelemetryGenericEventExt Legacy, Alpha Informational (non-error) telemetry event
ITelemetryLoggerExt Legacy, Alpha An extended ITelemetryBaseLogger which allows for more lenient event types.
ITelemetryLoggerPropertyBags Legacy, Alpha
ITelemetryPerformanceEventExt Legacy, Alpha Performance telemetry event.

Classes

Class Alerts Description
EventEmitterWithErrorHandling Legacy, Alpha Event Emitter helper class
MockLogger Deprecated, Legacy, Alpha

Mock ITelemetryBaseLogger implementation.

Records events sent to it, and then can walk back over those events, searching for a set of expected events to match against the logged events.

Types

TypeAlias Alerts Description
ITelemetryLoggerPropertyBag Legacy, Alpha
ITelemetryPropertiesExt Legacy, Alpha JSON-serializable properties, which will be logged with telemetry.
TelemetryEventCategory Legacy, Alpha

The categories FF uses when instrumenting the code.

generic - Informational log event

error - Error log event, ideally 0 of these are logged during a session

performance - Includes duration, and often has _start, _end, or _cancel suffixes for activity tracking

TelemetryEventPropertyTypeExt Legacy, Alpha Property types that can be logged.
TelemetryEventPropertyTypes Legacy, Alpha

Functions

Function Alerts Return Type Description
createChildLogger(props) Legacy, Alpha ITelemetryLoggerExt Create a child logger based on the provided props object.

Function Details

createChildLogger

Create a child logger based on the provided props object.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/telemetry-utils/legacy.

For more information about our API support guarantees, see here .

Signature

export declare function createChildLogger(props?: {
    logger?: ITelemetryBaseLogger;
    namespace?: string;
    properties?: ITelemetryLoggerPropertyBags;
}): ITelemetryLoggerExt;

Remarks

Passing in no props object (i.e. undefined) will return a logger that is effectively a no-op.

Parameters

Parameter Modifiers Type Description
props optional { logger?: ITelemetryBaseLogger; namespace?: string; properties?: ITelemetryLoggerPropertyBags; } 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.

Returns

Return type: ITelemetryLoggerExt