Skip to content

Commit

Permalink
feat: add CreateServiceTimeSeries RPC
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 401594069
  • Loading branch information
Google APIs authored and copybara-github committed Oct 7, 2021
1 parent 14a959f commit 3b9c98e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions google/monitoring/v3/metric_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ service MetricService {
}

// Creates a new metric descriptor.
// The creation is executed asynchronously and callers may check the returned
// operation to track its progress.
// User-created metric descriptors define
// [custom metrics](https://cloud.google.com/monitoring/custom-metrics).
rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) {
Expand Down Expand Up @@ -152,6 +154,23 @@ service MetricService {
};
option (google.api.method_signature) = "name,time_series";
}

// Creates or adds data to one or more service time series. A service time
// series is a time series for a metric from a Google Cloud service. The
// response is empty if all time series in the request were written. If any
// time series could not be written, a corresponding failure message is
// included in the error response. This endpoint rejects writes to
// user-defined metrics.
// This method is only for use by Google Cloud services. Use
// [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
// instead.
rpc CreateServiceTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v3/{name=projects/*}/timeSeries:createService"
body: "*"
};
option (google.api.method_signature) = "name,time_series";
}
}

// The `ListMonitoredResourceDescriptors` request.
Expand Down
8 changes: 8 additions & 0 deletions google/monitoring/v3/monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ backend:
deadline: 180.0
- selector: 'google.monitoring.v3.MetricService.*'
deadline: 30.0
- selector: google.monitoring.v3.MetricService.CreateServiceTimeSeries
deadline: 12.0
- selector: google.monitoring.v3.MetricService.CreateTimeSeries
deadline: 12.0
- selector: google.monitoring.v3.MetricService.ListTimeSeries
Expand Down Expand Up @@ -103,6 +105,12 @@ authentication:
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring,
https://www.googleapis.com/auth/monitoring.write
- selector: google.monitoring.v3.MetricService.CreateServiceTimeSeries
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring,
https://www.googleapis.com/auth/monitoring.write
- selector: google.monitoring.v3.MetricService.CreateTimeSeries
oauth:
canonical_scopes: |-
Expand Down
1 change: 1 addition & 0 deletions google/monitoring/v3/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ syntax = "proto3";

package google.monitoring.v3;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
Expand Down

0 comments on commit 3b9c98e

Please sign in to comment.