Commit 8c8445cb authored by Nane Kratzke's avatar Nane Kratzke
Browse files

redirect span

parent 9b9380cf
...@@ -17,7 +17,8 @@ apm = ElasticAPM(app, ...@@ -17,7 +17,8 @@ apm = ElasticAPM(app,
@app.route('/') @app.route('/')
def index(): def index():
return redirect('/hip') with elasticapm.capture_span("redirect"):
return redirect('/hip')
@app.route('/hip') @app.route('/hip')
def hip(): def hip():
...@@ -25,7 +26,6 @@ def hip(): ...@@ -25,7 +26,6 @@ def hip():
r = "" r = ""
url = f"http://{ service }-{ tier + 1 }/hip" url = f"http://{ service }-{ tier + 1 }/hip"
try: try:
#with elasticapm.capture_span(f"{ service }-{ tier + 1 }"):
r = requests.get(url).content r = requests.get(url).content
except Exception as ex: except Exception as ex:
logging.error(f"Fetching { url } failed ({ ex })") logging.error(f"Fetching { url } failed ({ ex })")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment