Google Cloud Operations

(Formerly Stackdriver)


Google Stackdriver is a monitoring service that collects logs, metrics, and traces across your applications and Google Cloud.

Integrating Lytics with Google Stackdriver allows you to export a variety of Lytics metrics to Google Stackdriver monitoring services so that you can easily set up dashboards, alerts, and thresholds inside your existing monitoring tool.


If you haven't already done so, you will need to set up a Google Cloud Project before you begin the process described below. You will need "Editor" rights to your project to be able to ingest Lytics custome metrics.

If you are new to creating authorizations in Lytics, see the Authorizations documentation for more information.

  1. Select Google Cloud from the list of providers.
  2. Select the Stackdriver Metrics Service Account JWT method for authorization.
  3. Enter a Label to identify your authorization.
  4. (Optional) Enter a Description for further context on your authorization.
  5. In JSON Service Account JSON, enter your Google Service Account JSON Key. The instructions for collecting this JSON token are detailed beflow.
  6. Click Save Authorization.

Stackdriver Metrics Service Account JSON Key

During the configuration process for authorizations of type JSON key you will need to create a service account.

  1. In Google Cloud console under IAM & Admin select Service Accounts.
  2. Click + Create Service Account
  3. Enter the details for your new service account and click Create.
    Google stackdriver service account details
  4. From the Role dropdown menu, search for and select Monitoring Editor and click Continue to grant these account permissions.
    Google Stackdriver grant service account access to project
  5. Optionally grant users access to this service account.
  6. You will be directed back to the main Service Accounts page and you should now see your newly created service account.
  7. Select this service account, click Keys tab, click Add Key, and select Create new key from the dropdown menu.
    Google stackdriver create new key
  8. Select JSON for key type and click Create to download your new key as a JSON file.
    Google stackdriver create
  9. The entire contents of this file represent your Google Service Account JSON key and will be used to authorize Google Stackdriver in Lytics.

Google stackdriver auth

Export Metrics

Export Lytics custom metrics to an existing Google Cloud project. These metrics include a monitoring heartbeat, an API heartbeat, collection count, and stream count. These metrics allow you to monitor, alert, and visualize important metrics from Lytics. Instead of building alerting into Lytics, Google Stackdriver Export Metrics allows metrics to be written into your own monitoring tool. These metrics can be used to:

  • Allow alerting, oncall distribution lists, quiet-hours to be managed within a tool where you are already doing that for other metrics.
  • Allow correlation of metrics you have (possibly website performance, etc) to be shown in context of other metrics.
  • Prevent operational users from having to create a Lytics admin user-account.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration
  • Frequency: Metrics are written every 60 seconds.
  • Resulting Data: Lytics custom metrics (monitoring heartbeat, API heartbeat, collection count, and stream count)

This integration utilizes the Google Cloud Monitoring Custom Metrics API to create and send Lytics custom metrics to your Google Stackdriver dashboards.

  • Monitoring Heartbeat is a heartbeat of health of our metrics reporter
  • API Heartbeat is a heartbeat of health of Lytics API
  • Collection Count is a delta count of all events
  • Stream Count is a delta count of all events per stream per hour. Stream Count is reported hourly.


Follow these steps to set up an export job for Google Stackdriver. If you are new to creating jobs in Lytics, see the Destinations documentation for more information.

  1. Select Google Cloud from the list of providers.
  2. Select the Export Monitoring Metrics job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Enter the Google Project you want to write metrics to.
    Google stackdriver workflow config
  7. Click Start Export.
    Note: After the job has started, you will be able to find Lytics custom metrics in Google Cloud Monitoring. This may take up to 10 minutes. Once Monitoring Heartbeat metric is reported, then Lytics custom metrics are being received.

Stackdriver metrics explorer

Using the Metrics

Once you have the metrics imported, you can now set up dashboards and alerting.