-
Notifications
You must be signed in to change notification settings - Fork 542
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
otelgin: add routeName
argument to SpanNameFormatter
function
#5741
base: main
Are you sure you want to change the base?
Conversation
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.
We had #4280 which didn't get traction, but did the same thing, using *gin.Context
instead of a new argument.
Are there any other information from the gin context we may want to use in span name formatter?
Co-authored-by: Damien Mathieu <42@dmathieu.com>
@dmathieu Currently no other info needed from the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5741 +/- ##
=====================================
Coverage 64.2% 64.2%
=====================================
Files 199 199
Lines 12454 12454
=====================================
Hits 8001 8001
Misses 4219 4219
Partials 234 234
|
Ping @hanyuancheung |
@dmathieu @hanyuancheung Any suggestions for this PR? |
@hanyuancheung Any suggestions? Or any principles to follow? |
For
Gin
framework, the route name can only be get by usingFullPath()
function ingin.Context
, the originalSpanNameFormatter
only has thehttp.Request
argument that can not get the right route name if route parameters used.This PR add
routeName
argument toSpanNameFormatter
function, align withSpanNameFormatter
inotelmux
.