Skip to content

Commit 94322bf

Browse files
committed
2 parents 309a9c4 + 4318239 commit 94322bf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/integrations/opentelemetry.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,17 @@ function utility() {
221221

222222
This works outside of the handler by retriving current span from `AsyncLocalStorage`
223223

224-
## setAttribute
224+
## setAttributes
225225

226-
`setAttribute` is a utility to set attribute to the current span.
226+
`setAttributes` is a utility to set attributes to the current span.
227227

228228
```typescript
229-
import { setAttribute } from '@elysiajs/opentelemetry'
229+
import { setAttributes } from '@elysiajs/opentelemetry'
230230

231231
function utility() {
232-
setAttribute('custom.attribute', 'value')
232+
span.setAttributes({
233+
'custom.attribute': 'value'
234+
})
233235
}
234236
```
235237

0 commit comments

Comments
 (0)