API Monitoring

You can monitor usage of the Earth Engine API by Cloud Project from the Cloud Console. Specifically, the metrics page shows basic metrics including traffic (number of requests), errors and latency (per API method, response code or credentials). The quotas page shows the amount of stored assets in bytes and the number of read requests for the assets. The credentials page shows which credentials (for example service accounts) have been used to access the API.

Consumption Monitoring (Beta)

In addition to the standard API metrics described above, Earth Engine consumption metrics (Beta) are available to track your project's use of Earth Engine resources.

Find the metrics in the Cloud Console by going to Monitoring > Metrics Explorer from the left side navigation menu. Click SELECT A METRIC and choose one of the Earth Engine metrics to add it to the chart. Note that you may need to adjust the time range and aggregation method to observe data for your project.

Earth Engine metrics are split into compute usage metrics (as EECU-seconds) and storage metrics. You can get more insights on your compute usage by further breaking down into types as described in the following table.

Metric Description Available Type
Used EECU-seconds An EECU is an Earth Engine Compute Unit, which is a measure of processing power. The total amount of compute work performed by a task/request is expressed in EECU-seconds. compute_type: The type of computation. One of [online, batch, highvolume].
client_type: This is an optional label that represents the API client type used for the request. In many cases, the client type is not set. When it is set, common values are ee-js/latest or ee-py/0.1.xxx
Used Bytes The number of bytes of asset storage used for a given project. N/A

Workload Tags

Workload tags are labels for monitoring specific computations within Earth Engine. Use setDefaultWorkloadTag to bind all computations in the script to a default workload tag unless one is explicitly set with ee.data.setWorkloadTag, in which case the default is overridden. These methods set the workload_tag label to specific computations and export tasks. You can then monitor and track individual computations in the Cloud Console. Workload tags can be viewed in the Cloud Console by going to Monitoring > Metrics Explorer, for Resource & Metric select EARTH ENGINE CLOUD PROJECT - USED EECUS, then group by workload_tag. Learn more about creating and managing labels in Cloud Monitoring on this page.

For example, to monitor the EECUs used for an image computation and/or and export:

Code Editor (JavaScript)

// Cloud masking function.
function maskL8sr(image) {
  var qaMask = image.select('QA_PIXEL').bitwiseAnd(parseInt('11111', 2)).eq(0);
  var saturationMask = image.select('QA_RADSAT').eq(0);

  // Apply the scaling factors to the appropriate bands.
  var opticalBands = image.select('SR_B.').multiply(0.0000275).add(-0.2);
  var thermalBands = image.select('ST_B.*').multiply(0.00341802).add(149.0);

  // Replace the original bands with the scaled ones and apply the masks.
  return image.addBands(opticalBands, null, true)
      .addBands(thermalBands, null, true)

// Set a default workload tag.
var collection = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
                     .filterDate('2020-01-01', '2021-01-01')
var composite = collection.select('SR_B.').median();

// Set a new workload tag.
ee.data.resetWorkloadTag(); // Reset to landsat-compositing

ee.data.resetWorkloadTag(true); // Reset back to empty

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

import ee
import geemap.core as geemap

Colab (Python)

# Authenticate, then initialize with your Cloud Project.

# Set a default workload tag.
composite = (
    .filterDate('2020-01-01', '2021-01-01')

# Set a workload tag for export.

# Alternatively, use a workload tag with with.
with ee.data.workloadTagContext('export-jobs'):

In this example, all computations are annotated via the landsat-compositing tag (set as default), and the export gets its own workload tag since ee.data.setWorkloadTag is called before running it. Use ee.data.resetWorkloadTag to set back to the default tag or to set the default tag back to an empty string.

Learn more about monitoring using the Cloud Console from these guides.