Skip to content

Commit 97458dc

Browse files
committed
Update tracing docs with correct :pids option
1 parent 40b3fb9 commit 97458dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: docs/guides/usage/tracing.livemd

+4-4
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ For example, we can only trace calls in our current process, and not worry about
277277
IO.puts("I am: #{inspect(self())}")
278278

279279
# Configure the tracing engine to only monitor our `self()`
280-
Matcha.Trace.module(Integer, limit: 1_000, pid: self())
280+
Matcha.Trace.module(Integer, limit: 1_000, pids: [self()])
281281

282282
do_integer_things = fn ->
283283
IO.puts("The process now executing some Integer calls is: #{inspect(self())}")
@@ -307,7 +307,7 @@ For example, we might want to only trace `:existing` processes, and ensure that
307307
IO.puts("I am: #{inspect(self())}")
308308

309309
# Configure the tracing engine to only monitor `:existing` processes
310-
Matcha.Trace.module(Integer, limit: 1_000, pid: :existing)
310+
Matcha.Trace.module(Integer, limit: 1_000, pids: :existing)
311311

312312
do_integer_things = fn ->
313313
IO.puts("The process now executing some Integer calls is: #{inspect(self())}")
@@ -328,7 +328,7 @@ Alteratively, we could only trace `:new` processes for the opposite effect: only
328328
IO.puts("I am: #{inspect(self())}")
329329

330330
# Configure the tracing engine to only monitor `:new` processes
331-
Matcha.Trace.module(Integer, limit: 1_000, pid: :new)
331+
Matcha.Trace.module(Integer, limit: 1_000, pids: :new)
332332

333333
do_integer_things = fn ->
334334
IO.puts("The process now executing some Integer calls is: #{inspect(self())}")
@@ -343,4 +343,4 @@ do_integer_things.()
343343
IO.puts("A newly spawned process is: #{inspect(spawn(do_integer_things))}")
344344
```
345345

346-
You can also specify the process group `pid: :all`; however, this is the default behaviour so is not very useful in practice.
346+
You can also specify the process group `pids: :all`; however, this is the default behaviour so is not very useful in practice.

0 commit comments

Comments
 (0)