Created
December 11, 2018 19:09
-
-
Save tmclaugh/07f8668194609c8aebb22463098df0c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from thundra.thundra_agent import Thundra | |
from thundra.plugins.trace.traceable import Traceable | |
THUNDRA_API_KEY = os.environ.get('THUNDRA_API_KEY', '') | |
thundra = Thundra(api_key=THUNDRA_API_KEY) | |
@Traceable(trace_args=True, trace_return_value=True) | |
def _action_a(): | |
time.sleep(1) | |
print('action A') | |
@Traceable(trace_args=True, trace_return_value=True) | |
def _action_b(): | |
time.sleep(2) | |
print('action B') | |
@Traceable(trace_args=True, trace_return_value=True) | |
def _action_c(): | |
time.sleep(30) | |
print('action C') | |
@thundra | |
def handler(event, context): | |
_action_a() | |
_action_b() | |
_action_c() | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment