Zipkin for profiling the internals of a traditional progamm

560 Views Asked by At

I want to use zipkin to profile the internals of a traditional program.

I use the term "traditional", since AFAIK zipkin is for tracing in a microservice environment where one request gets computed by N sub-requests.

I would like to analyse the performance of my python program.

I would like to trace all python method calls and all linux syscalls which gets done.

How to trace the python method calls and linux syscalls to get the spans into zipkin?

Even if it is not feasible, I am interesting how this could be done. I would like to learn how zipkin works.

1

There are 1 best solutions below

0
On BEST ANSWER

In zipkin lingo, what you are asking about is often called "local spans" or "local tracing", basically an operation that neither originated, nor resulted in a remote call.

I'm not aware of anything at the syscall level, but many tracers support explicit instrumentation of function calls.

For example, using py_zipkin @zipkin_span(service_name='my_service', span_name='some_function') def some_function(a, b): return do_stuff(a, b)

Besides explicit instrumentation like this, one could also export data to zipkin. For example, one could convert trace data that is made in another tool to zipkin's json format.

This probably doesn't answer your question, but I hope it helps.