Skip to content

Commit 58247fd

Browse files
Add note about decorator concerns
1 parent db28ec4 commit 58247fd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/instrumentation-decorators.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ defmodule MyModule do
127127
end
128128
```
129129

130+
### Concerns
131+
132+
Although the decorators provide a quick way to instrument functions for customers, we generally prefer the use of the instrumentation helpers because they're opaque, easier to understand, and easier to debug when something goes wrong.
133+
134+
That said, removing the decorators would require users to instrument their functions separately, as there's no other solution for that yet. One way we could resolve part of this issue is taking ownership of the monkey patching that currently happens in the decorator library and building on that, but there might be other ways too.
135+
130136
### Available Decorators
131137

132138
**1. `@decorate instrument()`**

0 commit comments

Comments
 (0)