-
Notifications
You must be signed in to change notification settings - Fork 58
add set filtering function #1318
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
base: main
Are you sure you want to change the base?
add set filtering function #1318
Conversation
a general purpose to help customers decide if and when a span will go out. doesn't make any opinions about root/child, etc.
| this.maskingFunction = maskingFunction; | ||
| } | ||
|
|
||
| setFilteringFunction( |
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.
What happens when someone sets this up multiple times in their project looks like it would just overwrite the function?
In that case would it make more sense to have this as an option during logger initialization?
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.
🤔 maybe. i followed the masking pattern but maybe that one needs a tweak too
| * root | ||
| * parent | ||
| * child | ||
| * descendant <-- orphan (span_parents still points to filtered "sibling") |
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.
i wouldn't be too excited about this. we can document the behavior and for the user to consider just removing the input/output (make the log thin/skeleton)
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.
an idea is to use a tombstone/skeleton log (everything but input, output, expected, etc.).
this would preserve hierarchy and metrics which may be important to understand within a span with many children the total tokens/times consumed within that span
a general purpose to help customers decide if and when a span will go out. doesn't make any opinions about root/child, etc.
pending: I haven't given a lot of thought is what happens with root/child/ancestor. if root goes away, or if child goes away. i'll send more tests