feat: add trace room support#25
Conversation
Test & Lint Summary
Tests: passed: all, failed: 0, skipped: 0 |
noa-lucent
left a comment
There was a problem hiding this comment.
Adds trace room support with canonicalization + subscribe authorization wired through a trace→org index, plus good unit coverage around invalid/canonical rooms and auth behavior.
One minor note left inline about documenting the organization_id payload field (implicit contract) and considering bounding the trace index if trace IDs are high-cardinality.
(Static review only; I did not run tests locally.)
| if payload == nil { | ||
| return uuid.UUID{}, false | ||
| } | ||
| field := payload.GetFields()["organization_id"] |
There was a problem hiding this comment.
[minor] organizationIDFromPayload hard-codes the payload field name organization_id. Consider extracting this to a named const (and ideally a short comment/doc) since it’s now part of the implicit contract for trace-room auth/mapping.
Also worth double-checking expected trace cardinality: TraceOrgIndex is an unbounded map keyed by trace IDs, so if traces are high-volume this could grow without bound.
Summary
Testing
Related: agynio/architecture#142
#142