Method: services.report

Stay organized with collections Save and categorize content based on your preferences.

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

string

The service name as specified in its service configuration. For example, "pubsub.googleapis.com".

See google.api.Service for the definition of a service name.

Authorization requires the following IAM permission on the specified resource serviceName:

  • servicemanagement.services.report

Request body

The request body contains data with the following structure:

JSON representation
{
  "operations": [
    {
      object (Operation)
    }
  ],
  "serviceConfigId": string
}
Fields
operations[]

object (Operation)

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 ReportResponse.report_errors for partial failure behavior.

serviceConfigId

string

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 (ReportError)
    }
  ],
  "serviceConfigId": string,
  "serviceRolloutId": string
}
Fields
reportErrors[]

object (ReportError)

Partial failures, one for each Operation in the request that failed processing. There are three possible combinations of the RPC status:

  1. The combination of a successful RPC status and an empty reportErrors list indicates a complete success where all Operations in the request are processed successfully.
  2. The combination of a successful RPC status and a non-empty reportErrors list indicates a partial success where some Operations in the request succeeded. Each Operation that failed processing has a corresponding item in this list.
  3. A failed RPC status indicates a general non-deterministic failure. When this happens, it's impossible to know which of the 'Operations' in the request succeeded or failed.
serviceConfigId

string

The actual config id used to process the request.

serviceRolloutId

string

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 (Status)
  }
}
Fields
operationId

string

The Operation.operation_id value from the request.

status

object (Status)

Details of the error when processing the Operation.