Export
Optional
accountAn optional account id, if your app groups users into accounts. No spaces, commas, semicolons, equals, or vertical bars.
Optional
add[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.
Optional
addProvide a way to enrich dependencies logs with context at the beginning of api call. Default is undefined.
Optional
ajaxThe 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.
Optional
appAppId 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
Optional
autoOptional
autoIf 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.
Optional
autoOptional
bufferIf specified, overrides the storage & retrieval mechanism that is used to manage unsent telemetry.
Optional
convertProvide user an option to convert undefined field to user defined value.
Optional
cookieCustom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains.
Optional
cookieCustom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway.
Optional
correlationOptional
correlationDisable correlation headers for specific domain
Optional
correlationDisable correlation headers using regular expressions
Optional
customThe ability for the user to provide extra headers
Optional
disableIf true, Ajax calls are not autocollected. Default is false
Optional
disableIf 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.
Optional
disableIf 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.
Optional
disableOptional
disableIf true, exceptions are not autocollected. Default is false
Optional
disableIf true, Fetch requests are not autocollected. Default is false (Since 2.8.0, previously true).
Optional
disableDefault false. If true, flush method will not be called when onBeforeUnload, onUnload, onPageHide or onVisibilityChange (hidden state) event(s) trigger.
Optional
disableDefault value of disableFlushOnBeforeUnload
. If true, flush method will not be called when onPageHide or onVisibilityChange (hidden state) event(s) trigger.
Optional
disable[Optional] Disable iKey deprecation error message.
Optional
disableIf true, telemetry is not collected or sent. Default is false
Optional
disable[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
Optional
disableDon'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
Optional
distributedSets 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
Optional
emitThe JSON format (normal vs line delimited). True means line delimited JSON.
Optional
enableAn optional value that will track Response Error data through trackDependency function.
Optional
enableFlag to enable looking up and including additional browser window.performance timings in the reported ajax (XHR and fetch) reported metrics. Defaults to false.
Optional
enableAutomatically track route changes in Single Page Applications (SPA). If true, each route change will send a new Pageview to Application Insights.
Optional
enableIf 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
Optional
enableIf true, debugging data is thrown as an exception by the logger. Default false
Optional
enableAn optional value that will track Request Header through trackDependency function.
Optional
enableAn optional value that will track Response Header through trackDependency function.
Optional
enableIf true, the buffer with all unsent telemetry is stored in session storage. The buffer is restored on page load. Default is true.
Optional
enableDefault 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.
Optional
events[Optional] The number of events that can be kept in memory before the SDK starts to drop events. By default, this is 10,000.
Optional
excludeProvide 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.
Optional
isIf false, the SDK will send all telemetry using the Beacon API.
Optional
isDefault is false. If true, the SDK will track all Browser Link requests.
Optional
isUse 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.
Optional
isDefault 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)
Optional
isIf true, the SDK will not store or read any data from local and session storage. Default is false.
Optional
maxDefault 500 - controls how many ajax calls will be monitored per page view. Set to -1 to monitor all (unlimited) ajax calls on the page.
Optional
maxThe 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
Optional
maxHow long to batch telemetry for before sending (milliseconds)
Optional
maxMax size of telemetry batch. If batch exceeds limit, it is sent and a new batch is started
Optional
nameAn optional value that will be used as name postfix for localStorage and session cookie name.
Optional
onunloadDefault false. when tab is closed, the SDK will send all remaining telemetry using the Beacon API
Optional
onunloadIf fetch keepalive is supported do not use it for sending events during unload, it may still fallback to fetch() without keepalive
Optional
overrideIf 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
Optional
samplingPercentage of events that will be sent. Default is 100, meaning all events are sent.
Optional
sdkSets 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.
Optional
sessionAn 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.
Optional
sessionA session is logged if it has continued for this amount of time in milliseconds. Default 24h.
Optional
sessionA session is logged if the user is inactive for this amount of time in milliseconds. Default 30 mins.
Optional
throttle[Optional] Sets throttle mgr configuration by key
Optional
urlOptional
userAn optional value that will be used as name postfix for user cookie name. If undefined, no postfix is added on user cookie name.
Optional
user[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