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

Logflare / logflare / 3832ded3c54987551eae90e4e86f3647fe3d4fe4
81%

Build:
DEFAULT BRANCH: main
Ran 15 Jul 2026 09:38PM UTC
Jobs 1
Files 502
Run time 2min
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

15 Jul 2026 09:22PM UTC coverage: 80.895% (+0.1%) from 80.798%
3832ded3c54987551eae90e4e86f3647fe3d4fe4

push

github

web-flow
feat: add Management API endpoint for alerts (Api.AlertController) (#3682)

* feat: add Management API endpoint for alerts (Api.AlertController)

Add CRUD for Logflare.Alerting.AlertQuery at /api/alerts, mirroring the
existing Api.RuleController pattern:

- Alerting.fetch_alert_query_by_user_access/2: token-based, team-scoped
  fetch analogous to Rules.fetch_rule_by/1.
- Alerting.update_alert_query/2 now accepts backends under either the
  :backends or "backends" key, so API callers (string-keyed JSON) and
  LiveView (atom-keyed) both work without mixing key types in one map.
- Api.AlertController: index/show/create/update/delete. update/2 verifies
  ownership of any backend_ids being attached, blocking cross-tenant
  backend repointing.
- /api/alerts routes and AlertApiSchema for OpenAPI docs.

Implements O11Y-2143.

* fix: expose attached backends on alerts (same read-gap bug as elsewhere)

AlertQuery's Jason.Encoder didn't serialize :backends, even though
Api.AlertController.update/2 lets a client attach backends via
backend_ids -- the same writable-but-unreadable-via-API gap found and
fixed across Rule/Source/Endpoint in O11Y-2144, just in code from this
same PR. Add :backends to the encoder's only: list, preload it in every
controller action before serializing (index/show/create/update), and add
a backends property to AlertApiSchema.

* fix: complete alerts Management API contract

39 of 39 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

14083 of 17409 relevant lines covered (80.89%)

12321.89 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
81.18
-1.18% lib/telemetry.ex
Jobs
ID Job ID Ran Files Coverage
1 3832ded3c54987551eae90e4e86f3647fe3d4fe4.1 15 Jul 2026 09:38PM UTC 502
80.89
GitHub Action Run
Source Files on build 3832ded3c54987551eae90e4e86f3647fe3d4fe4
  • Tree
  • List 502
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3832ded3 on github
  • Prev Build on main (#4BA42AEE...)
  • Next Build on main (#7F532E06...)
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