Skip to content

Commit 3f549f1

Browse files
committed
chore: add changeset
1 parent f4722b3 commit 3f549f1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.changeset/wicked-turkeys-shine.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'bentocache': minor
3+
---
4+
5+
Add experimental support for Node.js Diagnostic Channels (TracingChannel) for cache operations instrumentation.
6+
7+
This enables APM tools and OpenTelemetry to trace cache operations with timing information:
8+
9+
```ts
10+
import { tracingChannels } from 'bentocache'
11+
12+
tracingChannels.cacheOperation.start.subscribe((message) => {
13+
console.log(`Starting ${message.operation} on ${message.key}`)
14+
})
15+
16+
tracingChannels.cacheOperation.asyncEnd.subscribe((message) => {
17+
console.log(`Completed with hit=${message.hit}, tier=${message.tier}`)
18+
})
19+
```
20+
21+
Traced operations: `get`, `set`, `delete`, `deleteMany`, `clear`, `expire`, and `getOrSet` (as get + set on miss).

0 commit comments

Comments
 (0)