-
Notifications
You must be signed in to change notification settings - Fork 52
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
Adds SpanFilter as a configuration option #174
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #174 +/- ##
=======================================
+ Coverage 80.0% 80.5% +0.5%
=======================================
Files 13 13
Lines 698 716 +18
=======================================
+ Hits 559 577 +18
Misses 115 115
Partials 24 24
☔ View full report in Codecov by Sentry. |
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.
@fantapop Thank you for raising this PR and for the quality work! 👍🏽
I am still reviewing test cases, and it could take some time.
Some comments might need to be solved.
60c887a
to
e2fce7c
Compare
I pushed some fixup commits. I'll squash those into the one commit before merging. I've left some usage of the term |
Hi, have you had a chance to further vet this PR? |
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.
LGTM! Comments might need to be resolved.
SpanFilter is a custom function that can be passed via configuration to control whether any given span should be included or omitted. Example usage: otelsql.SpanOptions{ // Only create spans if there is already a parent span SpanFilter: func(ctx context.Context, method otelsql.Method, query string, args []driver.NamedValue) bool { span := trace.SpanFromContext(ctx) return span.SpanContext().IsValid() }, }
@fantapop Thanks for your contribution! 👍🏽 |
SpanFilter is a custom function that can be passed via configuration to control whether any given span should be included or omitted. (#169)
Example usage: