Skip to content

refactor(index): name anonymous functions#202

Merged
Fdawgs merged 3 commits intomainfrom
refactor/anon-funcs
Nov 29, 2025
Merged

refactor(index): name anonymous functions#202
Fdawgs merged 3 commits intomainfrom
refactor/anon-funcs

Conversation

@Fdawgs
Copy link
Member

@Fdawgs Fdawgs commented Nov 29, 2025

Helps with debugging.

See fastify/otel#110

Before:

image

After:

image

Checklist

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors anonymous functions to named functions to improve debugging experience by making function names visible in stack traces. This addresses issue #110 in the fastify/otel repository.

Key Changes:

  • Anonymous functions in decorateRequest and decorateReply are now named using computed property names
  • Comments added to explain the naming technique used for better debuggability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@Fdawgs Fdawgs merged commit 745c800 into main Nov 29, 2025
17 checks passed
@Fdawgs Fdawgs deleted the refactor/anon-funcs branch November 29, 2025 11:04
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.

3 participants