This page describes logging for callout extensions.
For a product overview, see Service Extensions overview.
Enable logging for extension service calls
You can enable logging for callout extensions by enabling logging on the backend service that's the target of the request while creating the service.
To enable logging for the target backend service for a
regional internal Application Load Balancer, use the
gcloud compute backend-services update command.
gcloud compute backend-services update BACKEND_SERVICE \ --enable-logging \ --logging-sample-rate=RATE \ --region=REGION \ --logging-optional=LOGGING_OPTIONAL_MODE \ --logging-optional-fields=OPTIONAL_FIELDS
Replace the following:
BACKEND_SERVICE: the name of the backend service
RATE: a value from
0.0means no requests are logged and
1.0means 100% of requests are logged. The default value is
1.0. This setting is effective only when used with the
enable-loggingparameter. When you omit
enable-logging, logging is disabled.
REGION: the region of the backend
LOGGING_OPTIONAL_MODE: enables logging for optional fields in one of these modes:
INCLUDE_ALL_OPTIONALincludes all optional fields.
EXCLUDE_ALL_OPTIONAL(default) excludes all optional fields.
CUSTOMincludes a custom list of optional fields.
OPTIONAL_FIELDS: a comma-separated list of optional fields when you select the
For more information, see the Monitor and troubleshoot pages of Application Load Balancer documentation, such as Internal Application Load Balancer logging and monitoring.
After you enable logging on the backend service, each HTTP or HTTPS request is logged by using Cloud Logging.
To view logs, in the Google Cloud console, go to the Logs Explorer page.
What is logged for callout extensions
In general, Application Load Balancer log entries contain information useful for monitoring and debugging your HTTP or HTTPS traffic. Log entries contain the following types of information:
- Information shown in most Google Cloud logs, such as severity, project ID, project number, and timestamp as described in the LogEntry.
- HttpRequest log fields.
Request logs for HTTP and HTTPS load balancers contain a
object in the load balancer log entry JSON payload with the following
||string||Name of the extension resource|
||string||Name of the extension chain within the service extension resource that matches the request|
||string||Name of the extension within the extension chain|
||array||Information about each
||enum||The event type of
||timestamp||The time from when the first byte of the