@interfere/next 12.3.1 → 12.4.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.
- package/README.md +17 -14
- package/dist/package.mjs +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -155,34 +155,37 @@ The mode and the hosting platform come only from the surface configuration that
|
|
|
155
155
|
|
|
156
156
|
### Composing with an existing Vercel OTel setup
|
|
157
157
|
|
|
158
|
-
Use the kit instead of calling Interfere's standalone `register()` alongside `registerOTel()
|
|
158
|
+
Use the kit instead of calling Interfere's standalone `register()` alongside `registerOTel()`:
|
|
159
159
|
|
|
160
160
|
```ts
|
|
161
161
|
import { registerOTel } from "@vercel/otel";
|
|
162
162
|
import { buildInterfereOtelKit } from "@interfere/next/instrumentation";
|
|
163
163
|
|
|
164
|
-
export
|
|
165
|
-
const kit = buildInterfereOtelKit({ serverTracing: "drain" });
|
|
164
|
+
export { onRequestError } from "@interfere/next/instrumentation";
|
|
166
165
|
|
|
167
|
-
|
|
166
|
+
export function register() {
|
|
167
|
+
const kit = buildInterfereOtelKit({ serviceName: "my-app" });
|
|
168
168
|
|
|
169
169
|
registerOTel({
|
|
170
170
|
serviceName: "my-app",
|
|
171
|
-
attributes: kit
|
|
172
|
-
idGenerator: kit.idGenerator,
|
|
173
|
-
spanProcessors: ["auto", ...kit
|
|
174
|
-
logRecordProcessors: kit
|
|
175
|
-
propagators: [
|
|
176
|
-
|
|
171
|
+
attributes: { ...kit?.resourceAttributes },
|
|
172
|
+
...(kit && { idGenerator: kit.idGenerator }),
|
|
173
|
+
spanProcessors: ["auto", ...(kit?.spanProcessors ?? [])],
|
|
174
|
+
logRecordProcessors: [...(kit?.logRecordProcessors ?? [])],
|
|
175
|
+
propagators: [
|
|
176
|
+
"auto",
|
|
177
|
+
...(kit ? [kit.traceContextPropagator, ...kit.propagators] : []),
|
|
178
|
+
],
|
|
177
179
|
});
|
|
178
180
|
|
|
179
|
-
kit
|
|
181
|
+
kit?.enableConsoleBridge();
|
|
182
|
+
void kit?.fetchRemoteConfig();
|
|
180
183
|
}
|
|
181
|
-
|
|
182
|
-
export { onRequestError } from "@interfere/next/instrumentation";
|
|
183
184
|
```
|
|
184
185
|
|
|
185
|
-
|
|
186
|
+
The kit returns `null` when `INTERFERE_PUBLIC_KEY` is unset and on the Edge runtime, so the optional chaining keeps `registerOTel()` working in both cases. Keep the propagators in this order: the freshness propagator must run last.
|
|
187
|
+
|
|
188
|
+
The build-injected surface configuration selects the export path; there is no option to set. With a Vercel Trace Drain, the kit leaves out its trace exporter and `"auto"` delivers spans to the drain, so keep `"auto"` in `spanProcessors`. Without a drain, the kit's span processors export to Interfere directly; do not also point the `OTEL_EXPORTER_OTLP_*` variables at Interfere. The host owns flushing and shutdown in composed setups.
|
|
186
189
|
|
|
187
190
|
`@vercel/otel@2.1.3` supports OTel API `>=1.9.0 <2`, stable SDK peers `>=2 <3`, and experimental peers `>=0.200.0 <0.300.0`. The SDK declares all required peers as dependencies, including `sdk-metrics`. Custom compositions must use compatible versions too.
|
|
188
191
|
|
package/dist/package.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var name=`@interfere/next`,version=`12.
|
|
1
|
+
var name=`@interfere/next`,version=`12.4.0`;export{name,version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interfere/next",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.4.0",
|
|
4
4
|
"description": "Build software that never breaks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"error-tracking",
|
|
@@ -92,17 +92,18 @@
|
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"build": "tsdown",
|
|
95
|
+
"lint:oxlint": "cd ../../../.. && GOMAXPROCS=2 oxlint --max-warnings=0 --report-unused-disable-directives-severity=error --no-error-on-unmatched-pattern --threads=2 src/packages/public/next",
|
|
95
96
|
"test": "node ../../private/vitest-config/src/cli.ts run --config ../../../../vitest.config.ts",
|
|
96
97
|
"test:e2e": "playwright test",
|
|
97
98
|
"typecheck": "bun check"
|
|
98
99
|
},
|
|
99
100
|
"dependencies": {
|
|
100
|
-
"@interfere/build": "^0.4.
|
|
101
|
+
"@interfere/build": "^0.4.2",
|
|
101
102
|
"@interfere/constants": "^9.3.0",
|
|
102
103
|
"@interfere/helpers": "^9.3.0",
|
|
103
104
|
"@interfere/javascript": "^0.3.1",
|
|
104
|
-
"@interfere/react": "^12.
|
|
105
|
-
"@interfere/types": "^10.
|
|
105
|
+
"@interfere/react": "^12.4.0",
|
|
106
|
+
"@interfere/types": "^10.6.0",
|
|
106
107
|
"@opentelemetry/api": "1.9.1",
|
|
107
108
|
"@opentelemetry/api-logs": "0.222.0",
|
|
108
109
|
"@opentelemetry/baggage-span-processor": "0.5.0",
|