https://github.com/bradoyler/azure-appinsights-client
App Insights (Data API) Client for Javascript
https://github.com/bradoyler/azure-appinsights-client
application-insights azure
Last synced: 17 days ago
JSON representation
App Insights (Data API) Client for Javascript
- Host: GitHub
- URL: https://github.com/bradoyler/azure-appinsights-client
- Owner: bradoyler
- Created: 2020-03-25T02:51:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T09:21:11.000Z (about 3 years ago)
- Last Synced: 2025-04-02T23:05:14.855Z (22 days ago)
- Topics: application-insights, azure
- Language: JavaScript
- Homepage:
- Size: 169 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## AppInsights Client for Javascript
A javascript client to query App Insights REST API
...because the [LogAnalyticsClient Azure SDK](https://github.com/Azure/azure-sdk-for-node/tree/master/lib/services/loganalytics#how-to-use) is not easy to use## Install
```sh
npm install appinsights-client
```### Usage
```js
const AppInsightsClient = require('appinsights-client')
const client = AppInsightsClient('AI_APPID', 'AI_APIKEY')const timespan = 'PT12H' // past 12 hrs
const query = 'customEvents | project name,timestamp,operation_Name,cloud_RoleName | limit 2'const objects = await client.query(query, timespan)
```### API Reference
https://dev.applicationinsights.io/reference### Get an API Key
