Join us online for the "Hey Google" Smart Home Summit on July 8th! Register here to learn what's new, and what's coming up for Google Smart Home.

Monitoring and logging

This document describes how to monitor usage of your smart home Actions and how to access event logs. You can access these features from your Google Cloud Project to debug issues you may encounter.

Monitoring

You can get helpful usage metrics about your Smart home Actions through Cloud Monitoring. You can create dashboards, set up alerts, and access metrics data programmatically.

Supported metrics

Cloud Monitoring monitors the assistant_action_project resource type, and provides the following metrics:

Metric Kind Description
smarthome_action/request_count DELTA Count of intent requests, labeled with execution_type, status, and trait.

execution_type (String): Smart home intent type.

status (String): Result of the request.

trait (String): Smart home device trait. Events without an associated trait include the label UnknownTrait.
smarthome_action/request_latencies CUMULATIVE, DISTRIBUTION Distribution of latencies for intent requests, labeled with execution_type, status, and trait.

execution_type (String): Smart home intent type.

status (String): Result of the request.

trait (String): Smart home device trait. Events without an associated trait include the label UnknownTrait.
smarthome_action/num_active_user GAUGE Daily active users, labeled with trait.

trait (String): Smart home device trait. Events without an associated trait include the label UnknownTrait.

Access metrics

To access Cloud Monitoring for your project:

  1. In the Cloud Platform Console, go to the Projects page.

    Go to the Projects Page

  2. Select your smart home project.

  3. Under Operations, select Monitoring > Metrics explorer.

Smart home dashboard

Smart home projects have access to the SmartHome Analytics dashboard, which is pre-populated with the following charts to surface metrics for cloud and local fulfillment usage:

Metric Cloud Local Overall
Total Request Count
Request Success Percentage
Execution Breakdown
Query Breakdown
95th Percentile Latency
Daily Active Users
Mean Request Latency

To access the smart home dashboard for your project:

  1. In the Actions console, go to the Projects page.

    Open the Actions console

  2. Select your smart home project.

  3. Choose the Analytics tab, and click Go to Google Cloud Platform.

To learn more about using Cloud Monitoring in your project, see the following documentation:

  • Pricing: Details on free allotments and overage costs.
  • Quotas and limits: Details on limits and retention policies for monitoring usage.
  • Logs-based metrics: Building additional metrics from Cloud Logging entries.

Logging

You can access event logs for your smart home Actions via Cloud Logging. You can view them in the Cloud console, or export them to other applications via Google Cloud Pub/Sub.

Cloud Logging provides the following resource types:

Resource Type Display Name Description Labels
assistant_action_project Google Assistant Action Project A container for the Google Cloud Project associated with an Assistant Action.
  • project_id: The identifier of the Actions project associated with this resource, such as "my-project".

Smart home events

Your Actions console project supports the following events in Cloud Logging:

Cloud Logging Resource Event
Google Assistant Action Project SYNC intent errors
QUERY intent errors
EXECUTE intent errors
Account linking errors
Local Home SDK HandlerError

Sync payload

The table below lists the schema of a syncLog entry:

Property Description
requestId Smart home intent request ID.
httpLatencyMsec Elapsed time before a response was received.
status Indicates the status of the intent response.

Execution payload

The table below lists the schema of an executionLog entry:

Property Description
requestId Smart home intent request ID.
latencyMsec Elapsed time before a response was received.
executionType Transport used for the request, such as "Cloud" or "Local".
actionType Optional indicator of the user action taken, such as "QUERY" or "EXECUTE". For EXECUTE actions, includes the command issued to fulfillment for supported traits.
trait Optional trait associated with this user action.
deviceTypes List of device types affected by the event.
isSuccess Whether the request received a successful response.
fallbackToCloud Whether the request routed to cloud fulfillment following an error from local fulfillment.
statusType Indicates the status of the intent response, such as "SUCCESS", "PENDING", or "OFFLINE". For "ERROR" responses, this property contains the errorCode provided by the fulfillment.
externalDebugString Optional detailed debugging message associated with this user action.
locale Language code associated with the request.

Access the log

To access Cloud Logging for your project:

  1. In the Cloud Platform console, go to the Projects page.

    Go to the Projects Page

  2. Select your smart home project.

  3. Under Operations, select Logging > Logs Viewer.

Access to logging data is managed through Identity and Access Management (IAM) for users of your Actions project. For more details on roles and permissions for logging data, see Cloud Logging access control.

Log entries are retained for 30 days per the Cloud Logging retention policy, then scheduled for deletion. You can also delete entries on demand by using the Logs Viewer interface.

To learn more about using Cloud Logging in your project, see the following documentation:

  • Pricing: Details on free allotments and overage costs.
  • Quotas and limits: Details on limits and retention policies for logging usage.
  • Advanced logs queries: Guide to using advanced expressions to query and analyze log data.