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: Implement transaction context #312

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

askpt
Copy link
Member

@askpt askpt commented Nov 11, 2024

Transaction Context

This pull request introduces transaction context propagation to the OpenFeature library. The changes include adding a new interface for transaction context propagation, implementing a no-op and an AsyncLocal-based propagator, and updating the API to support these propagators.

Related Issues

Fixes #243

Notes

Transaction Context Propagation:

API Enhancements:

@askpt askpt linked an issue Nov 11, 2024 that may be closed by this pull request
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.67%. Comparing base (e14ab39) to head (64f5c68).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
+ Coverage   85.30%   85.67%   +0.36%     
==========================================
  Files          36       38       +2     
  Lines        1477     1515      +38     
  Branches      150      153       +3     
==========================================
+ Hits         1260     1298      +38     
  Misses        187      187              
  Partials       30       30              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lukas-reining lukas-reining left a comment

Choose a reason for hiding this comment

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

Nice start! Left some thoughts and references to how we are doing it in the other languages.

src/OpenFeature/Model/TransactionContext.cs Outdated Show resolved Hide resolved
src/OpenFeature/Model/ContextBuilder.cs Outdated Show resolved Hide resolved
src/OpenFeature/Api.cs Outdated Show resolved Hide resolved
src/OpenFeature/Api.cs Outdated Show resolved Hide resolved
@askpt
Copy link
Member Author

askpt commented Nov 26, 2024

Nice start! Left some thoughts and references to how we are doing it in the other languages.

Thanks for the review @lukas-reining. I based the implementation on the JS client. I'll look into more detail on the Java version instead.

@askpt askpt force-pushed the askpt/243-feature-implement-transaction-context branch from 35b90bf to 9158a92 Compare December 4, 2024 17:05
@askpt askpt closed this Dec 10, 2024
@askpt askpt force-pushed the askpt/243-feature-implement-transaction-context branch from a0a7f36 to c471c06 Compare December 10, 2024 08:34
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
@askpt askpt reopened this Dec 10, 2024
askpt added 16 commits December 12, 2024 08:18
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
@askpt askpt requested a review from lukas-reining December 20, 2024 08:52
@askpt askpt marked this pull request as ready for review December 20, 2024 08:52
@askpt askpt requested a review from a team as a code owner December 20, 2024 08:52
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.

[FEATURE] Implement transaction context
2 participants