-
Notifications
You must be signed in to change notification settings - Fork 429
Allow log_metrics to be used as a context manager for testing subset functions #1227
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
hey @offbyone thanks a lot for raising this to us :) I have a few questions
Let's assume we go with a new context manager (need a new name), would you be open to contribute it after our pause? If we do hear from more customers that they're blocked, or we complete our E2E/Integ tests earlier, we can revisit this before end of July. Look forward to hearing from you Thanks!! |
Hey everyone! |
|
Use case
I am attempting to write a unit test for a piece of functionality that isn't in the top of the lambda function call stack, but is emitting metrics. Moreover, the functionality is an async coroutine, so it's not amenable to being wrapped directly with the
@metrics.log_metrics()
decorator.What I want is to be able to do this:
Solution/User Experience
Provide a context manager facade for the log_metrics decorator; either by factoring out the contents of that method into a context manager directly, or by implementing it in a different way.
Alternative solutions
Acknowledgment
The text was updated successfully, but these errors were encountered: