Skip to content

Commit f575158

Browse files
authored
Upgrade to repo tools v1.4.7 (#370)
1 parent 91578cc commit f575158

File tree

2 files changed

+70
-36
lines changed

2 files changed

+70
-36
lines changed

packages/google-cloud-monitoring/samples/README.md

+32-30
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
22

3-
# Stackdriver Monitoring Node.js samples
3+
# Stackdriver Monitoring Node.js Samples
44

5-
[Stackdriver Monitoring][monitoring_docs] collects metrics, events, and metadata
6-
from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes,
7-
application instrumentation, and a variety of common application components
8-
including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others.
5+
[![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-monitoring.svg)]()
96

10-
[monitoring_docs]: https://cloud.google.com/monitoring/docs/
7+
[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) 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.
118

129
## Table of Contents
1310

1411
* [Setup](#setup)
1512
* [Samples](#samples)
13+
* [Metrics](#metrics)
1614
* [Listing resources](#listing-resources)
1715
* [Custom metrics](#custom-metrics)
1816
* [Running the tests](#running-the-tests)
@@ -37,7 +35,8 @@ including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others.
3735

3836
### Metrics
3937

40-
View the [documentation][metrics_docs] or the [source code][metrics_code].
38+
39+
View the [documentation][metrics_0_docs] or the [source code][metrics_0_code].
4140

4241
__Usage:__ `node metrics.js --help`
4342

@@ -68,51 +67,54 @@ Examples:
6867
node metrics.js create
6968
node metrics.js list
7069
node metrics.js get logging.googleapis.com/log_entry_count
71-
node metrics.js delete
72-
custom.googleapis.com/stores/daily_sales
70+
node metrics.js delete custom.googleapis.com/stores/daily_sales
7371
node metrics.js list-resources
7472
node metrics.js get-resource cloudsql_database
7573
node metrics.js write
76-
node metrics.js read
77-
'metric.type="compute.googleapis.com/instance/cpu/utilizatio
78-
n"'
74+
node metrics.js read 'metric.type="compute.googleapis.com/instance/cpu/utilization"'
7975
node metrics.js read-fields
8076
node metrics.js read-aggregate
8177
node metrics.js read-reduce
8278
8379
For more information, see https://cloud.google.com/monitoring/docs
8480
```
8581

86-
[metrics_docs]: https://cloud.google.com/monitoring/docs
87-
[metrics_code]: metrics.js
82+
[metrics_0_docs]: https://cloud.google.com/monitoring/docs
83+
[metrics_0_code]: metrics.js
84+
85+
### Listing resources
8886

89-
### List resources
9087

91-
`list_resources.js` is a command-line program to demonstrate connecting to the Google
92-
Monitoring API to retrieve API data.
88+
View the [documentation][list_1_docs] or the [source code][list_1_code].
9389

94-
View the [documentation][list_docs] or the [source code][list_code].
90+
`list_resources.js` is a command-line program to demonstrate connecting to the
91+
Google Monitoring API to retrieve API data.
9592

96-
__Run the sample:__
93+
__Usage:__ `node list_resources <YOUR_PROJECT_ID>`
9794

98-
node list_resources <your-project-id>
95+
```
96+
node list_resources my-cool-project
97+
```
9998

100-
[list_docs]: https://cloud.google.com/monitoring/demos/#hello-world
101-
[list_code]: list_resources.js
99+
[list_1_docs]: https://cloud.google.com/monitoring/demos/#hello-world
100+
[list_1_code]: list_resources.js
102101

103-
### Custom metric
102+
### Custom metrics
104103

105-
`create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it,
106-
and read it back.
107104

108-
View the [documentation][custom_docs] or the [source code][custom_code].
105+
View the [documentation][metrics_2_docs] or the [source code][metrics_2_code].
109106

110-
__Run the sample:__
107+
`create_custom_metric.js` demonstrates how to create a custom metric, write a
108+
timeseries value to it, and read it back.
111109

112-
node create_custom_metric <your-project-id>
110+
__Usage:__ `node create_custom_metric <YOUR_PROJECT_ID>`
111+
112+
```
113+
node create_custom_metric my-cool-project
114+
```
113115

114-
[custom_docs]: https://cloud.google.com/monitoring/demos/#custom_metrics
115-
[custom_code]: create_custom_metric.js
116+
[metrics_2_docs]: https://cloud.google.com/monitoring/demos/#custom_metrics
117+
[metrics_2_code]: create_custom_metric.js
116118

117119
## Running the tests
118120

packages/google-cloud-monitoring/samples/package.json

+38-6
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@
88
"type": "git",
99
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
1010
},
11-
"cloud": {
12-
"requiresKeyFile": true,
13-
"requiresProjectId": true
14-
},
1511
"engines": {
1612
"node": ">=4.3.2"
1713
},
1814
"scripts": {
1915
"lint": "samples lint",
2016
"pretest": "npm run lint",
21-
"system-test": "ava -T 2m --verbose system-test/*.test.js",
17+
"system-test": "ava -T 3m --verbose system-test/*.test.js",
2218
"test": "npm run system-test"
2319
},
2420
"dependencies": {
@@ -28,9 +24,45 @@
2824
"yargs": "7.1.0"
2925
},
3026
"devDependencies": {
31-
"@google-cloud/nodejs-repo-tools": "1.3.1",
27+
"@google-cloud/nodejs-repo-tools": "1.4.7",
3228
"ava": "0.19.1",
3329
"proxyquire": "1.7.11",
3430
"sinon": "2.1.0"
31+
},
32+
"cloud-repo-tools": {
33+
"requiresKeyFile": true,
34+
"requiresProjectId": true,
35+
"product": "monitoring",
36+
"samples": [
37+
{
38+
"id": "metrics",
39+
"name": "Metrics",
40+
"file": "metrics.js",
41+
"docs_link": "https://cloud.google.com/monitoring/docs",
42+
"usage": "node metrics.js --help"
43+
},
44+
{
45+
"id": "list",
46+
"name": "Listing resources",
47+
"file": "list_resources.js",
48+
"docs_link": "https://cloud.google.com/monitoring/demos/#hello-world",
49+
"description": "`list_resources.js` is a command-line program to demonstrate connecting to the\nGoogle Monitoring API to retrieve API data.",
50+
"usage": {
51+
"text": "node list_resources <YOUR_PROJECT_ID>"
52+
},
53+
"help": "node list_resources my-cool-project"
54+
},
55+
{
56+
"id": "metrics",
57+
"name": "Custom metrics",
58+
"file": "create_custom_metric.js",
59+
"docs_link": "https://cloud.google.com/monitoring/demos/#custom_metrics",
60+
"description": "`create_custom_metric.js` demonstrates how to create a custom metric, write a\ntimeseries value to it, and read it back.",
61+
"usage": {
62+
"text": "node create_custom_metric <YOUR_PROJECT_ID>"
63+
},
64+
"help": "node create_custom_metric my-cool-project"
65+
}
66+
]
3567
}
3668
}

0 commit comments

Comments
 (0)