@pydantic/logfire-cf-workers 1.0.0 → 2.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.
- package/README.md +28 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -52,6 +52,34 @@ export const Counter = instrumentDO(CounterDurableObject, {
|
|
|
52
52
|
})
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
Request and response headers are not captured as span attributes by default. To
|
|
56
|
+
record specific headers, use the Cloudflare OpenTelemetry config fields exposed
|
|
57
|
+
through this package's existing `fetch` and `handlers` options:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
export default instrumentWorker(handler, {
|
|
61
|
+
service: {
|
|
62
|
+
name: 'my-worker',
|
|
63
|
+
},
|
|
64
|
+
fetch: {
|
|
65
|
+
captureHeaders: {
|
|
66
|
+
request: ['x-request-id'],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
handlers: {
|
|
70
|
+
fetch: {
|
|
71
|
+
captureHeaders: {
|
|
72
|
+
request: ['x-request-id'],
|
|
73
|
+
response: ['cache-control'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
})
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Logfire scrubbing still helps redact sensitive attributes before export, but it
|
|
81
|
+
is a backstop. Prefer explicit header capture over capturing every header.
|
|
82
|
+
|
|
55
83
|
## Runtime lifecycle
|
|
56
84
|
|
|
57
85
|
Cloudflare Workers do not have a process-style shutdown hook. Logfire relies on
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"stats",
|
|
27
27
|
"monitoring"
|
|
28
28
|
],
|
|
29
|
-
"version": "
|
|
29
|
+
"version": "2.0.1",
|
|
30
30
|
"type": "module",
|
|
31
31
|
"main": "./dist/index.js",
|
|
32
32
|
"module": "./dist/index.js",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@pydantic/otel-cf-workers": "
|
|
42
|
-
"logfire": "0.
|
|
41
|
+
"@pydantic/otel-cf-workers": "2.0.0",
|
|
42
|
+
"logfire": "0.21.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@cloudflare/workers-types": "4.20260528.1",
|