Interface IExtendedConfiguration

The IExtendedConfiguration interface holds the configuration details passed to core during initialize.

interface IExtendedConfiguration {
    anonCookieName?: string;
    channels?: IChannelControls[][];
    connectionString?: string | IPromise<string>;
    cookieCfg?: ICookieMgrConfig;
    cookieDomain?: string;
    cookiePath?: string;
    createPerfMgr?: ((core: IAppInsightsCore<IConfiguration>, notificationManager: INotificationManager) => IPerfManager);
    diagnosticLogInterval?: number;
    disableCookiesUsage?: boolean;
    disableDbgExt?: boolean;
    disableEventTimings?: boolean;
    disableInstrumentationKeyValidation?: boolean;
    disablePageShowEvents?: string[];
    disablePageUnloadEvents?: string[];
    enableCompoundKey?: boolean;
    enableDebug?: boolean;
    enablePerfMgr?: boolean;
    enableWParam?: boolean;
    endpointUrl?: string | IPromise<string>;
    expCfg?: IExceptionConfig;
    extensionConfig?: {
        [key: string]: any;
    };
    extensions?: ITelemetryPlugin[];
    featureOptIn?: IFeatureOptIn;
    idLength?: number;
    initInMemoMaxSize?: number;
    initTimeOut?: number;
    instrumentationKey?: string | IPromise<string>;
    loggingLevelConsole?: number;
    loggingLevelTelemetry?: number;
    maxMessageLimit?: number;
    perfEvtsSendAll?: boolean;
    propertyStorageOverride?: IPropertyStorageOverride;
    redactQueryParams?: string[];
    redactUrls?: boolean;
    storagePrefix?: string;
}

Hierarchy (view full)

Properties

anonCookieName?: string

[Optional] Name of the Anon cookie. The value will be set in the qsp header to collector requests. Collector will use this value to look for specific cookie to use for anid property.

channels?: IChannelControls[][]

Channel queues that is setup by caller in desired order. If channels are provided here, core will ignore any channels that are already setup, example if there is a SKU with an initialized channel

connectionString?: string | IPromise<string>

Connection string of resource. Either this or instrumentationKey must be specified.

cookieCfg?: ICookieMgrConfig

[Optional] A Cookie Manager configuration which includes hooks to allow interception of the get, set and delete cookie operations. If this configuration is specified any specified enabled and domain properties will take precedence over the cookieDomain and disableCookiesUsage values.

cookieDomain?: string

Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified.

""
cookiePath?: string

Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified.

""
createPerfMgr?: ((core: IAppInsightsCore<IConfiguration>, notificationManager: INotificationManager) => IPerfManager)

[Optional] Callback function that will be called to create a the IPerfManager instance when required and enablePerfMgr is enabled, this enables you to override the default creation of a PerfManager() without needing to setPerfMgr() after initialization.

diagnosticLogInterval?: number

Set the timer interval (in ms) for internal logging queue, this is the amount of time to wait after logger.queue messages are detected to be sent. Note: since 3.0.1 and 2.8.13 the diagnostic logger timer is a normal timeout timer and not an interval timer. So this now represents the timer "delay" and not the frequency at which the events are sent.

disableCookiesUsage?: boolean

[Optional] A boolean that indicated whether to disable the use of cookies by the 1DS Web SDK. The cookies added by the SDK are MicrosoftApplicationsTelemetryDeviceId. If cookies are disabled, then session events are not sent unless propertyStorageOverride is provided to store the values elsewhere.

disableDbgExt?: boolean

[Optional] A flag for performance optimization to disable attempting to use the Chrome Debug Extension, if disabled and the extension is installed this will not send any notifications.

disableEventTimings?: boolean

[Optional] Disables additional internal event timings that are added during processing of events, the timings are not sent as part telemetry items to the server

disableInstrumentationKeyValidation?: boolean

Flag that disables the Instrumentation Key validation.

disablePageShowEvents?: string[]

[Optional] An array of page show events that you would like to be ignored, special note there must be at lease one valid show event hooked, if you list all or the runtime environment only supports a listed (disabled) event it will STILL be hooked, if required by the SDK. Page Show events include "pageshow" and "visibilitychange" (with 'visible' state).

{
disablePageShowEvents: ["pageshow"]
}

