Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
edublancas committed Oct 24, 2023
1 parent 53e80fb commit 0497c06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ For more details, see the [API Reference](api/telemetry).

+++

To unit test decorated functions, call the function and check `__wrapped__._telemetry_started` attribute. If it exists, it means the function has been decorated with `@log_call()`, you can use it to verify what's logged:
To unit test decorated functions, call the function and check `__wrapped__._telemetry_success` attribute. If it exists, it means the function has been decorated with `@log_call()`, you can use it to verify what's logged:

```{code-cell} ipython3
@telemetry.log_call(log_args=True, ignore_args=("y",))
Expand All @@ -89,7 +89,7 @@ _ = divide(2, 4)
```{code-cell} ipython3
from unittest.mock import ANY
assert divide.__wrapped__._telemetry_started == {
assert divide.__wrapped__._telemetry_success == {
"action": "ploomber-core-divide-started",
"metadata": {
"argv": ANY,
Expand All @@ -98,7 +98,7 @@ assert divide.__wrapped__._telemetry_started == {
}
```

`__wrapped__._telemetry_started` will keep the latest logged data, so you must call it at least one; otherwise, it'll be `None`.
`__wrapped__._telemetry_success` will keep the latest logged data, so you must call it at least one; otherwise, it'll be `None`.

+++

Expand Down

0 comments on commit 0497c06

Please sign in to comment.