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

appmap.Recording is available even when APPMAP=false #326

Closed
apotterri opened this issue May 28, 2024 · 0 comments · Fixed by #327
Closed

appmap.Recording is available even when APPMAP=false #326

apotterri opened this issue May 28, 2024 · 0 comments · Fixed by #327
Assignees

Comments

@apotterri
Copy link
Collaborator

apotterri commented May 28, 2024

Code that imports appmap.Recording should run correctly even when not Env.current.enabled.

I think it should be possible to implement this by creating a new context manager class called _appmap.NoopRecording that gets renamed on import to Recording:

if  _enabled:
    ...
else:
    import _appmap.NoopRecording as Recording
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