• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supavisor / 15590033421
65%

Build:
DEFAULT BRANCH: main
Ran 11 Jun 2025 04:21PM UTC
Jobs 2
Files 54
Run time 106min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Jun 2025 04:10PM UTC coverage: 50.34% (+0.5%) from 49.874%
15590033421

push

github

web-flow
feat: JSON output format for log messages (#653)

Output logs in line JSON format (JSON object per line) in format that is
as similar to the format that is expected by the Logflare as possible.

The idea there is to log to the Vector which will then take care of
logging to file(s) and to dispatch the logs to Logflare.

It provides 3 new ENV variables that we need to set in deployment:
- `SUPAVISOR_LOG_FILE_PATH=<path>` - path to file where we want to store
our logs. These logs are automatically rotated and up to 5 files (each
max 8 MiB, though I think we can make it configurable or larger) are
stored
- `SUPAVISOR_LOG_FORMAT=json` to output logs in Logflare JSON format
- `SUPAVISOR_ACCESS_LOG_FILE_PATH=<path>` - path to access log for
`fail2ban` processing

That is current approach. I also started using `SUPAVISOR_` prefix to
all (new) environment variables that are used to configure Supavisor, to
easily scan for variables that we are defining. Current uses of Logflare
will work as is, that behaviour is not removed, but the Supavisor will
log to stdout (or file if specified) by default now. I wonder whether we
should always log to stdout and log to file in addition to logging to
stdout. That is open and that is almost one line change if needed.

This module
https://github.com/supabase/supavisor/pull/653/files#diff-fcb4c5de2167e1c43638c936caa9684b4
would probably need to be exported to some new Logflare library (cc
@Ziinc), but for simplicity it is currently in Supavisor. I haven't yet
written proper test for it.

I also have added new metadata field for logs in `ClientHandler` -
`state`. It contains the connection state at the time of log. It is
mostly useful for logging access logs (as these are heavily limited)
where I log only events in `exchange` state (as it is where all
connection failures happen). I also set logger metadata much earlier in
the connection setup to be able to see all that info ASAP.

This code also u... (continued)

47 of 75 new or added lines in 4 files covered. (62.67%)

9 existing lines in 2 files now uncovered.

1036 of 2058 relevant lines covered (50.34%)

132.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% lib/supavisor/application.ex
12
64.29
-0.32% lib/supavisor/client_handler.ex
15
59.46
lib/supavisor/logger/logflare_formatter.ex

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% lib/supavisor/application.ex
8
64.29
-0.32% lib/supavisor/client_handler.ex
Jobs
ID Job ID Ran Files Coverage
1 run-tests - 15590033421.1 11 Jun 2025 04:21PM UTC 54
48.45
GitHub Action Run
2 run-integration - 15590033421.2 11 Jun 2025 04:22PM UTC 54
36.44
GitHub Action Run
Source Files on build 15590033421
  • Tree
  • List 54
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15590033421
  • 7487b81e on github
  • Prev Build on main (#15076488009)
  • Next Build on main (#15595391532)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc