- Install dependencies with
asdf
usingasdf install
- Decrypt secrets with
make decrypt.dev
. It will decrypt two files:- Dev secrets -
.dev.env
- Google JWT key -
.gcloud.json
- Dev secrets -
- Start dev dependencies:
docker compose up -d db stripe-mock
- Run
make setup
for dependencies, migrations, and seed data. - Start server with
make start
- Sign in as a user
- Create a source
- Update
.dev.env
, search for theLOGFLARE_LOGGER_BACKEND_API_KEY
andLOGFLARE_LOGGER_BACKEND_SOURCE_ID
and update them accordingly - Set user API key can be retrieved from dashboard or from database
users
table, source id is from the source page - In
iex
console, test that everything works:
iex> LogflareLogger.info("testing log message")
Run the local database with docker-compose up -d db
.
To run the full docker setup, run docker-compose up -d
. This will load the GCP
JWT and the .docker.env
. Ensure that both files exist.
To build images only, use docker-compose build
To run the dev env in Supabase mode, adjust the .docker.env
config:
LOGFLARE_SINGLE_TENANT=true LOGFLARE_SUPABASE_MODE=true
This will tell Logflare to perform data seeding and disable UI auth.
Thereafter, run mix start.docker
to run the dev server with docker config.
This is useful for testing supabase mode and single tenant mode.
In order to test all changes locally, perform the following steps:
- Build logflare docker image locally:
docker-compose build
- the compose file tags the image locally.
- CLI repo: run the CLI locally
go run . start
- prefix all CLI commands with
go run .
- run
go run . init
to create a local Supabase project
- prefix all CLI commands with
- Update the test Supabase project's config under
supabase/config.toml
- Logflare uses the
analytics
namespace.
- Logflare uses the
Logflare's VERSION
file is bumped on each release.
The master
branch reflects what is on production on https://logflare.app
The staging
branch reflects what is on the staging environment.
Version bumping policy is as follows:
- Patch: For any changes that do not affect external API. UI changes, refactoring, docs, etc. Is the default.
- Minor: Non-breaking external API changes, changes in config, major changes to core features.
- Major: External API breaking changes, major code changes.
Use the :error_string
metadata key when logging, which is for additional
information that we want to log but don't necessarily want searchable or parsed
for schema updating.
For example, do Logger.error("Some error", error_string: inspect(params))