Commit fcc4d3db authored by Nane Kratzke's avatar Nane Kratzke
Browse files

operation name

parent 893b71ee
...@@ -34,8 +34,9 @@ def hip(): ...@@ -34,8 +34,9 @@ def hip():
try: try:
parent_span = tracer.get_span(request) if "X-B3-Traceid" in request.headers else tracer.get_span() parent_span = tracer.get_span(request) if "X-B3-Traceid" in request.headers else tracer.get_span()
print(f"{parent_span}") print(f"{parent_span}")
with opentracing.tracer.start_span(f"{service}-{tier + 1}", child_of=parent_span) as span: url = f"http://{service}-{tier + 1}/hip"
url = f"http://{service}-{tier + 1}" with opentracing.tracer.start_span(operation_name=url, child_of=parent_span) as span:
print(f"{span}")
span.set_tag("http.url", url) span.set_tag("http.url", url)
r = requests.get(url) r = requests.get(url)
span.set_tag("http.status_code", r.status_code) span.set_tag("http.status_code", r.status_code)
......
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