fix(review): rename ev: log keys to event: for Loki/Sentry visibility - #4037
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4037 +/- ##
=======================================
Coverage 93.58% 93.58%
=======================================
Files 382 382
Lines 35532 35532
Branches 13028 13028
=======================================
Hits 33251 33251
Misses 1618 1618
Partials 663 663
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-07 12:54:33 UTC
🛑 Suggested Action - Manual Review
Nits — 1 non-blocking
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
The structured-logging convention expects an "event:" key so log lines are
queryable in Loki and forwarded correctly by the Sentry forwarder. ~60 sites
across src/review, src/services, src/db, and src/queue used the shorthand
"ev:" instead, making them invisible to both. A handful of sites already had
a distinct "event:" key in the same object literal; those got a semantically
specific name ("errorType:", "auditEventType:") instead of a colliding rename.
bc6a495 to
5fde4de
Compare
Summary
Closes #4001.
event:key so log lines are queryable in Loki and forwarded correctly by the Sentry forwarder.src/review,src/services,src/db, andsrc/queueused the shorthandev:instead, making them invisible to both.event:key in the same object literal; those got a semantically specific name (errorType:,auditEventType:) instead of a colliding rename — except sites whereevent:andev:both already coexisted deliberately (e.g.src/review/rag.ts's error logs, which keep a distinctev:sub-code alongside the pre-existingevent:classification for log continuity), which were left untouched.Test plan
npm run typecheck— cleannpx vitest run test/unit/queue.test.ts— 671/671 passednpx vitest runacross all 17 touched files' corresponding test files — 475/475 passedev:log-key sites that needed renaming