# Tracing out-of-scope function calls

**URL:** <https://discourse.julialang.org/t/tracing-out-of-scope-function-calls/3941>\
**Category:** General Usage\
**Created:** [May 26, 2017, 5:42pm UTC](https://discourse.julialang.org/t/tracing-out-of-scope-function-calls/3941 "2017-05-26T17:42:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamed2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iamed2/32/215082_2.png) [@iamed2](https://discourse.julialang.org/u/iamed2)\
**Post date:** [May 26, 2017, 5:42pm UTC](https://discourse.julialang.org/t/tracing-out-of-scope-function-calls/3941/1 "2017-05-26T17:42:13Z")

</div>

Problem: log every time a generic function `Base.f` is called, anywhere, where at least one of the arguments is of type `T`.

At Invenia we’ve been having a long conversation about how one might do this. See a related issue here: [https://github.com/invenia/Trace.jl/issues/2](https://github.com/invenia/Trace.jl/issues/2)

This can be done simply in specific cases (e.g. Number arithmetic) where there is a promoting fallback function, or where there is not an existing function ambiguous with `f(x...)`, but in other cases I’m not sure this is possible.
