An optional account ID, if your app groups users into accounts. No spaces, commas, semicolons, equals, or vertical bars
string null addRequestContextProvide a way to enrich dependencies logs with context at the beginning of an API call. Default is undefined. You need to check if xhr
exists if you configure xhr
related context. You need to check if fetch request
and fetch response
exist if you configure fetch
related context. Otherwise you may not get the data you need.
Defaults to 25 ms. The amount of time to wait before reattempting to find the windows.performance timings for an Ajax request, time is in milliseconds and is passed directly to setTimeout().
numeric 25 appIdAppId is used for the correlation between AJAX dependencies happening on the client-side with the server-side requests. When Beacon API is enabled, it can't be used automatically, but can be set manually in the configuration. Default is null
string null autoTrackPageVisitTimeIf 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's 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.
Provide user an option to convert undefined field to user defined value.
any
undefined cookieCfg
Defaults to cookie usage enabled see ICookieCfgConfig settings for full defaults.
ICookieCfgConfigCustom cookie domain. It's helpful if you want to share Application Insights cookies across subdomains.
cookieCfg.domain
is defined it takes precedence over this value. alias for cookieCfg.domain
Custom cookie path. It's helpful if you want to share Application Insights cookies behind an application gateway.
cookieCfg.path
is defined, it takes precedence. alias for cookieCfg.path
Enable correlation headers for specific domains
string[] undefined correlationHeaderExcludedDomainsDisable correlation headers for specific domains
string[] undefined correlationHeaderExcludePatternsDisable correlation headers using regular expressions
regex[] undefined createPerfMgrCallback function that is called to create an IPerfManager instance when required and enablePerfMgr
is enabled, it enables you to override the default creation of a PerfManager() without needing to setPerfMgr()
after initialization.
The ability for the user to provide extra headers when using a custom endpoint. customHeaders aren't added on browser shutdown moment when beacon sender is used. And adding custom headers isn't supported on IE9 or earlier.
[{header: string, value: string}]
undefined diagnosticLogInterval
(internal) Polling interval (in ms) for internal logging queue
numeric 10000 disableAjaxTrackingIf true, Ajax calls aren't autocollected. Default is false.
boolean false disableCookiesUsageDefault false. A boolean that indicates whether to disable the use of cookies by the SDK. If true, the SDK doesn't store or read any data from cookies.
cookieCfg.enabled
is defined it takes precedence. Cookie usage can be re-enabled after initialization via the core.getCookieMgr().setEnabled(true). alias for cookieCfg.enabled
If false, the SDK adds two headers ('Request-Id' and 'Request-Context') to all dependency requests to correlate them with corresponding requests on the server side. Default is false.
boolean false disableDataLossAnalysisIf false, internal telemetry sender buffers are checked at startup for items not yet sent.
boolean true disableExceptionTrackingIf true, exceptions aren't autocollected. Default is false.
boolean false disableFetchTrackingThe default setting for disableFetchTracking
is false
, meaning it's enabled. However, in versions prior to 2.8.10, it was disabled by default. When set to true
, Fetch requests aren't automatically collected. The default setting changed from true
to false
in version 2.8.0.
Default false. If true, flush method isn't called when onBeforeUnload event triggers
boolean false disableIkeyDeprecationMessageDisable instrumentation Key deprecation error message. If true, error messages are NOT sent.
boolean true disableInstrumentationKeyValidationIf true, instrumentation key validation check is bypassed. Default value is false.
boolean false disableTelemetryIf true, telemetry isn't collected or sent. Default is false.
boolean false disableXhrDon't use XMLHttpRequest or XDomainRequest (for Internet Explorer < version 9) by default instead attempt to use fetch() or sendBeacon. If no other transport is available, it uses XMLHttpRequest
boolean false distributedTracingModeSets the distributed tracing mode. If AI_AND_W3C mode or W3C mode is set, W3C trace context headers (traceparent/tracestate) are generated and included in all outgoing requests. AI_AND_W3C is provided for back-compatibility with any legacy Application Insights instrumented services.
numeric orDistributedTracingModes
DistributedTracing Modes.AI_AND_W3C
enableAjaxErrorStatusText
Default false. If true, include response error data text boolean in dependency event on failed AJAX requests.
boolean false enableAjaxPerfTrackingDefault false. Flag to enable looking up and including extra browser window.performance timings in the reported Ajax (XHR and fetch) reported metrics.
boolean false enableAutoRouteTrackingAutomatically track route changes in Single Page Applications (SPA). If true, each route change sends a new Pageview to Application Insights. Hash route changes (example.com/foo#bar
) are also recorded as new page views.
history
object for React router configuration because you get multiple page view events. boolean false enableCorsCorrelation
If true, the SDK adds 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
boolean false enableDebugIf true, internal debugging data is thrown as an exception instead of being logged, regardless of SDK logging settings. Default is false.
loggingLevelConsole
or loggingLevelTelemetry
instead of enableDebug
. boolean false enablePerfMgr
When enabled (true) it creates local perfEvents for code that has been instrumented to emit perfEvents (via the doPerf() helper). It can be used to identify performance issues within the SDK based on your usage or optionally within your own instrumented code.
boolean false enableRequestHeaderTrackingIf true, AJAX & Fetch request headers is tracked, default is false. If ignoreHeaders isn't configured, Authorization and X-API-Key headers aren't logged.
boolean false enableResponseHeaderTrackingIf true, AJAX & Fetch request's response headers is tracked, default is false. If ignoreHeaders isn't configured, WWW-Authenticate header isn't logged.
boolean false enableSessionStorageBufferDefault true. If true, the buffer with all unsent telemetry is stored in session storage. The buffer is restored on page load
boolean true enableUnhandledPromiseRejectionTrackingIf true, unhandled promise rejections are autocollected as a JavaScript error. When disableExceptionTracking is true (don't track exceptions), the config value is ignored and unhandled promise rejections aren't reported.
boolean false eventsLimitInMemThe number of events that can be kept in memory before the SDK starts to drop events when not using Session Storage (the default).
number 10000 excludeRequestFromAutoTrackingPatternsProvide a way to exclude specific route from automatic tracking for XMLHttpRequest or Fetch request. If defined, for an Ajax / fetch request that the request url matches with the regex patterns, auto tracking is turned off. Default is undefined.
string[] | RegExp[] undefined featureOptInSet Feature opt in details.
This configuration field is only available in version 3.0.3 and later.
IFeatureOptIn undefined idLengthIdentifies the default length used to generate new random session and user IDs. Defaults to 22, previous default value was 5 (v2.5.8 or less), if you need to keep the previous maximum length you should set the value to 5.
numeric 22 ignoreHeadersAJAX & Fetch request and response headers to be ignored in log data. To override or discard the default, add an array with all headers to be excluded or an empty array to the configuration.
string[] ["Authorization", "X-API-Key", "WWW-Authenticate"] isBeaconApiDisabledIf false, the SDK sends all telemetry using the Beacon API
boolean true isBrowserLinkTrackingEnabledDefault is false. If true, the SDK tracks all Browser Link requests.
boolean false isRetryDisabledDefault 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)
boolean false isStorageUseDisabledIf true, the SDK doesn't store or read any data from local and session storage. Default is false.
boolean false loggingLevelConsoleLogs internal Application Insights errors to console.
Sends internal Application Insights errors as telemetry.
Default 500 - controls how many Ajax calls are monitored per page view. Set to -1 to monitor all (unlimited) Ajax calls on the page.
numeric 500 maxAjaxPerfLookupAttemptsDefaults to 3. The maximum number of times to look for the window.performance timings (if available) is required. Not all browsers populate the window.performance before reporting the end of the XHR request. For fetch requests, it's added after it's complete.
numeric 3 maxBatchIntervalHow long to batch telemetry for before sending (milliseconds)
numeric 15000 maxBatchSizeInBytesMax size of telemetry batch. If a batch exceeds this limit, it's immediately sent and a new batch is started
numeric 10000 namePrefixAn optional value that is used as name postfix for localStorage and session cookie name.
string undefined onunloadDisableBeaconDefault false. when tab is closed, the SDK sends all remaining telemetry using the Beacon API
boolean false onunloadDisableFetchIf fetch keepalive is supported don't use it for sending events during unload, it may still fall back to fetch() without keepalive
boolean false overridePageViewDurationIf 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.
boolean false perfEvtsSendAllWhen enablePerfMgr is enabled and the IPerfManager fires a INotificationManager.perfEvent() this flag determines whether an event is fired (and sent to all listeners) for all events (true) or only for 'parent' events (false <default>).
Percentage of events that is sent. Default is 100, meaning all events are sent. Set it if you wish to preserve your data cap for large-scale applications.
numeric 100 sdkExtensionSets the SDK extension name. Only alphabetic characters are allowed. The extension name is added as a prefix to the 'ai.internal.sdkVersion' tag (for example, 'ext_javascript:2.0.0'). Default is null.
string null sessionCookiePostfixAn optional value that is used as name postfix for session cookie name. If undefined, namePrefix is used as name postfix for session cookie name.
string undefined sessionExpirationMsA session is logged if it has continued for this amount of time in milliseconds. Default is 24 hours
numeric 86400000 sessionRenewalMsA session is logged if the user is inactive for this amount of time in milliseconds. Default is 30 minutes
numeric 1800000 throttleMgrCfgSet throttle mgr configuration by key.
This configuration field is only available in version 3.0.3 and later.
{[key: number]: IThrottleMgrConfig}
undefined userCookiePostfix
An optional value that is used as name postfix for user cookie name. If undefined, no postfix is added on user cookie name.
string undefinedRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4