-
Notifications
You must be signed in to change notification settings - Fork 576
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: Change the Filter parameter from *http.Request to *gin.Context #4444
Conversation
Co-authored-by: Robert Pająk <pellared@hotmail.com>
// be traced. A Filter must return true if the request should be traced. | ||
type Filter func(*http.Request) bool | ||
type Filter func(*gin.Context) bool |
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.
This is a breaking change.
I would rather add type GinFilter func(*gin.Context) bool
and WithGinFilter
and keep the old functionality. Reasons:
- users already happy with existing API would not need to change anything
- some may already have some code designed/reusable for
net/http
I am letting @hanyuancheung (who is the codeowner) whether it is a good idea or not.
@pellared Do you still need those changes done? |
I would prefer them to be done. |
I marked the PR as draft to indicate that there is work in progress. |
Fixes #3070