INNER CODE UNIT · Python

hello

aws-samples/aws-workshop-for-kubernetes · 03-path-application-development/306-app-tracing-with-jaeger-and-x-ray/x-ray/python-flask-app/app.py:31

def hello():
    return 'Hello Flask!'

@app.route("/hostname")
def return_hostname():
    return "This is an example wsgi app served from {} to {}".format(socket.gethostname(), request.remote_addr)

@app.route("/env")
def env():
  return  os.environ['AWS_XRAY_DAEMON_ADDRESS']


@app.route('/fib/<int:number>')
def index(number=1):
    result = fib(number)
    return "Python Fib("+ str(number) + "): " + str(result)

@xray_recorder.capture('Fibonnaci')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…