API Docs for: 2.0.20133.2
Show:

File: src\internal\telemetry\eventData.ts

/**
 * @module Telemetry
 * @namespace telemetry
 */
namespace internal.telemetry {

    /**
     * A interface that defines common properties for all events
     * @class BaseEventData
     * @static
     */
    export interface BaseEventData {
        /**
         * Name of the current event
         * @property {string} name
         */
        name: string;

        /**
         * Current SDK version
         * @property {string} sdkVersion
         */
        sdkVersion: string;

        /**
         * Current Partner Id
         * @property {string} partnerId
         */
        partnerId: string;

        /**
         * Current Partner Application Id
         * @property {string} partnerAppId
         */
        partnerAppId: string;

        /**
         * Overridden Application Id
         * @property {string} appId
         */
        appId: string;

        /**
         * Current Session Id
         * @property {string} sessionId
         */
        sessionId: string;

        /**
         * Current Platform
         * @property {string} platform
         */
        platform: string;

        /**
         * Current Origin
         * @property {string} origin
         */
        origin: string;
    }

    /**
     * A interface that defines common properties for all Qos events
     * @class QosEventData
     * @extends telemetry.BaseEventData
     * @static
     */
    export interface QosEventData extends BaseEventData {
        /**
         * The mnemonic name of the current operation
         * @property {string} operationName
         */
        operationName: string;

        /**
         * The duration in milliseconds between start and stop of operation
         * @property {number} latencyMs
         */
        latencyMs: number;

        /**
         * HTTP protocol status code
         * @property {string} statusCode
         */
        statusCode: string;

        /**
         * A flag indicating success or failure of the operation
         * @property {boolean} succeeded
         */
        succeeded: boolean;

        /**
         * Any messages that needs to be included in the event
         * @property {string} message
         */
        message: string;

        startTimer(): void;
        stopTimer(): void;
    }

    /**
     * A interface that defines properties for IncomingRequest Qos event
     * @class IncomingRequestData
     * @extends telemetry.QosEventData
     * @static
     */
    export interface IncomingRequestData extends QosEventData {
        /**
         * Name of the Support SDK component
         * @property {string} message
         */
        componentName: string;

        /**
         * Current UI Info
         * @property {string} uiInfo
         */
        uiInfo: string;

        /**
         * Referrer of the current document
         * @property {string} referrer
         */
        referrer: string;
    }

    /**
     * A interface that defines properties for OutgoingRequest Qos event
     * @class OutgoingRequestData
     * @extends telemetry.QosEventData
     * @static
     */
    export interface OutgoingRequestData extends QosEventData {
        /**
         * The full URI of the operation called including query parameters
         * @property {string} targetUri
         */
        targetUri: string;

        /**
         * HTTP request method
         * @property {string} requestMethod
         */
        requestMethod: string;

        /**
         * Name of the service where this outgoing request is made to
         * @property {string} dependencyName
         */
        dependencyName: string;

        /**
         * Name of the operation called on the target service
         * @property {string} dependencyOperationName
         */
        dependencyOperationName: string;
    }

    /**
     * A interface that defines properties for ClientError event
     * @class ClientErrorData
     * @extends telemetry.BaseEventData
     * @static
     */
    export interface ClientErrorData extends BaseEventData {
        /**
         * Error message
         * @property {string} errorMessage
         */
        errorMessage: string;

        /**
         * Error name 
         * @property {string} errorName
         */
        errorName: string;
    }
}