Nerdiest Political Manifesto

    This version has been deprecated

    Author message:

    This package is deprecated in favor of @azure/applicationinsights-query whick works both on node.js and browsers

    azure-applicationinsights-query
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0-preview • Public • Published

    uid: azure-applicationinsights-query summary: *content


    Microsoft Azure SDK for Node.js - ApplicationInsightsDataClient

    This project provides a Node.js package for accessing Azure. Right now it supports:

    • Node.js version 6.x.x or higher

    Features

    How to Install

    npm install azure-applicationinsights-query

    How to use

    Authentication, client creation and get metrics as an example.

    const msRest = require("ms-rest");
    const ApplicationInsightsDataClient = require("azure-applicationinsights-query");
    const token = "<access_token>";
    const creds = new msRest.TokenCredentials(token);
    const subscriptionId = "<Subscription_Id>";
    const client = new ApplicationInsightsDataClient(creds, subscriptionId);
    const appId = "testappId";
    const metricId = "requests/count";
    const timespan = "testtimespan";
    const interval = "P1Y2M3DT4H5M6S";
    const aggregation = ["min"];
    const segment = ["applicationBuild"];
    const top = 1;
    const orderby = "testorderby";
    const filter = "testfilter";
    client.metrics.get(appId, metricId, timespan, interval, aggregation, segment, top, orderby, filter).then((result) => {
      console.log("The result is:");
      console.log(result);
    }).catch((err) => {
      console.log('An error occurred:');
      console.dir(err, {depth: null, colors: true});
    });
    
    ## Related projects
    
    - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)

    Keywords

    Install

    npm i azure-applicationinsights-query@1.0.0-preview

    Version

    1.0.0-preview

    License

    MIT

    Unpacked Size

    303 kB

    Total Files

    60

    Last publish

    Collaborators

    • windowsazure