Skip to content

add set filtering function#1318

Draft
ibolmo wants to merge 3 commits intomainfrom
ibolmo/bra-3632-prune-langchain-traces-including-zero-duration-spans
Draft

add set filtering function#1318
ibolmo wants to merge 3 commits intomainfrom
ibolmo/bra-3632-prune-langchain-traces-including-zero-duration-spans

Conversation

@ibolmo
Copy link
Collaborator

@ibolmo ibolmo commented Jan 29, 2026

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

a general purpose to help customers decide if and when a span will go out. doesn't make any opinions about root/child, etc.
@ibolmo ibolmo self-assigned this Jan 29, 2026
this.maskingFunction = maskingFunction;
}

setFilteringFunction(
Copy link
Contributor

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?

Copy link
Collaborator Author

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

@ibolmo ibolmo marked this pull request as draft January 30, 2026 22:22
* root
* parent
* child
* descendant <-- orphan (span_parents still points to filtered "sibling")
Copy link
Collaborator Author

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)

Copy link
Collaborator Author

@ibolmo ibolmo Jan 31, 2026

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

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.

2 participants