Skip to main content

Setting Up Metlo Locally

Requirements

  1. node version 18.7.0. We recommend using nvm to manage node versions.
  2. postgres version 14.
  3. redis

Initial Setup

Bash

Set up environment

Create .env file in backend directory with the following environment variables:
To generate the ENCRYPTION_KEY run this python script:
Python

Start Services

Finally, you can start each service in a different terminal window: 1. Start the frontend
Bash
2. Start the backend
Bash
3. Start the collector service
Bash
4. Start the job scheduler
Bash
5. Start the analyzer
Bash
Job Scheduler and AnalyzerFor changes in the backend to take effect in the Job Scheduler and Analyzer, the backend module must be rebuilt and the Job Scheduler and Analyzer must be restarted.
You should now be able to view the metlo frontend at http://localhost:3000 !

Load test data

Without any trace data your Metlo dashboard won’t be very interesting! You can load test trace data by running the test ingestor:
Bash

Migrations

To add any changes to the database schema, you must create a migration. To create a new migration, run this command in the root of the backend directory:
Bash
Running this command will add a new file to the migrations directory to which you will need to add queries to run for the migration. Afterwards, you will need to add the new migration class to the migrations array in the AppDataSource constructor options in the backend/src/data-source.ts file. To run any new migrations, you can run this command:
Bash