alexmojaki / alexmojaki/birdseye

Feature request: recursively trace calls within traced function

Ouverte
#97 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
1.7k
Forks
73
Métriques de merge des PR
Aucune PR mergée en 30 j

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.