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 an API to manipulate observers at runtime #9062

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

bwoebi
Copy link
Member

@bwoebi bwoebi commented Jul 20, 2022

This covers the use case of being able to dynamically trace and untrace functions. E.g. functions, which shall only be observed in a specific context.

It is not a very flexible API (it essentially does a lookup for the old observer (which needs to be specified), then removes it, nor does it allow adding multiple observers at once, unless your extension registers multiple observer init handlers), but it should be good enough for basic use cases.

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
Copy link
Member

@krakjoe krakjoe left a comment

Choose a reason for hiding this comment

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

This looks like a good start, pretty simple to understand (and so debug).

While there may be more complex use cases requiring a more complex API, they are probably best implemented by the owner of the those cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants