opentelemetry-go-contrib
                                
                                 opentelemetry-go-contrib copied to clipboard
                                
                                    opentelemetry-go-contrib copied to clipboard
                            
                            
                            
                        feat: Add *gin.Context Filter parameter
Issue: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/3070 last PR status: https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4444
This PR seems unfinished (the GinFilter isn't used, the WithGinFilter method accepts a Filter, not a GinFilter and there are no tests).
I'm moving it to draft. Feel free to undraft once you are finished.
@dmathieu Please review the changes, I have added the filter with test.
Did you run those tests? The filter exists, but isn't used anywhere. The code is also showing indentation issues that will fail linting.
Note : I'm not sure this is a good solution. @hanyuancheung, what do you think?
@dmathieu Please refer to https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4444, the solution was recommended here. I'm looking at the Test for "TestWithGinFilter" is currently failing.
@dmathieu, Can you please review? The test with 'make build' seems to be passing.
Since this is changing the public API, I would like @hanyuancheung's opinion as code owner.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 65.5%. Comparing base (
a32ef13) to head (ee1dbbb). Report is 1 commits behind head on main.
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5743   +/-   ##
=====================================
  Coverage   65.5%   65.5%           
=====================================
  Files        203     203           
  Lines      12918   12926    +8     
=====================================
+ Hits        8466    8474    +8     
  Misses      4198    4198           
  Partials     254     254           
| Files | Coverage Δ | |
|---|---|---|
| ...ation/github.com/gin-gonic/gin/otelgin/gintrace.go | 82.1% <100.0%> (+1.0%) | :arrow_up: | 
| ...ntation/github.com/gin-gonic/gin/otelgin/option.go | 100.0% <100.0%> (ø) | 
@dmathieu , Fixed the lint test. Hope this should be all good now.
@dmathieu , Based on the recent commit lint fix it should fix this. Please help run the test thanks
@dmathieu , Did you get chance to review the test please?
@dmathieu, Are we good to make an PR merge? Thanks
No. We need a second review.
@hanyuancheung, Please help approve this PR. Thanks
cc @open-telemetry/go-approvers
@open-telemetry/go-approvers @hanyuancheung Would you please help approve this PR, we need an second reviewer for the PR merge.
Thanks
Since this is changing the public API, I would like @hanyuancheung's opinion as code owner.
This PR's change LGTM!
Thanks @hanyuancheung for the approval. @dmathieu are we good to merge PR ?
@dmathieu, Thank you for all the review and feedback.