@autter/runtime-next 1.6.1 → 1.8.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 CHANGED
@@ -79,6 +79,14 @@ only inside a `process.env.NEXT_RUNTIME` branch Next removes from edge
79
79
  bundles. Without edge errors to report, `export { onRequestError } from
80
80
  "@autter/runtime-next/instrumentation"` is enough.
81
81
 
82
+ Request counts and latency per route come from the `http.server.duration`
83
+ metric of every request, under Next's route template (`/blog/[slug]`,
84
+ `/api/items/[id]`, `/_not-found` for 404s), since 1.7.0: the SDK reads the
85
+ `next.route` Next puts on its own spans while it serves the request. 1.7.0
86
+ also instruments Next's server from the first request; before, it was
87
+ instrumented only once a later request happened to load `http` again (in
88
+ our test app, the first edge-route request), and its metrics had no route.
89
+
82
90
  On Node the error is recorded on the request span through the
83
91
  `registerAutter` tracker — once, even when `withRuntimeRequest` already
84
92
  reported it (Next's context is then added to that report). Recorded with
@@ -107,7 +115,11 @@ own stack, `next.router_kind` `Pages Router` and `next.route_path` such as
107
115
  `registerAutter` passes options straight to `initAutterServer`, so the
108
116
  server SDK's defaults apply out of the box: exporters are flushed on
109
117
  process exit (`autoFlush`) and custom attributes are scrubbed for PII
110
- before export (`redactAttributes`). See the `@autter/runtime-node` README
118
+ before export (`redactAttributes`). The same goes for `sampleRate` and
119
+ `ignoreErrors` (1.8.0); in the browser, `@autter/runtime-next/client`
120
+ re-exports `withFilters` for `sampleRate`, `ignoreErrors` and `denyUrls`
121
+ (`initAutterBrowser(withFilters({ endpoint, service, sampleRate: 0.5 }))`),
122
+ and the edge options of `autterOnRequestError` take `ignoreErrors`. See the `@autter/runtime-node` README
111
123
  for every option; `makeSafeCapture`, `installAutterAutoFlush`, and
112
124
  `redactAttributes` are also re-exported from this package.
113
125
 
@@ -8,7 +8,7 @@ import {
8
8
  // package.json
9
9
  var package_default = {
10
10
  name: "@autter/runtime-next",
11
- version: "1.6.1",
11
+ version: "1.8.0",
12
12
  description: "One-command Autter Runtime for Next.js: server OTel, request wide events, coded errors, browser tracker, relay route, edge middleware and React error boundary",
13
13
  license: "MIT",
14
14
  type: "module",
@@ -63,9 +63,9 @@ var package_default = {
63
63
  test: "npm run build -w @autter/runtime-core && npm run build -w @autter/runtime-node && npm run build -w @autter/runtime-edge && npm run build -w @autter/runtime-browser && npm run build && node --test test/*.test.mjs"
64
64
  },
65
65
  dependencies: {
66
- "@autter/runtime-browser": "^1.6.0",
67
- "@autter/runtime-edge": "^1.1.0",
68
- "@autter/runtime-node": "^1.6.1"
66
+ "@autter/runtime-browser": "^1.7.0",
67
+ "@autter/runtime-edge": "^1.2.0",
68
+ "@autter/runtime-node": "^1.8.0"
69
69
  },
70
70
  peerDependencies: {
71
71
  react: ">=18"
package/dist/client.cjs CHANGED
@@ -40,6 +40,7 @@ __export(client_exports, {
40
40
  captureMessage: () => import_runtime_browser2.captureMessage,
41
41
  captureOutcome: () => import_runtime_browser2.captureOutcome,
42
42
  clearBreadcrumbs: () => import_breadcrumbs.clearBreadcrumbs,
43
+ createFilter: () => import_filters.createFilter,
43
44
  disableTracePropagation: () => import_tracing.disableTracePropagation,
44
45
  enableBreadcrumbs: () => import_breadcrumbs.enableBreadcrumbs,
45
46
  enableTracePropagation: () => import_tracing.enableTracePropagation,
@@ -47,12 +48,14 @@ __export(client_exports, {
47
48
  initAutterBrowser: () => import_runtime_browser2.initAutterBrowser,
48
49
  setContext: () => import_runtime_browser2.setContext,
49
50
  setUser: () => import_runtime_browser2.setUser,
50
- trackEvent: () => import_runtime_browser2.trackEvent
51
+ trackEvent: () => import_runtime_browser2.trackEvent,
52
+ withFilters: () => import_filters.withFilters
51
53
  });
52
54
  module.exports = __toCommonJS(client_exports);
53
55
  var import_runtime_browser2 = require("@autter/runtime-browser");
54
56
  var import_breadcrumbs = require("@autter/runtime-browser/breadcrumbs");
55
57
  var import_tracing = require("@autter/runtime-browser/tracing");
58
+ var import_filters = require("@autter/runtime-browser/filters");
56
59
 
57
60
  // src/error-boundary.ts
58
61
  var React = __toESM(require("react"), 1);
@@ -90,6 +93,7 @@ var AutterErrorBoundary = class extends React.Component {
90
93
  captureMessage,
91
94
  captureOutcome,
92
95
  clearBreadcrumbs,
96
+ createFilter,
93
97
  disableTracePropagation,
94
98
  enableBreadcrumbs,
95
99
  enableTracePropagation,
@@ -97,5 +101,6 @@ var AutterErrorBoundary = class extends React.Component {
97
101
  initAutterBrowser,
98
102
  setContext,
99
103
  setUser,
100
- trackEvent
104
+ trackEvent,
105
+ withFilters
101
106
  });
package/dist/client.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { AutterSeverity, autterErrorFromResponse, captureException, captureMessage, captureOutcome, flush, initAutterBrowser, setContext, setUser, trackEvent } from '@autter/runtime-browser';
2
2
  export { Breadcrumb, BreadcrumbInput, BreadcrumbOptions, addBreadcrumb, clearBreadcrumbs, enableBreadcrumbs } from '@autter/runtime-browser/breadcrumbs';
3
3
  export { TracePropagationOptions, disableTracePropagation, enableTracePropagation } from '@autter/runtime-browser/tracing';
4
+ export { AutterFilterOptions, FilterPattern, createFilter, withFilters } from '@autter/runtime-browser/filters';
4
5
  import * as React from 'react';
5
6
 
6
7
  /**
package/dist/client.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { AutterSeverity, autterErrorFromResponse, captureException, captureMessage, captureOutcome, flush, initAutterBrowser, setContext, setUser, trackEvent } from '@autter/runtime-browser';
2
2
  export { Breadcrumb, BreadcrumbInput, BreadcrumbOptions, addBreadcrumb, clearBreadcrumbs, enableBreadcrumbs } from '@autter/runtime-browser/breadcrumbs';
3
3
  export { TracePropagationOptions, disableTracePropagation, enableTracePropagation } from '@autter/runtime-browser/tracing';
4
+ export { AutterFilterOptions, FilterPattern, createFilter, withFilters } from '@autter/runtime-browser/filters';
4
5
  import * as React from 'react';
5
6
 
6
7
  /**
package/dist/client.js CHANGED
@@ -24,6 +24,10 @@ import {
24
24
  enableTracePropagation,
25
25
  disableTracePropagation
26
26
  } from "@autter/runtime-browser/tracing";
27
+ import {
28
+ withFilters,
29
+ createFilter
30
+ } from "@autter/runtime-browser/filters";
27
31
 
28
32
  // src/error-boundary.ts
29
33
  import * as React from "react";
@@ -60,6 +64,7 @@ export {
60
64
  captureMessage,
61
65
  captureOutcome,
62
66
  clearBreadcrumbs,
67
+ createFilter,
63
68
  disableTracePropagation,
64
69
  enableBreadcrumbs,
65
70
  enableTracePropagation,
@@ -67,5 +72,6 @@ export {
67
72
  initAutterBrowser,
68
73
  setContext,
69
74
  setUser,
70
- trackEvent
75
+ trackEvent,
76
+ withFilters
71
77
  };
package/dist/index.cjs CHANGED
@@ -73,7 +73,7 @@ var import_runtime_node = require("@autter/runtime-node");
73
73
  // package.json
74
74
  var package_default = {
75
75
  name: "@autter/runtime-next",
76
- version: "1.6.1",
76
+ version: "1.8.0",
77
77
  description: "One-command Autter Runtime for Next.js: server OTel, request wide events, coded errors, browser tracker, relay route, edge middleware and React error boundary",
78
78
  license: "MIT",
79
79
  type: "module",
@@ -128,9 +128,9 @@ var package_default = {
128
128
  test: "npm run build -w @autter/runtime-core && npm run build -w @autter/runtime-node && npm run build -w @autter/runtime-edge && npm run build -w @autter/runtime-browser && npm run build && node --test test/*.test.mjs"
129
129
  },
130
130
  dependencies: {
131
- "@autter/runtime-browser": "^1.6.0",
132
- "@autter/runtime-edge": "^1.1.0",
133
- "@autter/runtime-node": "^1.6.1"
131
+ "@autter/runtime-browser": "^1.7.0",
132
+ "@autter/runtime-edge": "^1.2.0",
133
+ "@autter/runtime-node": "^1.8.0"
134
134
  },
135
135
  peerDependencies: {
136
136
  react: ">=18"
package/dist/index.js CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  withProcessSpan,
44
44
  withRuntimeOperation,
45
45
  withRuntimeRequest
46
- } from "./chunk-HLKKX6FY.js";
46
+ } from "./chunk-FU5HRQKM.js";
47
47
  export {
48
48
  CODE_PATTERN,
49
49
  RuntimeError,
package/dist/server.cjs CHANGED
@@ -71,7 +71,7 @@ var import_runtime_node = require("@autter/runtime-node");
71
71
  // package.json
72
72
  var package_default = {
73
73
  name: "@autter/runtime-next",
74
- version: "1.6.1",
74
+ version: "1.8.0",
75
75
  description: "One-command Autter Runtime for Next.js: server OTel, request wide events, coded errors, browser tracker, relay route, edge middleware and React error boundary",
76
76
  license: "MIT",
77
77
  type: "module",
@@ -126,9 +126,9 @@ var package_default = {
126
126
  test: "npm run build -w @autter/runtime-core && npm run build -w @autter/runtime-node && npm run build -w @autter/runtime-edge && npm run build -w @autter/runtime-browser && npm run build && node --test test/*.test.mjs"
127
127
  },
128
128
  dependencies: {
129
- "@autter/runtime-browser": "^1.6.0",
130
- "@autter/runtime-edge": "^1.1.0",
131
- "@autter/runtime-node": "^1.6.1"
129
+ "@autter/runtime-browser": "^1.7.0",
130
+ "@autter/runtime-edge": "^1.2.0",
131
+ "@autter/runtime-node": "^1.8.0"
132
132
  },
133
133
  peerDependencies: {
134
134
  react: ">=18"
package/dist/server.js CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  withProcessSpan,
44
44
  withRuntimeOperation,
45
45
  withRuntimeRequest
46
- } from "./chunk-HLKKX6FY.js";
46
+ } from "./chunk-FU5HRQKM.js";
47
47
  export {
48
48
  CODE_PATTERN,
49
49
  RuntimeError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autter/runtime-next",
3
- "version": "1.6.1",
3
+ "version": "1.8.0",
4
4
  "description": "One-command Autter Runtime for Next.js: server OTel, request wide events, coded errors, browser tracker, relay route, edge middleware and React error boundary",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -55,9 +55,9 @@
55
55
  "test": "npm run build -w @autter/runtime-core && npm run build -w @autter/runtime-node && npm run build -w @autter/runtime-edge && npm run build -w @autter/runtime-browser && npm run build && node --test test/*.test.mjs"
56
56
  },
57
57
  "dependencies": {
58
- "@autter/runtime-browser": "^1.6.0",
59
- "@autter/runtime-edge": "^1.1.0",
60
- "@autter/runtime-node": "^1.6.1"
58
+ "@autter/runtime-browser": "^1.7.0",
59
+ "@autter/runtime-edge": "^1.2.0",
60
+ "@autter/runtime-node": "^1.8.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": ">=18"