ExportOptionalaccountAn optional account id, if your app groups users into accounts. No spaces, commas, semicolons, equals, or vertical bars.
Optionaladd[Optional] Flag to indicate whether the internal looking endpoints should be automatically
added to the excludeRequestFromAutoTrackingPatterns collection. (defaults to true).
This flag exists as the provided regex is generic and may unexpectedly match a domain that
should not be excluded.
OptionaladdProvide a way to enrich dependencies logs with context at the beginning of api call. Default is undefined.
OptionalajaxThe amount of time to wait before re-attempting to find the windows.performance timings for an ajax request, time is in milliseconds and is passed directly to setTimeout() Defaults to 25.
OptionalappAppId is used for the correlation between AJAX dependencies happening on the client-side with the server-side requets. When Beacon API is enabled, it cannot be used automatically, but can be set manually in the configuration. Default is null
OptionalautoOptionalautoIf true, on a pageview, the previous instrumented page's view time is tracked and sent as telemetry and a new timer is started for the current pageview. It is sent as a custom metric named PageVisitTime in milliseconds and is calculated via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less). Default is false.
OptionalautoOptionalbufferIf specified, overrides the storage & retrieval mechanism that is used to manage unsent telemetry.
OptionalconvertProvide user an option to convert undefined field to user defined value.
OptionalcookieCustom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains.
OptionalcookieCustom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway.
OptionalcorrelationOptionalcorrelationDisable correlation headers for specific domain
OptionalcorrelationDisable correlation headers using regular expressions
OptionalcustomThe ability for the user to provide extra headers
OptionaldisableIf true, Ajax calls are not autocollected. Default is false
OptionaldisableIf true, the SDK will not store or read any data from cookies. Default is false. If you have also specified a cookieCfg then enabled property (if specified) will take precedent over this value.
OptionaldisableIf false, the SDK will add two headers ('Request-Id' and 'Request-Context') to all dependency requests to correlate them with corresponding requests on the server side. Default is false.
OptionaldisableOptionaldisableIf true, exceptions are not autocollected. Default is false
OptionaldisableIf true, Fetch requests are not autocollected. Default is false (Since 2.8.0, previously true).
OptionaldisableDefault false. If true, flush method will not be called when onBeforeUnload, onUnload, onPageHide or onVisibilityChange (hidden state) event(s) trigger.
OptionaldisableDefault value of disableFlushOnBeforeUnload. If true, flush method will not be called when onPageHide or onVisibilityChange (hidden state) event(s) trigger.
Optionaldisable[Optional] Disable iKey deprecation error message.
OptionaldisableIf true, telemetry is not collected or sent. Default is false
Optionaldisable[Optional] Sets to true if user wants to disable sending internal log message 'SendBrowserInfoOnUserInit' default to be false for versions 2.8.x and 3.0.x, true for versions 3.1.x and later
OptionaldisableDon't use XMLHttpRequest or XDomainRequest (for IE < 9) by default instead attempt to use fetch() or sendBeacon. If no other transport is available it will still use XMLHttpRequest
OptionaldistributedSets the distributed tracing mode. If AI_AND_W3C mode or W3C mode is set, W3C trace context headers (traceparent/tracestate) will be generated and included in all outgoing requests. AI_AND_W3C is provided for back-compatibility with any legacy Application Insights instrumented services
OptionalemitThe JSON format (normal vs line delimited). True means line delimited JSON.
OptionalenableAn optional value that will track Response Error data through trackDependency function.
OptionalenableFlag to enable looking up and including additional browser window.performance timings in the reported ajax (XHR and fetch) reported metrics. Defaults to false.
OptionalenableAutomatically track route changes in Single Page Applications (SPA). If true, each route change will send a new Pageview to Application Insights.
OptionalenableIf true, the SDK will add two headers ('Request-Id' and 'Request-Context') to all CORS requests to correlate outgoing AJAX dependencies with corresponding requests on the server side. Default is false
OptionalenableIf true, debugging data is thrown as an exception by the logger. Default false
OptionalenableAn optional value that will track Request Header through trackDependency function.
OptionalenableAn optional value that will track Response Header through trackDependency function.
OptionalenableIf true, the buffer with all unsent telemetry is stored in session storage. The buffer is restored on page load. Default is true.
OptionalenableDefault false. Define whether to track unhandled promise rejections and report as JS errors. When disableExceptionTracking is enabled (dont track exceptions) this value will be false.
Optionalevents[Optional] The number of events that can be kept in memory before the SDK starts to drop events. By default, this is 10,000.
OptionalexcludeProvide a way to exclude specific route from automatic tracking for XMLHttpRequest or Fetch request. For an ajax / fetch request that the request url matches with the regex patterns, auto tracking is turned off.
OptionalisIf false, the SDK will send all telemetry using the Beacon API.
OptionalisDefault is false. If true, the SDK will track all Browser Link requests.
OptionalisUse either disableCookiesUsage or specify a cookieCfg with the enabled value set. If true, the SDK will not store or read any data from cookies. Default is false. As this field is being deprecated, when both isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent.
OptionalisDefault false. If false, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error), 503 (service unavailable), and 0 (offline, only if detected)
OptionalisIf true, the SDK will not store or read any data from local and session storage. Default is false.
OptionalmaxDefault 500 - controls how many ajax calls will be monitored per page view. Set to -1 to monitor all (unlimited) ajax calls on the page.
OptionalmaxThe maximum number of times to look for the window.performance timings (if available), this is required as not all browsers populate the window.performance before reporting the end of the XHR request and for fetch requests this is added after its complete Defaults to 3
OptionalmaxHow long to batch telemetry for before sending (milliseconds)
OptionalmaxMax size of telemetry batch. If batch exceeds limit, it is sent and a new batch is started
OptionalnameAn optional value that will be used as name postfix for localStorage and session cookie name.
OptionalonunloadDefault false. when tab is closed, the SDK will send all remaining telemetry using the Beacon API
OptionalonunloadIf fetch keepalive is supported do not use it for sending events during unload, it may still fallback to fetch() without keepalive
OptionaloverrideIf true, default behavior of trackPageView is changed to record end of page view duration interval when trackPageView is called. If false and no custom duration is provided to trackPageView, the page view performance is calculated using the navigation timing API. Default is false
OptionalsamplingPercentage of events that will be sent. Default is 100, meaning all events are sent.
OptionalsdkSets the sdk extension name. Only alphabetic characters are allowed. The extension name is added as a prefix to the 'ai.internal.sdkVersion' tag (e.g. 'ext_javascript:2.0.0'). Default is null.
OptionalsessionAn optional value that will be used as name postfix for session cookie name. If undefined, namePrefix is used as name postfix for session cookie name.
OptionalsessionA session is logged if it has continued for this amount of time in milliseconds. Default 24h.
OptionalsessionA session is logged if the user is inactive for this amount of time in milliseconds. Default 30 mins.
Optionalthrottle[Optional] Sets throttle mgr configuration by key
OptionalurlOptionaluserAn optional value that will be used as name postfix for user cookie name. If undefined, no postfix is added on user cookie name.
Optionaluser[Optional] Specifies a Highest Priority custom endpoint URL where telemetry data will be sent. This URL takes precedence over the 'config.endpointUrl' and any endpoint in the connection string.
Configuration settings for how telemetry is sent
Interface
IConfig