autotel-effect 4.1.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -170,6 +170,19 @@ HTTP GET /api/todos (autotel node:http)
170
170
 
171
171
  Without `withAutotel`, `todo.list` is the root of a second, unrelated trace.
172
172
 
173
+ ### Failures: put the detail in `message`
174
+
175
+ When a span fails, `@effect/opentelemetry` records `exception.message` and the
176
+ span status message from `error.message`. `Data.TaggedError` sets that from a
177
+ `message` prop. The `Error` constructor writes `message` as an own property,
178
+ which shadows a getter on the class, so `new NotFound({ reason: "..." })`
179
+ reaches your backend with an empty message ("Unknown error" in
180
+ autotel-devtools). Name the prop `message`:
181
+
182
+ ```ts
183
+ class NotFound extends Data.TaggedError('NotFound')<{ message: string }> {}
184
+ ```
185
+
173
186
  ## Example
174
187
 
175
188
  See [`apps/example-effect`](../../apps/example-effect) in the autotel monorepo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotel-effect",
3
- "version": "4.1.0",
3
+ "version": "5.0.1",
4
4
  "description": "Bridge autotel and Effect v4: Effect.withSpan spans export through autotel's global TracerProvider",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "@opentelemetry/api-logs": "^0.222.0",
56
56
  "@opentelemetry/sdk-logs": "^0.222.0",
57
57
  "@types/node": "^26.1.2",
58
- "autotel": "7.6.2",
58
+ "autotel": "7.7.1",
59
59
  "effect": "4.0.0-rc.112",
60
60
  "rimraf": "^6.1.3",
61
61
  "tsdown": "^0.22.14",