clj-otel

steffan 2023-11-23T23:28:34.394759Z

@devurandom Thank you for the Github issue to add route data support for Compojure. I'll take a closer look when I am able, likely in the next week or so.

🚀 1
devurandom 2023-12-05T13:42:49.411789Z

The code has a shortcoming. In Compojure one can nest (compojure/routes ,,, (compojure/routes ,,,)) or (compojure/routes ,,, (compojure/context ,,,)) (I did not yet investigate what exactly is causing the problem), and then compojure/wrap-routes will only see the innermost part of the route. Example:

(compojure/routes
  (compojure/context "/resource/:id" [id :<< as-int]
    (compojure/routes
      (GET "/nested" [] handler))))
With this the traces will only show "GET /nested" instead of "GET /resource/:id/nested". One could probably argue that nesting compojure/routes is not doing as the author intended (is it?), but I thought I should mention it anyway.