feat(observability): add product metrics for API, outbox and delivery

This commit is contained in:
shira committed 2026-10-06 19:48:15 +03:00
1 parent 560724e2aa
commit 94488e2b57
51 files changed
+3655 -68

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
package testutil
import (
"slices"
"testing"
)
func TestFindPersonalIdentifiers(t *testing.T) {
text := `a{route="/x",user="Jane.Doe+tag@mail.example.org"} 1` + "\n" +
`b{id="0199b4f2-7c1e-7d3a-9f00-AABBCCDDEEFF"} 1` + "\n" +
`c{route="/api/v1/me/invitations/{invitationId}",status="404"} 1`
got := FindPersonalIdentifiers(text)
want := []string{"Jane.Doe+tag@mail.example.org", "0199b4f2-7c1e-7d3a-9f00-AABBCCDDEEFF"}
if !slices.Equal(got, want) {
t.Fatalf("FindPersonalIdentifiers() = %q, want %q", got, want)
}
if found := FindPersonalIdentifiers(`go_info{version="go1.26.8"} 1`); len(found) != 0 {
t.Fatalf("FindPersonalIdentifiers() reported %q in a clean text", found)
}
}