-
-
Notifications
You must be signed in to change notification settings - Fork 19
refactor: name Fastify hook handlers #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fdawgs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert stylistic changes like whitespace, quotes etc.
Done. Sorry for that |
Quite a lot still there |
fb21ff3 to
a230196
Compare
Rebased on latest upstream/main and force-pushed. Thanks again |
|
Applied suggestion. Thanks |
Summary
This patch gives explicit names to internal Fastify hook callbacks used by the OpenTelemetry instrumentation plugin so spans show meaningful callback names instead of anonymous functions.
What changed
instance.addHookfor:onRoute→onRouteHookonRequest→onRequestHookonResponse→onResponseHookCHANGELOG.mdreferencing this change.Why
Named hook handlers improve span attribution in tracing and align with the repository-wide initiative to avoid anonymous hook handlers (see issue #110). This is a non-behavioral refactor intended to make traces clearer and easier to debug.
Tests
npm testRelated
Notes