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

otelgin: Change the Filter parameter from *http.Request to *gin.Context #4444

Closed
wants to merge 12 commits into from
Closed

Conversation

rehanpfmr
Copy link
Contributor

@rehanpfmr rehanpfmr commented Oct 16, 2023

Fixes #3070

@rehanpfmr rehanpfmr requested a review from a team October 16, 2023 10:31
CHANGELOG.md Outdated Show resolved Hide resolved
@pellared pellared changed the title change the Filter parameter from *http.Request to *gin.Context #3070 … otelgin: Change the Filter parameter from *http.Request to *gin.Context Oct 16, 2023
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
Copy link
Member

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:

  1. users already happy with existing API would not need to change anything
  2. 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.

@rehanpfmr
Copy link
Contributor Author

@pellared Do you still need those changes done?

@pellared
Copy link
Member

@pellared Do you still need those changes done?

I would prefer them to be done.

@pellared pellared marked this pull request as draft January 25, 2024 07:21
@pellared
Copy link
Member

I marked the PR as draft to indicate that there is work in progress.

@rehanpfmr rehanpfmr closed this by deleting the head repository May 7, 2024
dmathieu added a commit that referenced this pull request Aug 19, 2024
Issue:
#3070
last PR status:
#4444

---------

Signed-off-by: Rehan Pasha <rehan.pasha@fmr.com>
Signed-off-by: Brian Warner <brian.warner2@fmr.com>
Signed-off-by: rehanpfmr <111350825+rehanpfmr@users.noreply.github.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
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.

change the Filter parameter from *http.Request to *gin.Context
2 participants