@adonis-agora/telescope 0.11.0 → 0.13.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/CHANGELOG.md +108 -0
- package/dist/providers/telescope_provider.d.ts.map +1 -1
- package/dist/providers/telescope_provider.js +1 -1
- package/dist/providers/telescope_provider.js.map +1 -1
- package/dist/src/ai/index.d.ts +1 -1
- package/dist/src/ai/index.js +1 -1
- package/dist/src/alerts/exception_source.d.ts.map +1 -1
- package/dist/src/alerts/exception_source.js +2 -4
- package/dist/src/alerts/exception_source.js.map +1 -1
- package/dist/src/alerts/index.d.ts +1 -1
- package/dist/src/alerts/index.js +1 -1
- package/dist/src/client_errors/ingestor.d.ts +20 -0
- package/dist/src/client_errors/ingestor.d.ts.map +1 -1
- package/dist/src/client_errors/ingestor.js +29 -2
- package/dist/src/client_errors/ingestor.js.map +1 -1
- package/dist/src/context_accessor.d.ts +13 -0
- package/dist/src/context_accessor.d.ts.map +1 -1
- package/dist/src/context_accessor.js +20 -0
- package/dist/src/context_accessor.js.map +1 -1
- package/dist/src/define_config.d.ts +10 -1
- package/dist/src/define_config.d.ts.map +1 -1
- package/dist/src/define_config.js +1 -0
- package/dist/src/define_config.js.map +1 -1
- package/dist/src/entry.d.ts +13 -0
- package/dist/src/entry.d.ts.map +1 -1
- package/dist/src/entry.js +15 -0
- package/dist/src/entry.js.map +1 -1
- package/dist/src/index.d.ts +6 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/index.d.ts +1 -1
- package/dist/src/mcp/index.js +1 -1
- package/dist/src/metrics/metrics_service.d.ts +13 -0
- package/dist/src/metrics/metrics_service.d.ts.map +1 -1
- package/dist/src/metrics/metrics_service.js +23 -4
- package/dist/src/metrics/metrics_service.js.map +1 -1
- package/dist/src/metrics/pulse.d.ts +2 -0
- package/dist/src/metrics/pulse.d.ts.map +1 -1
- package/dist/src/metrics/pulse.js +6 -2
- package/dist/src/metrics/pulse.js.map +1 -1
- package/dist/src/metrics/stats.d.ts +14 -0
- package/dist/src/metrics/stats.d.ts.map +1 -1
- package/dist/src/metrics/stats.js +7 -2
- package/dist/src/metrics/stats.js.map +1 -1
- package/dist/src/profiling/index.d.ts +1 -1
- package/dist/src/profiling/index.js +1 -1
- package/dist/src/registry.d.ts +7 -2
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +4 -1
- package/dist/src/registry.js.map +1 -1
- package/dist/src/request_watcher.d.ts +111 -8
- package/dist/src/request_watcher.d.ts.map +1 -1
- package/dist/src/request_watcher.js +113 -17
- package/dist/src/request_watcher.js.map +1 -1
- package/dist/src/telescope_middleware.d.ts.map +1 -1
- package/dist/src/telescope_middleware.js +2 -0
- package/dist/src/telescope_middleware.js.map +1 -1
- package/dist/src/ui/index.d.ts +1 -1
- package/dist/src/ui/index.js +1 -1
- package/dist/src/watchers/index.d.ts +1 -1
- package/dist/src/watchers/index.js +1 -1
- package/dist/stubs/config/telescope.stub +20 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,113 @@
|
|
|
1
1
|
# @adonis-agora/telescope
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#50](https://github.com/DavideCarvalho/adonis-agora-telescope/pull/50) [`56d498d`](https://github.com/DavideCarvalho/adonis-agora-telescope/commit/56d498d0998c51650172985dcdfe00562290aa5d) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Two things the dashboard couldn't tell you about a browser-reported error: **who** it happened
|
|
8
|
+
to, and **where to click** to see it.
|
|
9
|
+
|
|
10
|
+
**`client_exception` is now attributed to the session user.** The ingestor took `user` from the
|
|
11
|
+
request body alone, and no front-end reporter ships the logged-in user by default — so in
|
|
12
|
+
practice every browser error recorded `user: null` and the dashboard's User column sat empty on
|
|
13
|
+
a fully authenticated session. It now reads the `@adonis-agora/context` `userRef()`, resolved
|
|
14
|
+
server-side on that same request (the endpoint sits behind the host's normal middleware stack).
|
|
15
|
+
|
|
16
|
+
The precedence is a trust decision, not a preference: the endpoint is **public**, so anything in
|
|
17
|
+
the body is a claim a caller could forge for someone else's id. The server-derived context wins
|
|
18
|
+
whenever both are present. The body claim is still honoured when the context has nothing — an
|
|
19
|
+
anonymous page, or a host without `@adonis-agora/context` — because a self-reported id beats no
|
|
20
|
+
attribution when there is nothing to contradict it.
|
|
21
|
+
|
|
22
|
+
**Exception groups carry their entry type.** `ExceptionGroupStats` and `PulseExceptionGroup` gain
|
|
23
|
+
a `type` (`exception` or `client_exception`), and the dashboard's Exceptions rows deep-link into
|
|
24
|
+
the entries list filtered by *that row's* type. The link used to hard-code `exception`, so every
|
|
25
|
+
click on a browser error landed on a list that by construction could not contain it — "0 shown"
|
|
26
|
+
on a row that had just reported 26 occurrences.
|
|
27
|
+
|
|
28
|
+
A group spans one type in practice, since grouping is by `familyHash` and a server throw's hash
|
|
29
|
+
never collides with a browser report's; when two entries of different types do share a key, the
|
|
30
|
+
group takes the type of the first seen in the window.
|
|
31
|
+
|
|
32
|
+
- [#48](https://github.com/DavideCarvalho/adonis-agora-telescope/pull/48) [`829f91a`](https://github.com/DavideCarvalho/adonis-agora-telescope/commit/829f91a25e1e92370a0aa69795ad9d2195433ce7) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - New `requestEnrichment` hook: attach what only your app knows to every `request` entry.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
// config/telescope.ts
|
|
36
|
+
requestEnrichment: (ctx) => {
|
|
37
|
+
const screen = ctx.request.header('x-screen')
|
|
38
|
+
return typeof screen === 'string' ? { tags: [`screen:${screen}`] } : undefined
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The motivating case is one the dashboard could not answer: **which requests came from
|
|
43
|
+
which front-end screen?** Telescope sees `GET /api/v1/researcher/projects` and has no idea
|
|
44
|
+
whether the writing page or the dashboard asked for it. The browser knows; it just had no
|
|
45
|
+
way to say so. Now it sends its current page in a header, the host turns that into a
|
|
46
|
+
`screen:<name>` tag, and the existing tag filter does the rest — no new UI, no new query
|
|
47
|
+
API.
|
|
48
|
+
|
|
49
|
+
Three optional fields on the returned object:
|
|
50
|
+
|
|
51
|
+
- **`tags`** — appended to the derived ones. Tags are how the dashboard filters, so this is
|
|
52
|
+
where anything you want to slice by belongs. Capped at 16 tags of 128 characters
|
|
53
|
+
(`MAX_ENRICHMENT_TAGS` / `MAX_ENRICHMENT_TAG_LENGTH`, both exported); blanks and
|
|
54
|
+
non-strings are dropped.
|
|
55
|
+
- **`context`** — free-form fields under `content.context`, for detail you want to read but
|
|
56
|
+
not filter by. Declared before `body` in the content so the recorder's byte budget, which
|
|
57
|
+
drops keys in insertion order, cannot let a captured megabyte-sized body starve out a few
|
|
58
|
+
short context fields.
|
|
59
|
+
- **`user`** — for hosts where neither `ctx.auth.user` nor the `@adonis-agora/context`
|
|
60
|
+
`userRef()` applies. Wins over both; an explicit `options.user` on `recordRequest` still
|
|
61
|
+
wins over it.
|
|
62
|
+
|
|
63
|
+
The hook is **synchronous** on purpose. It runs on the recording path of every request, so
|
|
64
|
+
an `await` here — a DB lookup for the user, say — would put host I/O between the response
|
|
65
|
+
and the next request. Read what is already on the `ctx`.
|
|
66
|
+
|
|
67
|
+
A bad hook cannot cost you the entry: a throw, a `null`, a string, an array, a thousand
|
|
68
|
+
tags, a non-object `context` — every one of them degrades to recording exactly what would
|
|
69
|
+
have been recorded without the hook.
|
|
70
|
+
|
|
71
|
+
Additive: no config change required and behavior is unchanged when `requestEnrichment` is
|
|
72
|
+
unset. Also exports the `RequestEnrichment` / `RequestEnrichmentResult` types.
|
|
73
|
+
|
|
74
|
+
## 0.12.0
|
|
75
|
+
|
|
76
|
+
### Minor Changes
|
|
77
|
+
|
|
78
|
+
- [#46](https://github.com/DavideCarvalho/adonis-agora-telescope/pull/46) [`4fff643`](https://github.com/DavideCarvalho/adonis-agora-telescope/commit/4fff643c921969d9f3459d58d7b4409a139350e2) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Three things the dashboard was quietly getting wrong: response status, user attribution, and
|
|
79
|
+
whether a browser error counts as an error.
|
|
80
|
+
|
|
81
|
+
**Response status was `null` on every AdonisJS request.** The watcher read
|
|
82
|
+
`ctx.response.statusCode`, but an Adonis `Response` has no such property — its status lives
|
|
83
|
+
behind `getStatus()` (the `statusCode` it wraps belongs to the Node `ServerResponse`, one level
|
|
84
|
+
down). So every `request` entry recorded `status: null`, no `status:<code>` tag was ever emitted,
|
|
85
|
+
and the pulse **error rate — computed from the 4xx/5xx breakdown — sat at 0% no matter how many
|
|
86
|
+
requests were failing**. The optional `statusCode?: number` on `ResponseLike` could not catch it:
|
|
87
|
+
any object satisfies it. `ResponseLike` now declares both accessors and the watcher prefers
|
|
88
|
+
`getStatus()`, falling back to `statusCode` for Node/Express-style hosts (and a throwing accessor
|
|
89
|
+
degrades to `null` instead of losing the entry).
|
|
90
|
+
|
|
91
|
+
**User attribution now works with asynchronous auth guards.** `ctx.auth.user` is the
|
|
92
|
+
`@adonisjs/auth` convention: a *synchronous* property. A guard that only resolves through
|
|
93
|
+
`await getUser()` has nothing there at record time, so those stacks recorded `user: null` for
|
|
94
|
+
fully authenticated sessions — the User column and every `user:<id>` tag were dead. The watcher
|
|
95
|
+
now falls back to `userRef()` from the `@adonis-agora/context` accessor, which such hosts already
|
|
96
|
+
publish per request. The guard still wins when it exposes a user; the fallback costs one property
|
|
97
|
+
read and is skipped entirely when `@adonis-agora/context` is absent.
|
|
98
|
+
|
|
99
|
+
**`client_exception` counts as an exception in metrics.** The alert poller has always read both
|
|
100
|
+
`exception` and `client_exception`, but the metrics side hard-coded the server type — so a
|
|
101
|
+
front-end-only incident paged on Slack/Discord while the overview it linked to rendered
|
|
102
|
+
"Error rate 0.0% · No exceptions recorded 🎉". `summarizePulse` now classifies both,
|
|
103
|
+
`summarizeStats` computes exception groups for both, and `MetricsService.getStats` collects both
|
|
104
|
+
when asked for either (one `list` per type, mirroring the poller, since `EntryQuery.type` is a
|
|
105
|
+
single value). The dashboard's Exceptions section starts showing browser errors with no UI change.
|
|
106
|
+
|
|
107
|
+
The shared definition now lives in one place — new `EXCEPTION_ENTRY_TYPES` and `isExceptionType`
|
|
108
|
+
exports — because that list living in two places is exactly how the two sides drifted apart. Also
|
|
109
|
+
exports `currentUserRef` and the `UserRef` type alongside the existing `currentTraceId`.
|
|
110
|
+
|
|
3
111
|
## 0.11.0
|
|
4
112
|
|
|
5
113
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telescope_provider.d.ts","sourceRoot":"","sources":["../../providers/telescope_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAiC/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAiB;IAQxB,SAAS,CAAC,GAAG,EAAE,kBAAkB;IAP7C,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,kBAAkB,CAAmC;IAC7D,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,aAAa,CAA8B;IAEnD,YAAsB,GAAG,EAAE,kBAAkB,EAAI;IAEjD,QAAQ,SAQP;IAEK,IAAI,
|
|
1
|
+
{"version":3,"file":"telescope_provider.d.ts","sourceRoot":"","sources":["../../providers/telescope_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAiC/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAiB;IAQxB,SAAS,CAAC,GAAG,EAAE,kBAAkB;IAP7C,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,kBAAkB,CAAmC;IAC7D,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,aAAa,CAA8B;IAEnD,YAAsB,GAAG,EAAE,kBAAkB,EAAI;IAEjD,QAAQ,SAQP;IAEK,IAAI,kBAkET;IAED;;;;OAIG;YACW,oBAAoB;IAelC;;;;;OAKG;YACW,UAAU;IAexB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAQtB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAKrB;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAMtB,oGAAoG;IACpG,OAAO,CAAC,sBAAsB;IAaxB,QAAQ,kBAYb;CACF"}
|
|
@@ -56,7 +56,7 @@ export default class TelescopeProvider {
|
|
|
56
56
|
resetTelescopeRuntime();
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
setTelescopeRuntime(store, config.watchers.has('request'), config.requestCapture);
|
|
59
|
+
setTelescopeRuntime(store, config.watchers.has('request'), config.requestCapture, config.requestEnrichment);
|
|
60
60
|
setTelescopeEntryEvents(this.entryEvents);
|
|
61
61
|
if (config.watchers.has('diagnostics')) {
|
|
62
62
|
const watcher = new DiagnosticsWatcher(store, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telescope_provider.js","sourceRoot":"","sources":["../../providers/telescope_provider.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,mBAAmB,EACnB,aAAa,GACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,aAAa,GAEd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAwB,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACn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|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.13.0";
|
|
3
3
|
export type { ResolvedTelescopeAiConfig, TelescopeAiConfig, } from './define_config.js';
|
|
4
4
|
export { DEFAULT_MAX_TOKENS, DEFAULT_MODEL, defineConfig, resolveConfig, } from './define_config.js';
|
|
5
5
|
export type { Diagnosis, DiagnosisConfidence, ExceptionEntryContent } from './diagnoser.js';
|
package/dist/src/ai/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.13.0';
|
|
3
3
|
// — config —
|
|
4
4
|
export { DEFAULT_MAX_TOKENS, DEFAULT_MODEL, defineConfig, resolveConfig, } from './define_config.js';
|
|
5
5
|
// — diagnosis model + parsing —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception_source.d.ts","sourceRoot":"","sources":["../../../src/alerts/exception_source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,oDAAoD;IACpD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;
|
|
1
|
+
{"version":3,"file":"exception_source.d.ts","sourceRoot":"","sources":["../../../src/alerts/exception_source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,oDAAoD;IACpD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IAOd,OAAO,CAAC,QAAQ,CAAC,IAAI;IANjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4B;IACnD,OAAO,CAAC,KAAK,CAA+C;IAC5D,4EAA4E;IAC5E,OAAO,CAAC,KAAK,CAAO;IAEpB,YAA6B,IAAI,EAAE,mBAAmB,EAKrD;IAED,mDAAmD;IACnD,KAAK,IAAI,IAAI,CAQZ;IAED,0CAA0C;IAC1C,IAAI,IAAI,IAAI,CAKX;IAED;;;;;;;;;;;;OAYG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CA2B9B;CACF"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EXCEPTION_ENTRY_TYPES } from '../entry.js';
|
|
2
2
|
/** Cap on entries pulled per poll — a coarse alert check never needs more. */
|
|
3
3
|
const POLL_SCAN_CAP = 1_000;
|
|
4
|
-
/** The entry types the poller feeds to the alerter: server + browser-reported exceptions. */
|
|
5
|
-
const EXCEPTION_TYPES = [EntryType.Exception, EntryType.ClientException];
|
|
6
4
|
/**
|
|
7
5
|
* The hook point. Telescope's headless `@adonis-agora/telescope` core does not expose a
|
|
8
6
|
* "new entry" event, so — by design, to avoid modifying core — this poller reads
|
|
@@ -64,7 +62,7 @@ export class ExceptionPoller {
|
|
|
64
62
|
async pollOnce() {
|
|
65
63
|
let batches;
|
|
66
64
|
try {
|
|
67
|
-
batches = await Promise.all(
|
|
65
|
+
batches = await Promise.all(EXCEPTION_ENTRY_TYPES.map((type) => this.deps.store.list({ type, after: this.since, limit: POLL_SCAN_CAP })));
|
|
68
66
|
}
|
|
69
67
|
catch (error) {
|
|
70
68
|
this.logger(`Telescope alert poll failed: ${asMessage(error)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception_source.js","sourceRoot":"","sources":["../../../src/alerts/exception_source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,
|
|
1
|
+
{"version":3,"file":"exception_source.js","sourceRoot":"","sources":["../../../src/alerts/exception_source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIhE,8EAA8E;AAC9E,MAAM,aAAa,GAAG,KAAK,CAAC;AAa5B;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,eAAe;IAOG,IAAI;IANhB,GAAG,CAAe;IAClB,MAAM,CAA4B;IAC3C,KAAK,GAA0C,IAAI,CAAC;IAC5D,4EAA4E;IACpE,KAAK,CAAO;IAEpB,YAA6B,IAAyB;oBAAzB,IAAI;QAC/B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAClE,iFAAiF;QACjF,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,mDAAmD;IACnD,KAAK;QACH,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;YAAE,OAAO;QAChC,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;YAC5B,IAAI,CAAC,QAAQ,EAAE,CAAC,KA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CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;QACzD,CAAC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,+EAA+E;YAC/E,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC3C,IAAI,MAAM,KAAK,SAAS;gBAAE,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;QAC1D,CAAC;QAED,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;CACF;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.13.0";
|
|
3
3
|
export type { AlertChannel, ChannelFetch, ConsoleSink } from './alert_channel.js';
|
|
4
4
|
export { consoleChannel, customChannel, slackChannel, webhookChannel, } from './alert_channel.js';
|
|
5
5
|
export type { AlertDiagnosis, AlertGeoLocation, AlertMetric, AlertPayload, AlertRule, ExceptionAlertContext, GeoLookup, ResolvedAlerts, } from './alert_rule.js';
|
package/dist/src/alerts/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.13.0';
|
|
3
3
|
// — channels —
|
|
4
4
|
export { consoleChannel, customChannel, slackChannel, webhookChannel, } from './alert_channel.js';
|
|
5
5
|
// — alerter (exception source → tracker → channels) —
|
|
@@ -50,6 +50,26 @@ export interface ClientErrorIngestorDeps {
|
|
|
50
50
|
* ingest request can never be broken (or blocked) by a failing store.
|
|
51
51
|
*/
|
|
52
52
|
export declare function storeRecorder(store: TelescopeStore): (input: RecordInput<ClientExceptionContent>) => void;
|
|
53
|
+
/**
|
|
54
|
+
* The user to attribute a browser-reported error to.
|
|
55
|
+
*
|
|
56
|
+
* Two sources, and the ORDER is a trust decision. The ingestion endpoint is
|
|
57
|
+
* public, so anything the browser puts in the body is a claim — a caller can post
|
|
58
|
+
* someone else's id and misattribute an error. The `@adonis-agora/context`
|
|
59
|
+
* `userRef()` is resolved SERVER-SIDE from the session on this very request (the
|
|
60
|
+
* endpoint sits behind the host's normal middleware stack), so it is the one to
|
|
61
|
+
* trust when both are present.
|
|
62
|
+
*
|
|
63
|
+
* This is also what makes attribution work at all for the common setup: no
|
|
64
|
+
* front-end error reporter ships the logged-in user by default, so `content.user`
|
|
65
|
+
* is almost always absent and every `client_exception` recorded `user: null` —
|
|
66
|
+
* the dashboard's User column empty on a fully authenticated session.
|
|
67
|
+
*
|
|
68
|
+
* The body claim is still honoured when the context has nothing (an anonymous
|
|
69
|
+
* page, or a host without `@adonis-agora/context`), because a self-reported id is
|
|
70
|
+
* better than no attribution when there is nothing to contradict it.
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveClientErrorUser(fromBody: unknown): unknown;
|
|
53
73
|
/**
|
|
54
74
|
* The framework-agnostic client-error ingestion handler. Mirrors the NestJS
|
|
55
75
|
* `ClientErrorController.ingest` pipeline in idiomatic AdonisJS form — the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestor.d.ts","sourceRoot":"","sources":["../../../src/client_errors/ingestor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ingestor.d.ts","sourceRoot":"","sources":["../../../src/client_errors/ingestor.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,KAAK,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ACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuD;IAC9E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,6EAA6E;IAC7E,OAAO,CAAC,eAAe,CAAS;IAEhC,YAAY,IAAI,EAAE,uBAAuB,EAQxC;IAEK,MAAM,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC,CA4E1D;IAED;;;;OAIG;YACW,YAAY;IAmB1B;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAQpB,2EAA2E;IAC3E,OAAO,CAAC,QAAQ;CAIjB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { currentUserRef } from '../context_accessor.js';
|
|
1
2
|
import { EntryType } from '../entry.js';
|
|
2
3
|
import { exceptionFamilyHash } from '../exception_family_hash.js';
|
|
3
4
|
import { getTelescopeRuntime } from '../registry.js';
|
|
@@ -22,6 +23,29 @@ function reportError(err) {
|
|
|
22
23
|
const message = err instanceof Error ? err.message : String(err);
|
|
23
24
|
console.error(`telescope client-errors: failed to record entry: ${message}`);
|
|
24
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* The user to attribute a browser-reported error to.
|
|
28
|
+
*
|
|
29
|
+
* Two sources, and the ORDER is a trust decision. The ingestion endpoint is
|
|
30
|
+
* public, so anything the browser puts in the body is a claim — a caller can post
|
|
31
|
+
* someone else's id and misattribute an error. The `@adonis-agora/context`
|
|
32
|
+
* `userRef()` is resolved SERVER-SIDE from the session on this very request (the
|
|
33
|
+
* endpoint sits behind the host's normal middleware stack), so it is the one to
|
|
34
|
+
* trust when both are present.
|
|
35
|
+
*
|
|
36
|
+
* This is also what makes attribution work at all for the common setup: no
|
|
37
|
+
* front-end error reporter ships the logged-in user by default, so `content.user`
|
|
38
|
+
* is almost always absent and every `client_exception` recorded `user: null` —
|
|
39
|
+
* the dashboard's User column empty on a fully authenticated session.
|
|
40
|
+
*
|
|
41
|
+
* The body claim is still honoured when the context has nothing (an anonymous
|
|
42
|
+
* page, or a host without `@adonis-agora/context`), because a self-reported id is
|
|
43
|
+
* better than no attribution when there is nothing to contradict it.
|
|
44
|
+
*/
|
|
45
|
+
export function resolveClientErrorUser(fromBody) {
|
|
46
|
+
const fromContext = currentUserRef();
|
|
47
|
+
return fromContext ?? fromBody ?? null;
|
|
48
|
+
}
|
|
25
49
|
/**
|
|
26
50
|
* The framework-agnostic client-error ingestion handler. Mirrors the NestJS
|
|
27
51
|
* `ClientErrorController.ingest` pipeline in idiomatic AdonisJS form — the
|
|
@@ -80,7 +104,10 @@ export class ClientErrorIngestor {
|
|
|
80
104
|
// frame (mirrors server exceptions), and the composing tags.
|
|
81
105
|
const content = validation.value;
|
|
82
106
|
const tags = ['failed', 'client'];
|
|
83
|
-
|
|
107
|
+
// The browser MAY claim a user in the body; the server-side context is
|
|
108
|
+
// authoritative and wins. See resolveClientErrorUser.
|
|
109
|
+
const user = resolveClientErrorUser(content.user);
|
|
110
|
+
const userTag = userIdentityTag(user);
|
|
84
111
|
if (userTag !== null)
|
|
85
112
|
tags.push(userTag);
|
|
86
113
|
// Content field ORDER is load-bearing. The Recorder's content-byte budget
|
|
@@ -105,7 +132,7 @@ export class ClientErrorIngestor {
|
|
|
105
132
|
name: content.name,
|
|
106
133
|
url: content.url,
|
|
107
134
|
userAgent: content.userAgent,
|
|
108
|
-
user
|
|
135
|
+
user,
|
|
109
136
|
release: content.release,
|
|
110
137
|
extra: content.extra,
|
|
111
138
|
stack: content.stack,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestor.js","sourceRoot":"","sources":["../../../src/client_errors/ingestor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CA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AO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClE,CAAC;CACF"}
|
|
@@ -27,4 +27,17 @@ export interface ContextAccessor {
|
|
|
27
27
|
export declare function getContextAccessor(): ContextAccessor | undefined;
|
|
28
28
|
/** The active trace id from `@adonis-agora/context`, or `null` when unavailable. */
|
|
29
29
|
export declare function currentTraceId(): string | null;
|
|
30
|
+
/**
|
|
31
|
+
* The active user reference from `@adonis-agora/context`, or `undefined`.
|
|
32
|
+
*
|
|
33
|
+
* This is the attribution path for hosts whose auth guard is ASYNCHRONOUS. The
|
|
34
|
+
* `@adonisjs/auth` convention gives watchers a synchronous `ctx.auth.user`, but a
|
|
35
|
+
* guard that only resolves via `await getUser()` has nothing to read at record
|
|
36
|
+
* time — so those hosts publish the resolved reference into the request context
|
|
37
|
+
* instead, and this is where watchers pick it up.
|
|
38
|
+
*
|
|
39
|
+
* Defensive: a throwing accessor yields `undefined`, never an exception into the
|
|
40
|
+
* recording path.
|
|
41
|
+
*/
|
|
42
|
+
export declare function currentUserRef(): UserRef | undefined;
|
|
30
43
|
//# sourceMappingURL=context_accessor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context_accessor.d.ts","sourceRoot":"","sources":["../../src/context_accessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,8EAA8E;AAC9E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;IAC/B,OAAO,IAAI,OAAO,GAAG,SAAS,CAAC;IAC/B,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC5C;AAID,4FAA4F;AAC5F,wBAAgB,kBAAkB,IAAI,eAAe,GAAG,SAAS,CAEhE;AAED,oFAAoF;AACpF,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAE9C"}
|
|
1
|
+
{"version":3,"file":"context_accessor.d.ts","sourceRoot":"","sources":["../../src/context_accessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,8EAA8E;AAC9E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;IAC/B,OAAO,IAAI,OAAO,GAAG,SAAS,CAAC;IAC/B,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC5C;AAID,4FAA4F;AAC5F,wBAAgB,kBAAkB,IAAI,eAAe,GAAG,SAAS,CAEhE;AAED,oFAAoF;AACpF,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAE9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,IAAI,OAAO,GAAG,SAAS,CAMpD"}
|
|
@@ -17,4 +17,24 @@ export function getContextAccessor() {
|
|
|
17
17
|
export function currentTraceId() {
|
|
18
18
|
return getContextAccessor()?.traceId() ?? null;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* The active user reference from `@adonis-agora/context`, or `undefined`.
|
|
22
|
+
*
|
|
23
|
+
* This is the attribution path for hosts whose auth guard is ASYNCHRONOUS. The
|
|
24
|
+
* `@adonisjs/auth` convention gives watchers a synchronous `ctx.auth.user`, but a
|
|
25
|
+
* guard that only resolves via `await getUser()` has nothing to read at record
|
|
26
|
+
* time — so those hosts publish the resolved reference into the request context
|
|
27
|
+
* instead, and this is where watchers pick it up.
|
|
28
|
+
*
|
|
29
|
+
* Defensive: a throwing accessor yields `undefined`, never an exception into the
|
|
30
|
+
* recording path.
|
|
31
|
+
*/
|
|
32
|
+
export function currentUserRef() {
|
|
33
|
+
try {
|
|
34
|
+
return getContextAccessor()?.userRef();
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
20
40
|
//# sourceMappingURL=context_accessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context_accessor.js","sourceRoot":"","sources":["../../src/context_accessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmBH,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AAE/D,4FAA4F;AAC5F,MAAM,UAAU,kBAAkB;IAChC,OAAQ,UAAsC,CAAC,gBAAgB,CAAgC,CAAC;AAClG,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,cAAc;IAC5B,OAAO,kBAAkB,EAAE,EAAE,OAAO,EAAE,IAAI,IAAI,CAAC;AACjD,CAAC"}
|
|
1
|
+
{"version":3,"file":"context_accessor.js","sourceRoot":"","sources":["../../src/context_accessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmBH,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AAE/D,4FAA4F;AAC5F,MAAM,UAAU,kBAAkB;IAChC,OAAQ,UAAsC,CAAC,gBAAgB,CAAgC,CAAC;AAClG,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,cAAc;IAC5B,OAAO,kBAAkB,EAAE,EAAE,OAAO,EAAE,IAAI,IAAI,CAAC;AACjD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC;QACH,OAAO,kBAAkB,EAAE,EAAE,OAAO,EAAE,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { type ClientErrorsConfig, type ResolvedClientErrorsConfig } from './clie
|
|
|
2
2
|
import type { TelescopeExtension } from './extension/types.js';
|
|
3
3
|
import { type PulseCardName } from './metrics/pulse.js';
|
|
4
4
|
import type { RedactBounds } from './redaction/redact.js';
|
|
5
|
-
import type { RequestCaptureOptions } from './request_watcher.js';
|
|
5
|
+
import type { RequestCaptureOptions, RequestEnrichment } from './request_watcher.js';
|
|
6
6
|
import { type SamplingConfig } from './sampling/sampling.js';
|
|
7
7
|
import type { TelescopeStore } from './store.js';
|
|
8
8
|
import { type StoreProvider, storage } from './stores/factory.js';
|
|
@@ -95,6 +95,13 @@ export interface TelescopeConfig {
|
|
|
95
95
|
* field on request entries). See {@link RequestCaptureOptions}.
|
|
96
96
|
*/
|
|
97
97
|
requestCapture?: RequestCaptureOptions;
|
|
98
|
+
/**
|
|
99
|
+
* Host hook that enriches every `request` entry with information only the app
|
|
100
|
+
* has — most usefully, a tag for the front-end screen that issued the call, so
|
|
101
|
+
* the dashboard can slice requests by screen. Synchronous, and a throw is
|
|
102
|
+
* swallowed. See {@link RequestEnrichment}. Off by default.
|
|
103
|
+
*/
|
|
104
|
+
requestEnrichment?: RequestEnrichment;
|
|
98
105
|
/**
|
|
99
106
|
* Extensions contributed by sibling libs (e.g. `@adonis-agora/durable-telescope`) — each adds navigable
|
|
100
107
|
* entry types, dashboard pages, and the data providers those pages bind to. Default none.
|
|
@@ -273,6 +280,8 @@ export interface ResolvedTelescopeConfig {
|
|
|
273
280
|
};
|
|
274
281
|
/** Opt-in request body-capture gates, or `null` when body capture is off (default). */
|
|
275
282
|
requestCapture: RequestCaptureOptions | null;
|
|
283
|
+
/** Host enrichment hook for request entries, or `null` when unset (default). */
|
|
284
|
+
requestEnrichment: RequestEnrichment | null;
|
|
276
285
|
extensions: TelescopeExtension[];
|
|
277
286
|
redact: {
|
|
278
287
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define_config.d.ts","sourceRoot":"","sources":["../../src/define_config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAEhC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"define_config.d.ts","sourceRoot":"","sources":["../../src/define_config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAEhC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,KAAK,aAAa,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAW/E;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;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AAC;KACxB,CAAC;IACF,qCAAqC;IACrC,MAAM,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC7B;;;;OAIG;IACH,KAAK,EAAE;QACL,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,oFAAoF;IACpF,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;QACjB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,6FAA6F;IAC7F,YAAY,EAAE,0BAA0B,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAErE;AAED,qDAAqD;AACrD,wBAAgB,aAAa,CAAC,MAAM,GAAE,eAAoB,GAAG,uBAAuB,CAgDnF;AAkBD,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -48,6 +48,7 @@ export function resolveConfig(config = {}) {
|
|
|
48
48
|
tags: [...(config.logs?.tags ?? [])],
|
|
49
49
|
},
|
|
50
50
|
requestCapture: config.requestCapture ?? null,
|
|
51
|
+
requestEnrichment: config.requestEnrichment ?? null,
|
|
51
52
|
extensions: config.extensions ?? [],
|
|
52
53
|
redact: {
|
|
53
54
|
enabled: config.redact?.enabled ?? true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define_config.js","sourceRoot":"","sources":["../../src/define_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAGL,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,WA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"}
|
package/dist/src/entry.d.ts
CHANGED
|
@@ -50,6 +50,19 @@ export declare const EntryType: {
|
|
|
50
50
|
readonly CpuProfile: 'cpu_profile';
|
|
51
51
|
};
|
|
52
52
|
export type BuiltinEntryType = (typeof EntryType)[keyof typeof EntryType];
|
|
53
|
+
/**
|
|
54
|
+
* The entry types that represent a CAPTURED ERROR: a server-side `exception` and
|
|
55
|
+
* a browser-reported `client_exception`.
|
|
56
|
+
*
|
|
57
|
+
* Defined once, on purpose. This list used to live only inside the alert poller
|
|
58
|
+
* while the metrics/dashboard side hard-coded `EntryType.Exception` alone, and the
|
|
59
|
+
* two silently disagreed: a front-end-only incident paged on Slack/Discord and
|
|
60
|
+
* simultaneously rendered "Error rate 0.0% · No exceptions recorded 🎉" on the
|
|
61
|
+
* overview. Anything answering "is this an error?" should read THIS.
|
|
62
|
+
*/
|
|
63
|
+
export declare const EXCEPTION_ENTRY_TYPES: readonly ["exception", "client_exception"];
|
|
64
|
+
/** Whether `type` is one of {@link EXCEPTION_ENTRY_TYPES} (server or browser). */
|
|
65
|
+
export declare function isExceptionType(type: string): boolean;
|
|
53
66
|
/**
|
|
54
67
|
* Where a batch of entries originated. An entry recorded inside an HTTP request
|
|
55
68
|
* is `http`; one recorded by a queue worker is `queue`; a diagnostic recorded
|
package/dist/src/entry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../src/entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;IACpB,wEAAwE;aACxE,OAAO,EAAE,SAAS;IAClB,0DAA0D;aAC1D,UAAU,EAAE,YAAY;aAExB,KAAK,EAAE,OAAO;aACd,GAAG,EAAE,KAAK;aACV,SAAS,EAAE,WAAW;aACtB,IAAI,EAAE,MAAM;aACZ,KAAK,EAAE,OAAO;aACd,KAAK,EAAE,OAAO;aACd,KAAK,EAAE,OAAO;aACd,GAAG,EAAE,KAAK;IAC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
|
54
|
+
* The entry types that represent a CAPTURED ERROR: a server-side `exception` and
|
|
55
|
+
* a browser-reported `client_exception`.
|
|
56
|
+
*
|
|
57
|
+
* Defined once, on purpose. This list used to live only inside the alert poller
|
|
58
|
+
* while the metrics/dashboard side hard-coded `EntryType.Exception` alone, and the
|
|
59
|
+
* two silently disagreed: a front-end-only incident paged on Slack/Discord and
|
|
60
|
+
* simultaneously rendered "Error rate 0.0% · No exceptions recorded 🎉" on the
|
|
61
|
+
* overview. Anything answering "is this an error?" should read THIS.
|
|
62
|
+
*/
|
|
63
|
+
export const EXCEPTION_ENTRY_TYPES = [EntryType.Exception, EntryType.ClientException];
|
|
64
|
+
/** Whether `type` is one of {@link EXCEPTION_ENTRY_TYPES} (server or browser). */
|
|
65
|
+
export function isExceptionType(type) {
|
|
66
|
+
return type === EntryType.Exception || type === EntryType.ClientException;
|
|
67
|
+
}
|
|
53
68
|
/**
|
|
54
69
|
* Where a batch of entries originated. An entry recorded inside an HTTP request
|
|
55
70
|
* is `http`; one recorded by a queue worker is `queue`; a diagnostic recorded
|
package/dist/src/entry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,wEAAwE;IACxE,OAAO,EAAE,SAAS;IAClB,0DAA0D;IAC1D,UAAU,EAAE,YAAY;IACxB,8DAA8D;IAC9D,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,kEAAkE;IAClE,UAAU,EAAE,aAAa;IACzB;;;;OAIG;IACH,OAAO,EAAE,SAAS;IAClB;;;;;OAKG;IACH,aAAa,EAAE,gBAAgB;I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AAC;AAED;;;;GAIG;AACH,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAG9E,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3F,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.13.0";
|
|
3
3
|
export { configure } from '../configure.js';
|
|
4
4
|
export type { DiagnoserLike, DiagnosisCoordinatorOptions, DiagnosisSummary, } from './ai/diagnosis_coordinator.js';
|
|
5
5
|
export { DiagnosisCoordinator, formatDiagnosisMarkdown, } from './ai/diagnosis_coordinator.js';
|
|
6
6
|
export { type ClientErrorHttpContext, ClientErrorIngestor, type ClientErrorIngestorDeps, ClientErrorRateLimiter, type ClientErrorRequest, type ClientErrorResponse, type ClientErrorsConfig, type ClientErrorValidation, type ClientExceptionContent, DEFAULT_CLIENT_ERRORS_PATH, DEFAULT_MAX_BODY_BYTES, DEFAULT_MAX_TRACKED_IPS, DEFAULT_RATE_LIMIT_PER_MINUTE, type ResolvedClientErrorsConfig, resolveClientErrors, storeRecorder, userIdentityTag, validateClientErrorBody, } from './client_errors/index.js';
|
|
7
|
-
export type { ContextAccessor } from './context_accessor.js';
|
|
8
|
-
export { currentTraceId, getContextAccessor } from './context_accessor.js';
|
|
7
|
+
export type { ContextAccessor, UserRef } from './context_accessor.js';
|
|
8
|
+
export { currentTraceId, currentUserRef, getContextAccessor } from './context_accessor.js';
|
|
9
9
|
export type { DiagnosticsConfig, NPlusOneConfig, OverloadConfig, PruneConfig, PulseConfig, RedactConfig, ResolvedTelescopeConfig, StreamConfig, TelescopeConfig, WatcherName, } from './define_config.js';
|
|
10
10
|
export { defineConfig, resolveConfig } from './define_config.js';
|
|
11
11
|
export type { DiagnosticEvent, DiagnosticsRegistry } from './diagnostics_registry.js';
|
|
@@ -13,7 +13,7 @@ export { getDiagnosticsRegistry, isDiagnosticClaimed, isDiagnosticEvent, } from
|
|
|
13
13
|
export type { DiagnosticEntryContent, DiagnosticsWatcherOptions, } from './diagnostics_watcher.js';
|
|
14
14
|
export { buildDiagnosticEntry, DIAGNOSTIC_ENTRY_TYPE, DiagnosticsWatcher, } from './diagnostics_watcher.js';
|
|
15
15
|
export type { BatchOrigin, BuiltinEntryType, Entry, RecordInput } from './entry.js';
|
|
16
|
-
export { EntryType, isBatchOrigin } from './entry.js';
|
|
16
|
+
export { EntryType, EXCEPTION_ENTRY_TYPES, isBatchOrigin, isExceptionType } from './entry.js';
|
|
17
17
|
export type { ExceptionFamilyParts } from './exception_family_hash.js';
|
|
18
18
|
export { exceptionFamilyHash } from './exception_family_hash.js';
|
|
19
19
|
export type { ExceptionEntryContent, RecordExceptionContext, } from './exception_watcher.js';
|
|
@@ -47,8 +47,8 @@ export { compileRedactSpec, DEFAULT_MASK, DEFAULT_REDACT_KEYS, redact, redactBou
|
|
|
47
47
|
export { RedactingTelescopeStore } from './redaction/redacting_store.js';
|
|
48
48
|
export type { TelescopeRuntime } from './registry.js';
|
|
49
49
|
export { getTelescopeRuntime, resetTelescopeRuntime, setTelescopeDiagnosisCoordinator, setTelescopeEntryEvents, setTelescopeExtensionRegistry, setTelescopePaused, setTelescopeRuntime, } from './registry.js';
|
|
50
|
-
export type { CaptureRequestInfo, HttpContextLike, RecordRequestOptions, RequestCaptureOptions, RequestEntryContent, ResolvedRequestCapture, } from './request_watcher.js';
|
|
51
|
-
export { recordRequest, resolveRequestCapture } from './request_watcher.js';
|
|
50
|
+
export type { CaptureRequestInfo, HttpContextLike, RecordRequestOptions, RequestCaptureOptions, RequestEnrichment, RequestEnrichmentResult, RequestEntryContent, ResolvedRequestCapture, } from './request_watcher.js';
|
|
51
|
+
export { MAX_ENRICHMENT_TAG_LENGTH, MAX_ENRICHMENT_TAGS, recordRequest, resolveRequestCapture, } from './request_watcher.js';
|
|
52
52
|
export type { SamplingConfig, SamplingRule } from './sampling/sampling.js';
|
|
53
53
|
export { isErrorEntry, passesSampling, resolveSampling, samplingRates, } from './sampling/sampling.js';
|
|
54
54
|
export { SamplingTelescopeStore } from './sampling/sampling_store.js';
|