Commit 9b9380cf authored by Nane Kratzke's avatar Nane Kratzke
Browse files

Service naming

parent 9d5d03ce
......@@ -12,7 +12,7 @@ service = os.environ.get('HIPHOP', 'hiphop')
tier = int(os.environ.get('TIER', '1'))
app = Flask(__name__)
apm = ElasticAPM(app,
service_name=f"{ service }", #-{ tier }",
service_name=f"{ service }-{ tier }",
)
@app.route('/')
......@@ -25,8 +25,8 @@ def hip():
r = ""
url = f"http://{ service }-{ tier + 1 }/hip"
try:
with elasticapm.capture_span(f"{ service }-{ tier + 1 }"):
r = requests.get(url).content
#with elasticapm.capture_span(f"{ service }-{ tier + 1 }"):
r = requests.get(url).content
except Exception as ex:
logging.error(f"Fetching { url } failed ({ ex })")
r = "END"
......
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