Gathering detailed insights and metrics for dogapi
Gathering detailed insights and metrics for dogapi
Gathering detailed insights and metrics for dogapi
Gathering detailed insights and metrics for dogapi
npm install dogapi
93.9
Supply Chain
99.2
Quality
75.6
Maintenance
100
Vulnerability
99.3
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
105 Stars
260 Commits
45 Forks
2 Watching
7 Branches
19 Contributors
Updated on 19 Sept 2024
Minified
Minified + Gzipped
JavaScript (64.5%)
HTML (35.5%)
Cumulative downloads
Total Downloads
Last day
-18.5%
262,069
Compared to previous day
Last week
3.8%
1,610,237
Compared to previous week
Last month
12.1%
6,613,248
Compared to previous month
Last year
32.3%
55,302,422
Compared to previous year
Datadog API Node.JS Client.
Official Datadog API Documentation: http://docs.datadoghq.com/api/
dogapi API Docs: http://brettlangdon.github.io/node-dogapi/
dogapi
does not provide any functionality to talk to a local dogstatsd
server.
This library is purely an interface to the HTTP api.
If you are looking for a good Datadog StatsD library, I recommend checking out node-dogstatsd.
From NPM:
1[sudo] npm install dogapi
From source:
1git clone git://github.com/brettlangdon/node-dogapi.git 2cd ./node-dogapi 3npm install
You will need your Datadog api key as well as an application key to use dogapi
.
Keys can be found at: https://app.datadoghq.com/account/settings#api
1var dogapi = require("dogapi"); 2 3var options = { 4 api_key: "YOUR_KEY_HERE", 5 app_key: "YOUR_KEY_HERE", 6 // if you are on the Datadog EU site, you need to overwrite the default value of api_host key: 7 // api_host: "app.datadoghq.eu" 8}; 9 10dogapi.initialize(options);
If you are behind a proxy you need to a proxy agent. You can use the https proxy agent from http://blog.vanamco.com/proxy-requests-in-node-js/ if you like. To configure dogapi with the agent just add it to the options.
1var dogapi = require("dogapi"); 2 3//Code from http://blog.vanamco.com/proxy-requests-in-node-js/ 4var HttpsProxyAgent = require("./httpsproxyagent"); 5 6var agent = new HttpsProxyAgent({ 7 proxyHost: "MY_PROXY_HOST", 8 proxyPort: 3128 9}); 10 11var options = { 12 api_key: "YOUR_KEY_HERE", 13 app_key: "YOUR_KEY_HERE", 14 proxy_agent: agent 15}; 16 17dogapi.initialize(options);
dogapi
now ships with a command line interface dogapi
. To use it you
will need a .dogapirc
file which meets the standards of
https://github.com/dominictarr/rc
The config file must contain both api_key
and app_key
keys (you can find
your datadog api and app keys here
https://app.datadoghq.com/account/settings#api)
Example:
1{ 2 "api_key": "<API_KEY>", 3 "app_key": "<APP_KEY>" 4}
Please run dogapi --help
to see current usage documentation for the tool.
Every api method available in dogapi
is exposed via the cli tool.
We have updated major versions for this library due to a backwards incompatible change to the argument format for dogapi.metric.send
and dogapi.metric.send_all
.
Previously in 1.x.x
:
1var now = parseInt(new Date().getTime() / 1000); 2dogapi.metric.send("metric.name", 50); 3dogapi.metric.send("metric.name", [now, 50]);
Now in 2.x.x
:
1var now = parseInt(new Date().getTime() / 1000); 2dogapi.metric.send("metric.name", 50); 3dogapi.metric.send("metric.name", [50, 100]); 4dogapi.metric.send("metric.name", [[now, 50]]);
Previously in 1.x.x
:
1var now = parseInt(new Date().getTime() / 1000); 2var metrics = [ 3 { 4 metric: "metric.name", 5 points: [now, 50] 6 }, 7 { 8 metric: "metric.name", 9 points: 50 10 } 11]; 12dogapi.metric.send_all(metrics);
Now in 2.x.x
:
1var now = parseInt(new Date().getTime() / 1000); 2var metrics = [ 3 { 4 metric: "metric.name", 5 points: [[now, 50]] 6 }, 7 { 8 metric: "metric.name", 9 points: [50, 100] 10 }, 11 { 12 metric: "metric.name", 13 points: 50 14 } 15]; 16dogapi.metric.send_all(metrics);
The MIT License (MIT) Copyright (c) 2013 Brett Langdon me@brett.is
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
5 existing vulnerabilities detected
Details
Reason
Found 6/23 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More