prescottprue / profiler-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Profiler Service

Profiler service for Firebase Real Time Database. Runs in App Engine and sends output to Stackdriver and Cloud Storage

Run Locally

  1. Generate a service account which has Google Cloud Storage access and save as serviceAccount.json

  2. Create an .env.local file with the following values:

    PROFILING_PROJECT="<- name of the project you want to profile ->"
    FIREBASE_TOKEN="<- CI token from firebase login:ci ->"
    GCLOUD_BUCKET="<- name of bucket to upload results to ->"
  3. Run yarn dev

Deploy

Before Starting: Make sure you have the gcloud command line tool installed

  1. Set up gcloud cli to project: gcloud config set project my-project

  2. Generate a service account which has Google Cloud Storage access and save as serviceAccount.json

  3. Create env_variables.yaml which looks like so:

    env_variables:
      PROFILING_PROJECT: '<- name of the project you want to profile ->'
      FIREBASE_TOKEN: '<- CI token from firebase login:ci ->'
      # Defaults to ${project_id}.appspot.com with id loaded from serviceAccount.json
      GCLOUD_BUCKET: '<- name of the project you want to profile ->'

    NOTE: Account which is used to generate FIREBASE_TOKEN must have access to profiling project

  4. Deploy using gcloud app deploy

About


Languages

Language:TypeScript 89.2%Language:JavaScript 10.8%