Skip to content
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

feat: use app.GetHandlerName replace of reflect value #49

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

loveyana
Copy link
Contributor

@loveyana loveyana commented Feb 1, 2024

What type of PR is this?

feat

What this PR does / why we need it (English/Chinese):

hertz支持使用 SetHandlerName解决使用匿名函数注册路由时 handlerName为func1的问题,但是telemetry在构建span获取handler名称的时候 使用 反射获取方法名的方式,导致handlerName始终为func1影响trace注入。

使用hertz提供的app.GetHandlerName 替换HandleName(),解决无法获取到handlerName的问题。

Which issue(s) this PR fixes:

tracing/utils.go Outdated Show resolved Hide resolved
@li-jin-gou li-jin-gou merged commit a4af131 into hertz-contrib:main Feb 2, 2024
11 checks passed
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.

4 participants