alexmojaki / alexmojaki/birdseye

Feature request: recursively trace calls within traced function

Open
#97 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.7k
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Hi, thanks for birdseye!

I often use it to trace a whole flow, e.g a web request, from endpoint to response.
It's especially useful when the flow is complicated and can't be debugged locally.

It can get cumbersome to `@eye` the first function -> run it -> add an `@eye` -> run it again -> add the next `@eye` -> etc.

It would be great if one could e.g
```python
def bar(): ...

def baz(): ...

@deep_eye
def foo(call_bar: bool):
if call_bar:
return bar()
return baz()
```

Which would be equivalent to simply decorating `foo`, `bar` and `baz` with `@eye`.

To avoid exploding, maybe a `@deep_eye(trace_limit=10)` option could be supported.

I know birdseye can trace whole modules, but more often than not, functions call functions from other modules, so I'm imagining a trace of a call tree that spans different modules.

What are your thoughts?

Thanks,
Gilad

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.