Skip to content

Label Koa requests by route - #19

Merged
thelastbackspace merged 1 commit into
mainfrom
feat/koa-routes
Nov 6, 2026
Merged

thelastbackspace merged 1 commit into
mainfrom
feat/koa-routes

Conversation

@thelastbackspace

Copy link
Copy Markdown
Owner

Koa with @koa/router / koa-router: requests are labelled by the matched route (GET /api/users/:id) instead of the URL.

  • labelKoaRoutes(Koa) patches Application.prototype.createContext to link each raw request to its context; the server instrumentation reads ctx._matchedRoute (where both routers put the matched path, prefixes included) at the end of the request
  • auto-detected when the app depends on koa
  • tested against real Koa 3 + @koa/router 12 (devDependency; 12 supports the Node 18 CI job, 15 needs Node 20)

@thelastbackspace
thelastbackspace merged commit 70e3450 into main Nov 6, 2026
14 checks passed
@thelastbackspace
thelastbackspace deleted the feat/koa-routes branch November 6, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant