--- title: Service Control description: Adapter that delivers logs and metrics to Google Service Control location: https://istio.io/docs/reference/config/policy-and-telemetry/adapters/servicecontrol.html layout: protoc-gen-docs generator: protoc-gen-docs aliases: - /docs/reference/config/adapters/servicecontrol.html number_of_entries: 4 ---

The `servicecontrol` adapter delivers logs and metrics to Google Service Control.

This adapter supports the servicecontrolreport template, the quota template, and the apikey template.

## GcpServiceSetting

Adapter setting for a managed GCP service.

Field | Type | Description
--- | --- | ---
`meshServiceName` | `string` | Local service name on the mesh, which matches destination.service attribute.
`googleServiceName` | `string` | Fully qualified GCP service name.
`quotas` | `Quota[]` | Quota configs

## Params

Configuration format for the `servicecontrol` adapter.

Sample adapter config:

    apiVersion: "config.istio.io/v1alpha2"
    kind: servicecontrol
    metadata:
      name: testhandler
      namespace: istio-system
    spec:
      runtime_config:
        check_cache_size: 200
        check_result_expiration: 60s
      credential_path: "/path/to/token.json"
      service_configs:
        - mesh_service_name: "echo.local.svc"
          google_service_name: "echo.endpoints.cloud.goog"
          quotas:
            - name: ratelimit.quota.istio-system
              google_quota_metric_name: read-requests
              expiration: 1m

Field | Type | Description
--- | --- | ---
`runtimeConfig` | `RuntimeConfig` |
`credentialPath` | `string` | A path to JSON token file, usually mounted as Kubernetes secret on pod.
`serviceConfigs` | `GcpServiceSetting[]` |

## Quota

Field | Type | Description
--- | --- | ---
`name` | `string` | Istio quota name.
`googleQuotaMetricName` | `string` | The corresponding Google quota metric name.
`expiration` | `google.protobuf.Duration` | Quota token expiration time period.

## RuntimeConfig

Adapter runtime config paramters.

Field | Type | Description
--- | --- | ---
`checkCacheSize` | `int32` |
`checkResultExpiration` | `google.protobuf.Duration` |