Feat: Hatchet Metrics Monitoring, I (#2480)

* feat: queries + task methods for oldest running task and oldest task

* feat: worker slot and sdk metrics

* feat: wal metrics

* repository stub

* feat: add meter provider thingy

* pg queries

* fix: add task

* feat: repo methods for worker metrics

* feat: active workers query, fix where clauses

* fix: aliasing

* fix: sql, cleanup

* chore: cast

* feat: olap queries

* feat: olap queries

* feat: finish wiring up olap status update metrics

* chore: lint

* chore: lint

* fix: dupes, other code review comments

* send metrics to OTel collector

* last autovac

* flag

* logging updates

* address PR comments

---------

Co-authored-by: gabriel ruttner <gabriel.ruttner@gmail.com>
Co-authored-by: Mohammed Nafees <hello@mnafees.me>
This commit is contained in:
matt
2025-12-22 14:34:02 -05:00
committed by GitHub
parent a4e7584c18
commit fdc075ec6f
33 changed files with 2402 additions and 60 deletions

View File

@@ -455,18 +455,6 @@ func (t *MessageQueueImpl) pubMessage(ctx context.Context, q msgqueue.Queue, msg
return nil
}
func getMessageSize(m *msgqueue.Message) int {
payloadSize := getPayloadSize(m.Payloads)
size := payloadSize + len(m.TenantID) + len(m.ID) + 4 // 4 bytes for other fields
for k, v := range m.OtelCarrier {
size += len(k) + len(v)
}
return size
}
// Subscribe subscribes to the msg queue.
func (t *MessageQueueImpl) Subscribe(
q msgqueue.Queue,