authz-service now publishes through pg/v2's transactional outbox, and nothing measured it: NewEventsourcedMetrics ignored the pg.Outbox* metrics. Without them a failing or abandoned publish (a lost privilege revocation for running authz_clients) can't be alerted on.
otelsetup now imports codeberg.org/eventsourced/pg/v2 v2.1.1 (go directive becomes 1.26.0; grpc patch bump via MVS). All current consumers already depend on pg/v2; a release raises their minimum to v2.1.1.
Tests
go test -race ./... green; the contract test records both new metrics.
Review
Go Backend expert reviewed: no Critical/High. Noted: the test checks instrument names only, not attributes; the pg/v2 dependency is worth a line in the release notes.
## Why
authz-service now publishes through pg/v2's transactional outbox, and nothing measured it: `NewEventsourcedMetrics` ignored the `pg.Outbox*` metrics. Without them a failing or abandoned publish (a lost privilege revocation for running authz_clients) can't be alerted on.
## What
- `pg.OutboxPublish` → histogram `eventsourced.outbox.publish.duration` (`event.type`, `success`)
- `pg.OutboxRetry` → counter `eventsourced.outbox.retries` (`event.type`, `permanent`)
- `pg.OutboxBatch` / `pg.OutboxCleanup` stay ignored.
otelsetup now imports `codeberg.org/eventsourced/pg/v2` v2.1.1 (`go` directive becomes 1.26.0; grpc patch bump via MVS). All current consumers already depend on pg/v2; a release raises their minimum to v2.1.1.
## Tests
`go test -race ./...` green; the contract test records both new metrics.
## Review
Go Backend expert reviewed: no Critical/High. Noted: the test checks instrument names only, not attributes; the pg/v2 dependency is worth a line in the release notes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_013DJouG8ZZZxKtodF9kDvzj
NewEventsourcedMetrics now handles pg.OutboxPublish (eventsourced.outbox.publish.duration, by event.type and success) and pg.OutboxRetry (eventsourced.outbox.retries, by event.type and permanent), so a service using the pg/v2 outbox can alert on failing or abandoned publishes. OutboxBatch and OutboxCleanup stay ignored.
otelsetup now imports codeberg.org/eventsourced/pg/v2 (v2.1.1). Every current consumer already depends on it; a release raises their minimum to v2.1.1.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013DJouG8ZZZxKtodF9kDvzj
argoyle
scheduled this pull request to auto merge when all checks succeed 2026-09-17 11:50:53 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
authz-service now publishes through pg/v2's transactional outbox, and nothing measured it:
NewEventsourcedMetricsignored thepg.Outbox*metrics. Without them a failing or abandoned publish (a lost privilege revocation for running authz_clients) can't be alerted on.What
pg.OutboxPublish→ histogrameventsourced.outbox.publish.duration(event.type,success)pg.OutboxRetry→ countereventsourced.outbox.retries(event.type,permanent)pg.OutboxBatch/pg.OutboxCleanupstay ignored.otelsetup now imports
codeberg.org/eventsourced/pg/v2v2.1.1 (godirective becomes 1.26.0; grpc patch bump via MVS). All current consumers already depend on pg/v2; a release raises their minimum to v2.1.1.Tests
go test -race ./...green; the contract test records both new metrics.Review
Go Backend expert reviewed: no Critical/High. Noted: the test checks instrument names only, not attributes; the pg/v2 dependency is worth a line in the release notes.
🤖 Generated with Claude Code
https://claude.ai/code/session_013DJouG8ZZZxKtodF9kDvzj
Coverage Report
Total coverage: 22%