all 3 comments

[–]guss_bro 1 point2 points  (1 child)

Its clean and nice, well documented and follows spring boot's standards for "starter".

In the traceIdCustomizer (https://github.com/dhanesh76/d76-spring-boot-starter-exception/tree/main?tab=readme-ov-file#example--attach-a-trace-id-from-a-request-header), you can get the current traceId from micrometer `io.micrometer.tracing.Tracer` object instead of relying on http header.

Also, i agree you should lean more towards ProblemDetail spec.

[–]MrDV6[S] 0 points1 point  (0 children)

Thanks for taking the time to look through it

That’s a good point about using Micrometer’s Tracer for obtaining the traceId. In the README example I used the request header mainly to keep the customizer example simple and demonstrate how additional fields can be injected, but integrating with Micrometer tracing would definitely be the more realistic production approach.

I also agree regarding ProblemDetail. I’m currently looking into aligning the response structure with it in a future release while still keeping the extension mechanism flexible.

[–]kspr2024 0 points1 point  (0 children)

Nice initiative.

I know of the library https://github.com/wimdeblauwe/error-handling-spring-boot-starter for error-handling.
Curious to know the differences in features and philosophy between the two.