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

Add OpenFeature integration #3648

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

cmanallen
Copy link
Member

@cmanallen cmanallen commented Oct 11, 2024

Adds OpenFeature integration and extends the Scope with a flags property.

As flags are evaluated by an application they are stored within the Sentry SDK (lru cache). When an error occurs we fetch the flags stored in the SDK and serialize them on the event.

Some open questions:

  • How do I seed the buffer's capacity from the SDKs (or Integrations) init arguments? Right now its hard-coded at 100. The buffer is stored on the scope so its hard to know which integration should be used.

Copy link

codecov bot commented Oct 11, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
14257 1 14256 4336
View the top 1 failed tests by shortest run time
tests.test_utils test_get_current_thread_meta_failed_to_get_main_thread
Stack Traces | 0.061s run time
tests/test_utils.py:916: in test_get_current_thread_meta_failed_to_get_main_thread
    thread.join()
.../hostedtoolcache/Python/3.6.15........./x64/lib/python3.6/threading.py:1052: in join
    if self is current_thread():
.../hostedtoolcache/Python/3.6.15........./x64/lib/python3.6/unittest/mock.py:939: in __call__
    return _mock_self._mock_call(*args, **kwargs)
.../hostedtoolcache/Python/3.6.15........./x64/lib/python3.6/unittest/mock.py:1001: in _mock_call
    result = next(effect)
E   StopIteration

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@cmanallen cmanallen marked this pull request as ready for review October 21, 2024 14:37
sentry_sdk/scope.py Outdated Show resolved Hide resolved

@staticmethod
def setup_once():
# type: () -> None
Copy link
Member

@aliu39 aliu39 Oct 21, 2024

Choose a reason for hiding this comment

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

Why are we using 2 type hints here? First hint is for setup_once

@cmanallen cmanallen requested a review from a team October 22, 2024 13:32
Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

Will have a proper look soon -- just two comments regarding tox for now

tox.ini Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
cmanallen and others added 3 commits October 22, 2024 08:56
Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>
Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>
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.

6 participants