depot_tools_metrics/

directory
v0.0.0-...-e560ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause

README

depot_tools monitoring app

This is a simple GAE app to collect the metrics uploaded by depot_tools and store them in BigQuery. This app is only reachable when the X-AppEngine-Trusted-IP-Request header, which is set only on requests received from corp machines, is present on the request. This is a way to ensure we don't collect data from non-Googlers.

API

This app exposes two endpoints:

  • /should-upload

    Returns 200 if the request comes from a corp machine, and 403 otherwise.

  • /upload

    Accepts a JSON file in the format described by monitoring_logs_schema.json and writes the data to the depot_tools table in the metrics dataset of the cit-cli-metrics project.

    Returns:

    • 403 if the request comes from a non-corp machine.
    • 400 if the reported metrics are invalid.
    • 500 if there was an internal error.
    • 200 if the request succeeded.

Deployment

To deploy the app, run:

  • go generate schema/gen.go
  • bqschemaupdater -table cit-cli-metrics.metrics.depot_tools -message-dir schema -message schema.Metrics
  • gae.py upload

Directories

Path Synopsis
Package main stores the reported JSON metrics from depot_tools into a BigQuery table.
Package main stores the reported JSON metrics from depot_tools into a BigQuery table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL