Skip to content

Instantly share code, notes, and snippets.

@abitrolly
Last active November 17, 2020 16:57
Show Gist options
  • Save abitrolly/1e1e06f98133d0ff4c575ea454139049 to your computer and use it in GitHub Desktop.
Save abitrolly/1e1e06f98133d0ff4c575ea454139049 to your computer and use it in GitHub Desktop.
Tracing Flask app with Zipkin

I need to trace Flask request what is hanging. I try to use OpenTracing and friends.

  • Zipkin

server

podman run -d -p 127.0.0.1:9411:9411 openzipkin/zipkin

clients

from flask_zipkin import Zipkin
from app import app

zipkin = Zipkin(app)
app.config['ZIPKIN_DSN'] = "http://127.0.0.1:9411/api/v1/spans"

Doesn't log much though. Request start and stop.


All other Zipkin/OpenTracing instrumentation for Flask also logged only request start/end timespans without auto tracing any interesting events in between (such as subpocess calls). The next step is to looks into OpenTelemetry (merged OpenTracing and OpenCensus) and Flask / Python / geven auto-instrumentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment