@twinfinity/core
    Preparing search index...

    Class CompoundTelemetryClient

    Used to combine a set of TwinfinityTelemetryClient instances and have calls to the trackXYZ methods, on this instance, forwarded to them.

    Implements

    Index

    Constructors

    Properties

    role?: string

    Optional Role name that application insights will report. A good idea is to use application name for this.

    Accessors

    • get accountId(): string

      AccountId that application insights will report. In twinfinity its a good idea to set it to the customer hostname.

      Returns string

    • get isConsoleLoggingEnabled(): boolean

      true if console logging is enabled, otherwise false.

      Returns boolean

    • set isConsoleLoggingEnabled(v: boolean): void

      Set to true to enable console logging. false to disable.

      Parameters

      • v: boolean

      Returns void

    • get userId(): string

      User id that application insights will report. In twinfinity its a good idea to set this to the logged in user.

      Returns string

    Methods

    • Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=|

      The method will only set the authenticatedUserId and accountId in the current page view. To set them for the whole session, you should set storeInCookie = true

      Parameters

      • authenticatedUserId: string
      • OptionalaccountId: string
      • OptionalstoreInCookie: boolean

      Returns void

    • Starts tracking an event with the given name.

      Parameters

      • name: string

        The name of the event to track.

      Returns TelemetryEvent

    • Track an event. See Application insights documentation for more information

      Parameters

      • event: IEventTelemetry
      • OptionalcustomProperties: ICustomProperties

      Returns void

    • Track an exception. See Application insights documentation for more information

      Parameters

      • exception: IExceptionTelemetry
      • OptionalcustomProperties: ICustomProperties

      Returns void

    • Track a metric. See Application insights documentation for more information

      Parameters

      • metric: IMetricTelemetry
      • OptionalcustomProperties: ICustomProperties

      Returns void

    • Track a trace. See Application insights documentation for more information

      Parameters

      • trace: ITraceTelemetry
      • OptionalcustomProperties: ICustomProperties

      Returns void