For more details, see the Page Unload Events documentation.

disablePageUnloadEvents?: string[]

[Optional] An array of the page unload events that you would like to be ignored, special note there must be at least one valid unload event hooked, if you list all or the runtime environment only supports a listed "disabled" event it will still be hooked, if required by the SDK. Unload events include "beforeunload", "unload", "visibilitychange" (with 'hidden' state) and "pagehide".

This can be used to avoid jQuery 3.7.1+ deprecation warnings and Chrome warnings about the unload event:

{
disablePageUnloadEvents: ["unload"]
}

For more details, see the Page Unload Events documentation.

enableCompoundKey?: boolean

[Optional] Enables support for objects with compound keys which indirectly represent an object where the "key" of the object contains a "." as part of it's name.

event: { "somedata.embeddedvalue": 123 }
enableDebug?: boolean

If enabled, uncaught exceptions will be thrown to help with debugging

enablePerfMgr?: boolean

[Optional] When enabled this will create local perfEvents based on sections of the code that have been instrumented to emit perfEvents (via the doPerf()) when this is enabled. This can be used to identify performance issues within the SDK, the way you are using it or optionally your own instrumented code. The provided IPerfManager implementation does NOT send any additional telemetry events to the server it will only fire the new perfEvent() on the INotificationManager which you can listen to. This also does not use the window.performance API, so it will work in environments where this API is not supported.

enableWParam?: boolean

Add "&w=0" parameter to support UA Parsing when web-workers don't have access to Document. Default is false

endpointUrl?: string | IPromise<string>

Endpoint where telemetry data is sent

expCfg?: IExceptionConfig

[Optional] Set additional configuration for exceptions, such as more scripts to include in the exception telemetry.

3.3.2

extensionConfig?: {
    [key: string]: any;
}

Extension configs loaded in SDK

extensions?: ITelemetryPlugin[]

Additional plugins that should be loaded by core at runtime

featureOptIn?: IFeatureOptIn

Custom optional value to opt in features

undefined
idLength?: number

[Optional] Identifies the default length used to generate random session and user id's if non currently exists for the user / session. Defaults to 22, previous default value was 5, if you need to keep the previous maximum length you should set this value to 5.

initInMemoMaxSize?: number

If your connection string, instrumentation key and endpoint url are promises, this config is to manually set in memory proxy track calls count limit before promises finished. Default: 100

3.3.0

initTimeOut?: number

If your connection string, instrumentation key and endpoint url are promises, this config is to manually set timeout for those promises. Default: 50000ms

3.3.0

instrumentationKey?: string | IPromise<string>

Instrumentation key of resource. Either this or connectionString must be specified.

loggingLevelConsole?: number

Console logging level. All logs with a severity level higher than the configured level will be printed to console. Otherwise they are suppressed. ie Level 2 will print both CRITICAL and WARNING logs to console, level 1 prints only CRITICAL.

Note: Logs sent as telemetry to instrumentation key will also be logged to console if their severity meets the configured loggingConsoleLevel

0: ALL console logging off 1: logs to console: severity >= CRITICAL 2: logs to console: severity >= WARNING

loggingLevelTelemetry?: number

Telemtry logging level to instrumentation key. All logs with a severity level higher than the configured level will sent as telemetry data to the configured instrumentation key.

0: ALL iKey logging off 1: logs to iKey: severity >= CRITICAL 2: logs to iKey: severity >= WARNING

maxMessageLimit?: number

Maximum number of iKey transmitted logging telemetry per page view

perfEvtsSendAll?: boolean

[Optional] Fire every single performance event not just the top level root performance event. Defaults to false.

propertyStorageOverride?: IPropertyStorageOverride

[Optional] The property storage override that should be used to store internal SDK properties, otherwise stored as cookies. It is needed where cookies are not available.

redactQueryParams?: string[]

[Optional] Additional query parameters to redact beyond the default set. Use this to specify custom parameters that contain sensitive information. These will be combined with the default parameters that are redacted.

["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature"]
["sig", "Signature", "AWSAccessKeyId", "X-Goog-Signature","auth_token", "api_key", "private_data"]
redactUrls?: boolean

[Optional] A flag to enable or disable the use of the field redaction for urls.

true
storagePrefix?: string

Custom optional value that will be added as a prefix for storage name.

undefined