Skip to content

Never get surprised by a logging bill again. Centralized structured logging for Cloudflare, Vercel, Elixir and Javascript.

License

Notifications You must be signed in to change notification settings

badeyeye1/logflare

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logflare

About

Stream logs to a central service and tail them in your browser. Logflare is different because you can bring your own backend. Simply provide your BigQuery credentials and we stream logs into your BigQuery table while automatically managing the schema.

Sign up at https://logflare.app.

Logflare Example Gif

For Cloudflare

Automatically log structured request/response data in a few clicks with the Cloudflare app.

Install Logflare with Cloudflare

For Vercel

Setup the Logflare Vercel integration and we'll automatically structure your Vercel logs.

For Javascript

Use our Pino transport to log structured data and exceptions straight from your Javascript project.

For Elixir

Use our Logger backend to send your Elixir exceptions and structured logs to Logflare.

Learn more

Source available

We are leaving this repo public as an example of a larger Elixir project. We hope to have an open source edition of Logflare at some point in the future.

Closed Source Usage

Logflare is using a SQL parser from sqlparser.com. To set this up on your dev machine:

Developer

Env Setup

  1. Install dependencies with asdf using asdf install
  2. Copy over secrets to two locations
    1. Dev secrets - configs/dev.secret.exs
    2. Google JWT key - config/secrets/logflare-dev-238720-63d50e3c9cc8.json
  3. Start database docker-compose up -d
  4. Run mix setup for deps, migrations, and seed data.
  5. Restart your postgres server for replication settings to take effect docker-compose restart
  6. Run (cd assets; yarn) from project root, to install js dependencies
  7. Install sqlparser by following the steps in Closed Source Usage section.
  8. Start servermix start
  9. Sign in as a user
  10. Create a source
  11. Update dev.secrets.exs, search for the :logflare_logger_backend config and update the user api key and source id
  12. Set user api key can be retrieved from dashboard or from database users table, source id is from the source page
  13. In iex console, test that everything works:
iex> LogflareLogger.info("testing log message")

Using Docker

  1. Build images with docker compose build
  2. Run with docker compose up -d

Logging

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) )

About

Never get surprised by a logging bill again. Centralized structured logging for Cloudflare, Vercel, Elixir and Javascript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 75.3%
  • HTML 15.2%
  • SCSS 6.8%
  • JavaScript 2.2%
  • Shell 0.2%
  • Dockerfile 0.2%
  • Rust 0.1%