Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed.
If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons.
NOTE: the ReportRequest
has the size limit (wire-format byte size) of 1MB.
This method requires the servicemanagement.services.report
permission on the specified service. For more information, see Google Cloud IAM.
HTTP request
POST https://servicecontrol.googleapis.com/v1/services/{serviceName}:report
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
serviceName |
The service name as specified in its service configuration. For example, See google.api.Service for the definition of a service name. Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{
"operations": [
{
object ( |
Fields | |
---|---|
operations[] |
Operations to be reported. Typically the service should report one operation per request. Putting multiple operations into a single request is allowed, but should be used only when multiple operations are natually available at the time of the report. There is no limit on the number of operations in the same ReportRequest, however the ReportRequest size should be no larger than 1MB. See |
serviceConfigId |
Specifies which version of service config should be used to process the request. If unspecified or no matching version can be found, the latest one will be used. |
Response body
If successful, the response body contains data with the following structure:
Response message for the services.report method.
JSON representation | |
---|---|
{
"reportErrors": [
{
object ( |
Fields | |
---|---|
reportErrors[] |
Partial failures, one for each
|
serviceConfigId |
The actual config id used to process the request. |
serviceRolloutId |
The current service rollout id used to process the request. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/servicecontrol
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
ReportError
Represents the processing error of one Operation
in the request.
JSON representation | |
---|---|
{
"operationId": string,
"status": {
object ( |
Fields | |
---|---|
operationId |
The |
status |
Details of the error when processing the |