BT

InfoQ Homepage News Azure Application Insights for Node.js Hits 1.0

Azure Application Insights for Node.js Hits 1.0

Bookmarks

At Node.js Interactive North America, Microsoft announced the general availability of the Application Insights for Node.js SDK.

In a blog post announcing the release, Microsoft's Arunesh Chandra, Sr. program manager for JavaScript Platform and Tools, says that Microsoft is "committed to enabling great experiences for developers building and running Node.js apps on Azure."

The SDK allows Node.js developers to gather a wide swath of data about their applications, from performance metrics to dependency tracking to console logging. Like the SDKs for other languages, by default the Node version tracks HTTP requests, system metrics, and unhandled exceptions. Developers can manually track their own custom telemetry:

let appInsights = require("applicationinsights");
appInsights.setup().start(); // assuming ikey in env var. start() can be omitted to disable any non-custom data
let client = appInsights.defaultClient;
client.trackEvent({name: "my custom event", properties: {customProperty: "custom property value"}});
client.trackException({exception: new Error("handled exceptions can be logged with this method")});
client.trackMetric({name: "custom metric", value: 3});
client.trackTrace({message: "trace message"});
client.trackDependency({target:"http://dbname", name:"select customers proc", data:"SELECT * FROM Customers", duration:231, resultCode:0, success: true, dependencyTypeName: "ZSQL"});
client.trackRequest({name:"GET /customers", url:"http://myserver/customers", duration:309, resultCode:200, success:true});

Code taken from the project's README.

While much of the 1.0 release is stability and performance enhancements, it does provide more Application Map functionality out of the box. Now, dependencies like Redis, MongoDB, and PostgreSQL can be automatically included in the Application Map. This release also adds automatic instrumentation support for the popular winston logging framework.

There were a few breaking changes, mostly related to function and type renaming. The SDK is an open source project on GitHub.

The news is good for those developers on Microsoft's Azure cloud and those who require a stable release before deploying to production. In recent years, the Node.js community has warmed to Microsoft and their software and services as they continue to contribute to open source. Application Insights became generally available in November 2016 and the addition of full support for Node.js closes a big gap in their product offering.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.