Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@google-cloud/monitoring
Advanced tools
Stackdriver Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others.
Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.
Table of contents:
npm install @google-cloud/monitoring
// Imports the Google Cloud client library
const monitoring = require('@google-cloud/monitoring');
async function quickstart() {
// Your Google Cloud Platform project ID
const projectId = process.env.GCLOUD_PROJECT || 'YOUR_PROJECT_ID';
// Creates a client
const client = new monitoring.MetricServiceClient();
// Prepares an individual data point
const dataPoint = {
interval: {
endTime: {
seconds: Date.now() / 1000,
},
},
value: {
// The amount of sales
doubleValue: 123.45,
},
};
// Prepares the time series request
const request = {
name: client.projectPath(projectId),
timeSeries: [
{
// Ties the data point to a custom metric
metric: {
type: 'custom.googleapis.com/stores/daily_sales',
labels: {
store_id: 'Pittsburgh',
},
},
resource: {
type: 'global',
labels: {
project_id: projectId,
},
},
points: [dataPoint],
},
],
};
// Writes time series data
const [result] = await client.createTimeSeries(request);
console.log(`Done writing time series data.`, result);
}
Samples are in the samples/
directory. The samples' README.md
has instructions for running the samples.
Sample | Source Code | Try it |
---|---|---|
Alerts | source code | |
Metrics | source code | |
Quickstart | source code | |
Uptime | source code |
The Stackdriver Monitoring Node.js Client API Reference documentation also contains samples.
This library follows Semantic Versioning.
This library is considered to be General Availability (GA). This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against GA libraries are addressed with the highest priority.
More Information: Google Cloud Platform Launch Stages
Contributions welcome! See the Contributing Guide.
Apache Version 2.0
See LICENSE
FAQs
Stackdriver Monitoring API client for Node.js
The npm package @google-cloud/monitoring receives a total of 42,328 weekly downloads. As such, @google-cloud/monitoring popularity was classified as popular.
We found that @google-cloud/monitoring demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.