Packages > @fluidframework/telemetry-utils

@fluidframework/telemetry-utils Package


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.


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.


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


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

Function Details


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 .


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


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


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.


Return type: ITelemetryLoggerExt