Skip to content

Instantly share code, notes, and snippets.

@tmclaugh
Created December 11, 2018 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmclaugh/07f8668194609c8aebb22463098df0c9 to your computer and use it in GitHub Desktop.
Save tmclaugh/07f8668194609c8aebb22463098df0c9 to your computer and use it in GitHub Desktop.
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