@pydantic/logfire-cf-workers 1.0.0 → 2.0.0

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 +28 -0
  2. package/package.json +2 -2
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": "1.0.0",
29
+ "version": "2.0.0",
30
30
  "type": "module",
31
31
  "main": "./dist/index.js",
32
32
  "module": "./dist/index.js",
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@pydantic/otel-cf-workers": "1.0.0",
41
+ "@pydantic/otel-cf-workers": "2.0.0",
42
42
  "logfire": "0.20.1"
43
43
  },
44
44
  "devDependencies": {