Skip to content

Commit 3b9c98e

Browse files
Google APIscopybara-github
authored andcommitted
feat: add CreateServiceTimeSeries RPC
PiperOrigin-RevId: 401594069
1 parent 14a959f commit 3b9c98e

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

google/monitoring/v3/metric_service.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ service MetricService {
107107
}
108108

109109
// Creates a new metric descriptor.
110+
// The creation is executed asynchronously and callers may check the returned
111+
// operation to track its progress.
110112
// User-created metric descriptors define
111113
// [custom metrics](https://cloud.google.com/monitoring/custom-metrics).
112114
rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) {
@@ -152,6 +154,23 @@ service MetricService {
152154
};
153155
option (google.api.method_signature) = "name,time_series";
154156
}
157+
158+
// Creates or adds data to one or more service time series. A service time
159+
// series is a time series for a metric from a Google Cloud service. The
160+
// response is empty if all time series in the request were written. If any
161+
// time series could not be written, a corresponding failure message is
162+
// included in the error response. This endpoint rejects writes to
163+
// user-defined metrics.
164+
// This method is only for use by Google Cloud services. Use
165+
// [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
166+
// instead.
167+
rpc CreateServiceTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) {
168+
option (google.api.http) = {
169+
post: "/v3/{name=projects/*}/timeSeries:createService"
170+
body: "*"
171+
};
172+
option (google.api.method_signature) = "name,time_series";
173+
}
155174
}
156175

157176
// The `ListMonitoredResourceDescriptors` request.

google/monitoring/v3/monitoring.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ backend:
3535
deadline: 180.0
3636
- selector: 'google.monitoring.v3.MetricService.*'
3737
deadline: 30.0
38+
- selector: google.monitoring.v3.MetricService.CreateServiceTimeSeries
39+
deadline: 12.0
3840
- selector: google.monitoring.v3.MetricService.CreateTimeSeries
3941
deadline: 12.0
4042
- selector: google.monitoring.v3.MetricService.ListTimeSeries
@@ -103,6 +105,12 @@ authentication:
103105
https://www.googleapis.com/auth/cloud-platform,
104106
https://www.googleapis.com/auth/monitoring,
105107
https://www.googleapis.com/auth/monitoring.write
108+
- selector: google.monitoring.v3.MetricService.CreateServiceTimeSeries
109+
oauth:
110+
canonical_scopes: |-
111+
https://www.googleapis.com/auth/cloud-platform,
112+
https://www.googleapis.com/auth/monitoring,
113+
https://www.googleapis.com/auth/monitoring.write
106114
- selector: google.monitoring.v3.MetricService.CreateTimeSeries
107115
oauth:
108116
canonical_scopes: |-

google/monitoring/v3/service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ syntax = "proto3";
1616

1717
package google.monitoring.v3;
1818

19+
import "google/api/field_behavior.proto";
1920
import "google/api/resource.proto";
2021
import "google/protobuf/duration.proto";
2122
import "google/protobuf/timestamp.proto";

0 commit comments

Comments
 (0)