Skip to content

Commit 8328fe2

Browse files
author
Bill Prin
committed
Add region tags for writing timeseries
1 parent 5cb0935 commit 8328fe2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

monitoring/v3/src/main/java/CreateCustomMetric.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ public MetricDescriptor getCustomMetric() throws IOException {
229229
*
230230
* @throws IOException On network error.
231231
*/
232+
// [START write_timeseries]
232233
void writeCustomMetricTimeseriesValue() throws IOException {
233234
Map<String, String> metricLabel = ImmutableMap.of(
234235
"environment", "STAGING"
@@ -264,6 +265,7 @@ void writeCustomMetricTimeseriesValue() throws IOException {
264265
timeSeriesRequest.setTimeSeries(Lists.<TimeSeries>newArrayList(timeSeries));
265266
monitoringService.projects().timeSeries().create(projectResource, timeSeriesRequest).execute();
266267
}
268+
// [END write_timeseries]
267269

268270
/**
269271
* Read the TimeSeries value for the custom metrics created within a window of the

0 commit comments

Comments
 (0)