Side finding from the document-store stage check (29 Oct). GET /v1/tenants/{id}/{sub} dispatches eight collections, but spans and access-log lines all said {sub}: in SigNoz a store read (prepared view, banner, original) looked the same as a team list.
The wildcard route itself stays. ServeMux would reject GET /v1/tenants/{id}/members next to GET /v1/tenants/by-slug/{slug} (see the comment in server.go).
Change: the route function used for spans and the access log names a request GET /v1/tenants/{id}/<collection> when the segment is one of the eight known names (tenantSubresources, kept next to the dispatcher). Anything else keeps GET /v1/tenants/{id}/{sub}. The set is fixed, so there's no cardinality growth and no free path text (slugs, typos) in the name.
Tests:
TestSubRoute: known names, an unknown one, deeper paths, an empty segment.
TestTenantSubresourcesMatchDispatcher: every listed name reaches a handler, and an unlisted one gets the dispatcher's 404. So the list and the switch can't drift apart.
Side finding from the document-store stage check (29 Oct). `GET /v1/tenants/{id}/{sub}` dispatches eight collections, but spans and access-log lines all said `{sub}`: in SigNoz a store read (prepared view, banner, original) looked the same as a team list.
The wildcard route itself stays. ServeMux would reject `GET /v1/tenants/{id}/members` next to `GET /v1/tenants/by-slug/{slug}` (see the comment in `server.go`).
**Change:** the route function used for spans and the access log names a request `GET /v1/tenants/{id}/<collection>` when the segment is one of the eight known names (`tenantSubresources`, kept next to the dispatcher). Anything else keeps `GET /v1/tenants/{id}/{sub}`. The set is fixed, so there's no cardinality growth and no free path text (slugs, typos) in the name.
**Tests:**
- `TestSubRoute`: known names, an unknown one, deeper paths, an empty segment.
- `TestTenantSubresourcesMatchDispatcher`: every listed name reaches a handler, and an unlisted one gets the dispatcher's 404. So the list and the switch can't drift apart.
- The full suite passes, including postgres.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
GET /v1/tenants/{id}/{sub} serves eight collections (members, documents,
projects, contracts, managed-services, company-profile, role-dataset,
store), and spans and access-log lines all said '{sub}': SigNoz could
not tell a document-store read from a team list. The route name now
carries the collection when it is one of the eight, and keeps the
wildcard for anything else, so no free path text reaches the name.
The list lives next to the dispatcher; a test keeps the two in step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
sharang
merged commit 9af8b283a2 into main2026-10-30 07:31:48 +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.
Side finding from the document-store stage check (29 Oct).
GET /v1/tenants/{id}/{sub}dispatches eight collections, but spans and access-log lines all said{sub}: in SigNoz a store read (prepared view, banner, original) looked the same as a team list.The wildcard route itself stays. ServeMux would reject
GET /v1/tenants/{id}/membersnext toGET /v1/tenants/by-slug/{slug}(see the comment inserver.go).Change: the route function used for spans and the access log names a request
GET /v1/tenants/{id}/<collection>when the segment is one of the eight known names (tenantSubresources, kept next to the dispatcher). Anything else keepsGET /v1/tenants/{id}/{sub}. The set is fixed, so there's no cardinality growth and no free path text (slugs, typos) in the name.Tests:
TestSubRoute: known names, an unknown one, deeper paths, an empty segment.TestTenantSubresourcesMatchDispatcher: every listed name reaches a handler, and an unlisted one gets the dispatcher's 404. So the list and the switch can't drift apart.🤖 Generated with Claude Code
https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
GET /v1/tenants/{id}/{sub} serves eight collections (members, documents, projects, contracts, managed-services, company-profile, role-dataset, store), and spans and access-log lines all said '{sub}': SigNoz could not tell a document-store read from a team list. The route name now carries the collection when it is one of the eight, and keeps the wildcard for anything else, so no free path text reaches the name. The list lives next to the dispatcher; a test keeps the two in step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4