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

Baggage span processor - key predicate #2166

Closed
MikeGoldsmith opened this issue Apr 29, 2024 · 1 comment · Fixed by #2212
Closed

Baggage span processor - key predicate #2166

MikeGoldsmith opened this issue Apr 29, 2024 · 1 comment · Fixed by #2212

Comments

@MikeGoldsmith
Copy link
Member

Enhancement idea to the Baggage Span Processor to allow configuration of a user-provided key predicate function used to determine whether a baggage entry should be added to newly started spans.

          I think this behavior can be considered not safe for some organizations.

Wondering if you considered as an alternative adding a config option that can filter out attributes for collection. Perhaps some function that receives an attribute name and return if it should be recorder or not?

export interface BaggageSpanProcessorConfig {
  attributeRecording(baggaeAttributeName: string): boolean;
}

and then users can opt-in to collect only attributes they know are safe, or specifically feed a function that returns true to record everything?

This can shift the responsibility of what is being collected to the user, allowing safe flexibility in collection without introducing breaking changes in the future.

Originally posted by @blumamir in #2114 (comment)

@blumamir
Copy link
Member

Adding here the comment from the PR, that changing the default behaviour for baggage key collection in the future to a "safe one" will probably be a breaking change for this component.

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 a pull request may close this issue.

2 participants