Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add region tags for writing timeseries #484

Merged
merged 1 commit into from
Jan 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add region tags for writing timeseries
Bill Prin committed Jan 12, 2017
commit 8328fe23c40ecda1fd941b61aaa18193c720fb3a
2 changes: 2 additions & 0 deletions monitoring/v3/src/main/java/CreateCustomMetric.java
Original file line number Diff line number Diff line change
@@ -229,6 +229,7 @@ public MetricDescriptor getCustomMetric() throws IOException {
*
* @throws IOException On network error.
*/
// [START write_timeseries]
void writeCustomMetricTimeseriesValue() throws IOException {
Map<String, String> metricLabel = ImmutableMap.of(
"environment", "STAGING"
@@ -264,6 +265,7 @@ void writeCustomMetricTimeseriesValue() throws IOException {
timeSeriesRequest.setTimeSeries(Lists.<TimeSeries>newArrayList(timeSeries));
monitoringService.projects().timeSeries().create(projectResource, timeSeriesRequest).execute();
}
// [END write_timeseries]

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