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

feat: Add baggage key predicate to baggage span processor #2212

Merged
merged 20 commits into from
May 24, 2024

Conversation

MikeGoldsmith
Copy link
Member

@MikeGoldsmith MikeGoldsmith commented May 16, 2024

Which problem is this PR solving?

Short description of the changes

  • Add baggage key predicate function as constructor parameter to baggage span processor
  • Export ALLOW_ALL_BAGGAGE_KEYS predicate
  • Add unit test to verify behaviour
  • Update README with examples of setting a filter

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.12%. Comparing base (dfb2dff) to head (737628b).
Report is 140 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2212      +/-   ##
==========================================
+ Coverage   90.97%   95.12%   +4.14%     
==========================================
  Files         146       10     -136     
  Lines        7492      697    -6795     
  Branches     1502      143    -1359     
==========================================
- Hits         6816      663    -6153     
+ Misses        676       34     -642     

see 137 files with indirect coverage changes

Copy link
Member

@blumamir blumamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is very much needed. Thank you for working on this.
Added few comments

packages/baggage-span-processor/README.md Outdated Show resolved Hide resolved
packages/baggage-span-processor/README.md Outdated Show resolved Hide resolved
@MikeGoldsmith
Copy link
Member Author

@blumamir I've updated the PR to make the predicate a required parameter, and make some of the suggested changes. Please take a look 👍🏻

@MikeGoldsmith MikeGoldsmith changed the title feat: Add optional predicate func to baggage span processor feat: Add baggage key predicate to baggage span processor May 20, 2024
@MikeGoldsmith MikeGoldsmith changed the title feat: Add baggage key predicate to baggage span processor feat: Add baggage key regex to baggage span processor May 21, 2024
@MikeGoldsmith MikeGoldsmith changed the title feat: Add baggage key regex to baggage span processor feat: Add baggage key predicate to baggage span processor May 21, 2024
Copy link
Member

@blumamir blumamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for addressing my comments, this feature looks great 🥇

Added one last comment on sending a config object in the constructor

@MikeGoldsmith
Copy link
Member Author

Thanks @blumamir !

@JamieDanielson JamieDanielson merged commit 6f98def into open-telemetry:main May 24, 2024
16 checks passed
@JamieDanielson JamieDanielson deleted the mike/baggage-predicate branch May 24, 2024 20:08
@dyladan dyladan mentioned this pull request May 24, 2024
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.

Baggage span processor - key predicate
3 participants