# Tracee - Trace function calls in concurrent Elixir processes

**URL:** <https://forum.elixirforum.com/t/tracee-trace-function-calls-in-concurrent-elixir-processes/63300>\
**Category:** Announcing\
**Tags:** library, processes, tracing, assertions\
**Created:** [May 3, 2024, 12:10pm UTC](https://forum.elixirforum.com/t/tracee-trace-function-calls-in-concurrent-elixir-processes/63300 "2024-05-03T12:10:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ream88](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ream88/32/8667_2.png) [@ream88](https://forum.elixirforum.com/u/ream88)\
**Post date:** [May 3, 2024, 12:10pm UTC](https://forum.elixirforum.com/t/tracee-trace-function-calls-in-concurrent-elixir-processes/63300/1 "2024-05-03T12:10:17Z")

</div>

Hey, super proud to announce **Tracee** , a library that allows to trace and assert expected function calls within concurrent Elixir processes. I had a very particular problem that is explained in [this forum post](https://forum.elixirforum.com/t/tracing-and-asserting-function-calls/63035), and after like 6 rewrites tests are green and I’m happy with the API 😊

Hex.pm: [tracee | Hex](https://hex.pm/packages/tracee)  
Source Code: [GitHub - tagbase-io/tracee: Trace function calls in concurrent Elixir processes. · GitHub](https://github.com/tagbase-io/tracee)  
Documentation: [Tracee v0.2.0 — Documentation](https://hexdocs.pm/tracee)

See this example how do use it:

```elixir
defmodule ModuleTest do
  use ExUnit.Case

  import Tracee

  setup :verify_on_exit!

  describe "fun/0" do
    test "calls expensive function only once" do
      expect(AnotherModule, :expensive_fun, 1)

      assert Module.fun()
    end

    test "calls expensive function only once from another process" do
      expect(AnotherModule, :expensive_fun, 1)

      assert fn -> Module.fun() end
             |> Task.async()
             |> Task.await()
    end
  end
end

```
