Releases: microsoft/ApplicationInsights-JS
2.0.1
trackException Change
This update has a couple of non-breaking API changes. Namely, trackException
is now consistent with the Node.js SDK. The only change here is the named argument is renamed from error
to exception
. A shim is in place so any existing usages of trackException
will still work, and the old field is marked as optional, so any type-checked files will still "compile". There are no breaking changes with this change, but you are encouraged to use exception
as your named argument field as error will be deprecated in a future major version.
Old
appInsights.trackException({ error: new Error() });
New
appInsights.trackException({ exception: new Error() });
Correlation Header Domain Whitelisting #869
Second, the ability to only send correlation headers to specific, whitelisted domains is now available as a configuration option , correlationHeaderDomains
. It accepts an array
of domain strings
. Wildcards ("*") are okay. By populating this array, all other domains which your application makes requests to will not have correlation headers included. This setting makes it easy to avoid OPTIONS requests to services outside of your control.
You can use the inclusion list and the exclusion list in conjunction with each other to add correlation headers to a particular domain, example.com
, and at the same time exclude headers from a prefixed version of it, no-headers.example.com
.
Tag Override Change #903
Performing custom tag overrides is now more consistent with all of the other Application Insights SDKs, in that it is modified via a simple key-value dictionary. There are no breaking changes with this update, and if you are setting any tags via the old way, they will still work as they do now. You are encouraged to update them since the old way will be deprecated in a future major version release.
Old
var telemetryInitializer = (item) => {
item.tags.push({ "ai.cloud.role": "My Web App" });
};
appInsights.addTelemetryInitializer(telemetryInitializer);
New
var telemetryInitializer = (item) => {
item.tags["ai.cloud.role"] = "My Web App";
};
appInsights.addTelemetryInitializer(telemetryInitializer);
Changelog
#869 - config: add ability to whitelist specific domains for adding correlation headers
#893 - docs: fix sample configuration settings
#899 - common: replace Array.some with Array.forEach to simplify polyfill story, add tests
#902 - snippet: add missing methods to lazy loaders
#903 - tags can now be set with same API as other AI SDKs
#904 - rename IExceptionTelemetry.error --> IExceptionTelemetry.exception
#905 - react: fix plugin causing jest tests to fail
#907 - docs: add mention of how to update current context's operation
#908 - react: remove analytics package dependency
#910 - docs: update context refresh information
#913 - Remove code from adding libVer from extensions
#918 - automatically add ai.operation.name
tag, add id
to pageview telemetry
#919 - fix issue with namePrefix
not affecting send buffers
2.0.0
2.0.0-rc5
2.0.0-rc4
2.0.0-rc3
- #827 fix
autoTrackPageVisitTime
configuration option - #829 fix sessionStorage usage not honoring
nameSession
config value - #831 fix fields that are truncated by the sanitizer are now logged to console untruncated
- #833 fix React Native isOnline check for retrying telemetry
- #836 fix duration not appearing in some pageView telemetry
- #825 move exception part B creation from channel to analytics plugin
2.0.0-rc1
npm i @microsoft/applicationinsights-web
- #819 Custom Properties can be sent as objects instead of only primitive types. They will be stringified and will be parsed correctly as objects in the Azure Portal.
- #819 Automatically track referral URI on pageViews
- #760 Correctly label autocollected
fetch
requests as "Fetch" in Azure - #786 Add trace extension
- #771 Export
Operation
so user can refresh context when necessary (e.g. for SPA applications)
Breaking changes in Beta SDK
npm install @microsoft/applicationinsights-web
Update has been published to https://az416426.vo.msecnd.net/next/ai.1.min.js.
This does not impact users currently on existing Production SDK version 1.0 (verison 1.0.20 is latest).
If you are on version 2.0.1-beta and downloading SDK from location https://az416426.vo.msecnd.net/beta/ai.1.min.js, please prepare an update for SDK usage for following changes to be able to use latest version (available at https://az416426.vo.msecnd.net/next/ai.1.min.js). Further beta updates will be to file next/ai.1.min.js
Breaking changes with respect to version in /beta/ai.1.min.js:
- Field renames in type passed in for trackDependencyData.
- Field renames in ITelemetryItem (this may not impact depending on usage)
- Snippet updated (please use latest snippet from here)
New release features:
- Changes from data schema reviews.
- Bug fixes.
- Ability to test new beta SDK (2.0.2-beta) if you are on production SDK version (1.0) with no code changes Readme V2
If you have not done so already, please subscribe to releases to the repo for release notifications from the application insights Javascript SDK.
2.0.1-beta version for application insights JS SDK
This is a first beta release of the application insights javascript SDK version 2.0. The new SDK is based on plugin architecture and built of separate extensions each of which encapsulates separate SDK functionality. Some capabilities include:
- Ability to build your own custom SKU using extensions that you need.
- Load extensions into one of our standard SKUs (initially single SKU is available).
- Continue supporting existing infrastructure to add telemetry processors.
This first beta release provides the CDN load approach for the standard SKU that will be offered. This SKU matches parity with current SKU of the Application Insights Javascript SDK. Some apis have breaking changes readme-v2.md
1.0.20
Remove support for tracking dependency through fetch api. Fetch api is promise based and older versions IE (< 10) do not have support for javascript promise. This caused script load issues. Consumers requiring instrumentation for dependency tracking through fetch api need can track this through trackDependency api in the SDK.
Version 1.0.19
Release contains the following:
- Add support for tracking dependencies done via fetch api. Feature needs to be enabled through configuration. Thank you @MaximBalaganskiy for this contribution.
- Bug fixes for build issues in typescript #615
- Improve unit test coverage