@volter/twin-sentry 0.1.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/LICENSE +202 -0
- package/README.md +142 -0
- package/client/sentry-mirror.css +99 -0
- package/client/sentry-mirror.tsx +352 -0
- package/dist/client/sentry-mirror.bundle.js +321 -0
- package/dist/client/sentry-mirror.css +99 -0
- package/dist/client/sentry-mirror.d.ts +17 -0
- package/dist/client/sentry-mirror.js +156 -0
- package/dist/client/sentry-mirror.tsx +352 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +36 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.js +75 -0
- package/dist/src/sentry-budget.d.ts +50 -0
- package/dist/src/sentry-budget.js +145 -0
- package/dist/src/sentry-capabilities.d.ts +3 -0
- package/dist/src/sentry-capabilities.js +1180 -0
- package/dist/src/sentry-conformance.d.ts +22 -0
- package/dist/src/sentry-conformance.js +97 -0
- package/dist/src/sentry-connector.d.ts +77 -0
- package/dist/src/sentry-connector.js +226 -0
- package/dist/src/sentry-events.d.ts +54 -0
- package/dist/src/sentry-events.js +131 -0
- package/dist/src/sentry-ingest.d.ts +137 -0
- package/dist/src/sentry-ingest.js +387 -0
- package/dist/src/sentry-mirror-ui.d.ts +38 -0
- package/dist/src/sentry-mirror-ui.js +162 -0
- package/dist/src/sentry-perform-harness.d.ts +9 -0
- package/dist/src/sentry-perform-harness.js +20 -0
- package/dist/src/sentry-server.d.ts +14 -0
- package/dist/src/sentry-server.js +27 -0
- package/dist/src/sentry-twin.d.ts +17 -0
- package/dist/src/sentry-twin.js +1739 -0
- package/dist/test-fixtures/sentry-openapi-operations.SOURCE.md +24 -0
- package/dist/test-fixtures/sentry-openapi-operations.json +1837 -0
- package/package.json +75 -0
- package/src/cli.ts +34 -0
- package/src/index.ts +145 -0
- package/src/sentry-budget.ts +171 -0
- package/src/sentry-capabilities.ts +1222 -0
- package/src/sentry-conformance.ts +110 -0
- package/src/sentry-connector.ts +260 -0
- package/src/sentry-events.ts +171 -0
- package/src/sentry-ingest.ts +471 -0
- package/src/sentry-mirror-ui.ts +162 -0
- package/src/sentry-perform-harness.ts +19 -0
- package/src/sentry-server.ts +35 -0
- package/src/sentry-twin.ts +1615 -0
- package/test-fixtures/sentry-openapi-operations.SOURCE.md +24 -0
- package/test-fixtures/sentry-openapi-operations.json +1837 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# @volter/twin-sentry
|
|
2
|
+
|
|
3
|
+
A local **Sentry** twin — a faithful, stateful local Sentry error-monitoring API your real
|
|
4
|
+
`@sentry/node` SDK talks to **unmodified**. Point your SDK's DSN at the twin and a normal
|
|
5
|
+
`Sentry.captureException()` lands an event that the twin **groups into an issue**; browse the
|
|
6
|
+
issues/events/releases through the real Web API (`/api/0/...`) or the dashboard mirror.
|
|
7
|
+
Mirror real Sentry, simulate, and fork. Built on `@volter/world-core`.
|
|
8
|
+
|
|
9
|
+
It is **two API families over one local event-sourced state** (the `@volter/world-core` kernel):
|
|
10
|
+
|
|
11
|
+
1. **Ingestion (the SDK side)** — `POST /api/:projectId/store/` and `/api/:projectId/envelope/`,
|
|
12
|
+
authenticated by the DSN public key (`X-Sentry-Auth` / `?sentry_key=` / envelope `dsn`). The
|
|
13
|
+
twin derives a **deterministic fingerprint**, **groups** events into issues, increments
|
|
14
|
+
`count` + `firstSeen`/`lastSeen`, persists the event, and returns the event id. A new event on
|
|
15
|
+
a resolved/ignored issue **reopens** it (regression).
|
|
16
|
+
2. **Web API (the dashboard side, `/api/0/...`)** — issues (list with `query`/`sort`, retrieve,
|
|
17
|
+
resolve/ignore/unresolve/assign, delete, events), events, projects + keys/DSN, releases +
|
|
18
|
+
deploys + commits, organizations + teams, and alert rules + **signed webhooks**.
|
|
19
|
+
|
|
20
|
+
No real Sentry is ever contacted on the serve path — it's fully local and offline. Real vendor
|
|
21
|
+
I/O happens **only in the connector**, over an **injected client** (a fake in tests, a real
|
|
22
|
+
token-authed client in prod). `readOnly` rejects writes (vendor-shaped 405). An unmodeled
|
|
23
|
+
operation **fails like Sentry** (4xx JSON `{ detail }`) — never a fabricated success.
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# serve the twin (ingestion + Web API); prints the DSN to point @sentry/node at
|
|
29
|
+
bunx world-sentry serve --port 9000
|
|
30
|
+
# point @sentry/node at DSN: http://twinpublickey...@127.0.0.1:9000/1
|
|
31
|
+
|
|
32
|
+
# the dashboard mirror (React)
|
|
33
|
+
bunx world-sentry mirror --port 9001
|
|
34
|
+
|
|
35
|
+
# offline shape conformance
|
|
36
|
+
bunx world-sentry conformance
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import * as Sentry from '@sentry/node';
|
|
41
|
+
Sentry.init({ dsn: 'http://twinpublickey00000000000000000000@127.0.0.1:9000/1' });
|
|
42
|
+
Sentry.captureException(new Error('boom')); // → a grouped issue in the twin
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Coverage
|
|
46
|
+
|
|
47
|
+
The honest denominator is the **capability manifest** (`src/sentry-capabilities.ts`): the real
|
|
48
|
+
Sentry surface, ranked core → common → niche, where every `done` capability is proven by an
|
|
49
|
+
**offline** `verify()` that drives real ingest/create → read → assert against the twin. The
|
|
50
|
+
baseline test (`src/sentry-capabilities.test.ts`) asserts via `assertManifestBaseline`: total
|
|
51
|
+
≥ 50, done > 0, **0 regressions**. Every capability is either `done` or `todo`.
|
|
52
|
+
|
|
53
|
+
**Modeled (core → niche):**
|
|
54
|
+
|
|
55
|
+
- **Ingestion** — store + envelope endpoints, DSN public-key auth (header/query/envelope),
|
|
56
|
+
message + exception events, deterministic grouping (incl. number normalization), distinct
|
|
57
|
+
grouping, regression reopen, culprit from the top in-app frame.
|
|
58
|
+
- **Issues** — list (`query` DSL: `is:`, `level:`, free text; `sort=date|freq|new`), retrieve,
|
|
59
|
+
resolve/ignore/unresolve/assign, delete, events + latest event, shortId/permalink/metadata,
|
|
60
|
+
**bulk** resolve/ignore (`?query`/`?id`), **merge** groups, **tag value distributions**
|
|
61
|
+
(`/tags/`, `/tags/:key/`), **grouping hashes** (`/hashes/`), **activity feed** (`/activity/`),
|
|
62
|
+
**user feedback** (`/user-feedback/`: submit + list crash-report comments, linked to the event's issue).
|
|
63
|
+
- **Events** — list, retrieve, tags/level/platform, exception stacktrace entries,
|
|
64
|
+
**attachments listing** (envelope `attachment` items → per-event metadata), **org event facets**
|
|
65
|
+
(`/events-facets/`: tag-value `topValues` distributions across the org's persisted events).
|
|
66
|
+
- **Projects** — list/retrieve/create/update/delete, project **keys/DSN** (list + create +
|
|
67
|
+
toggle/revoke/**delete** + **per-key rate-limit** config), **environments** (distinct envs),
|
|
68
|
+
**ownership rules + CODEOWNERS** (path/url/module → owners, schema-parsed), **inbound data
|
|
69
|
+
filters** (browser-extensions / legacy-browsers / localhost / web-crawlers toggles), **spike
|
|
70
|
+
protection** (org-level enable/disable per project — `/spike-protections/`).
|
|
71
|
+
- **Releases** — create/list/retrieve/update/delete, associate commits, **deploys**, **release
|
|
72
|
+
files / artifact registry** (source-map upload metadata), **commit files** (`/commitfiles/`:
|
|
73
|
+
files changed across a release's commits, flattened from each commit's patch set), **release
|
|
74
|
+
health** (crash-free session tallies over real persisted session envelopes — `/organizations/:org/sessions/`).
|
|
75
|
+
- **Organizations + teams** — list/retrieve/create/update/delete (org), list/create (teams),
|
|
76
|
+
**org members** (invite / list / role change / remove), **team membership** add/remove,
|
|
77
|
+
**SCIM 2.0 provisioning** (Users + Groups CRUD under `/scim/v2/` with faithful SCIM
|
|
78
|
+
envelopes / ListResponse / 409-on-duplicate), **org stats** (`stats_v2` totals over real
|
|
79
|
+
events), **integrations** (GitHub/Slack/PagerDuty install + config CRUD), **custom dashboards
|
|
80
|
+
+ widgets**, **Discover saved queries**.
|
|
81
|
+
- **Alerts + webhooks** — issue alert rules with **actions** (email/Slack/PagerDuty/MS Teams,
|
|
82
|
+
validated per-type), **metric alert rules** (`/alert-rules/`: aggregate + dataset + thresholds
|
|
83
|
+
with critical/warning triggers), **signed** (HMAC-SHA256 `Sentry-Hook-Signature`) webhooks on
|
|
84
|
+
**new-issue** + **regression** via an **injected deliverer** (offline `verify()`).
|
|
85
|
+
- **Mirror UI** — Issues stream (grouped errors: count / last-seen / level / status), Issue
|
|
86
|
+
detail (latest-event stacktrace + tags), **Dashboards** (custom widgets), **Discover** (query
|
|
87
|
+
builder scaffold + saved queries), Releases, Projects, **Alerts** (issue alert rules),
|
|
88
|
+
**Settings** (general / client keys-DSN / environments) — all backed by real twin state.
|
|
89
|
+
- **Connector** — pull (issues/projects/releases) + push (issue triage: resolve/ignore/assign)
|
|
90
|
+
over an injected executor, with confirm + idempotent re-push.
|
|
91
|
+
|
|
92
|
+
**Planned (`todo`) — the deeper engines Sentry runs that this twin has not built yet:**
|
|
93
|
+
|
|
94
|
+
- **Symbolication** (`sentry.events.symbolication`) — de-minify stacktrace frames against uploaded
|
|
95
|
+
source maps and debug files. Raw frames and the artifact registry are already faithful.
|
|
96
|
+
- **Span percentile aggregation** (`sentry.performance.span_aggregation`) — p50/p75/p95 computed
|
|
97
|
+
over the transaction and span events the twin already stores, plus the trace and time-series read
|
|
98
|
+
endpoints that serve it.
|
|
99
|
+
- **Session Replay segment ingest** (`sentry.replay.segment_ingest`) — accept and persist the
|
|
100
|
+
recorded rrweb/DOM segment uploads and serve the replay list, detail and segment reads.
|
|
101
|
+
- **Continuous profiling** (`sentry.performance.profiling`) — accept sampled stack-profile envelopes
|
|
102
|
+
and serve the flamegraph aggregation computed over them.
|
|
103
|
+
- **Grouping enhancements** (`sentry.ingest.grouping_enhancements`) — stack-aware
|
|
104
|
+
grouping-enhancement rules, fingerprint rules and frame heuristics on top of the deterministic
|
|
105
|
+
base fingerprint (exception type + value + culprit, or message, numbers normalized), which is
|
|
106
|
+
documented and already faithful-but-simple.
|
|
107
|
+
- **Cron monitors** (`sentry.crons.monitors`) — check-in endpoints plus a deterministic
|
|
108
|
+
heartbeat-miss detection engine over stored check-ins.
|
|
109
|
+
|
|
110
|
+
Several config-modeled surfaces persist and round-trip their CONFIG faithfully while their live
|
|
111
|
+
EXECUTION is likewise unbuilt: metric-alert threshold evaluation/firing, Discover arbitrary query
|
|
112
|
+
execution (the builder and saved queries are real), and attachment binary download (the metadata
|
|
113
|
+
listing is real; the bytes need a blob store). Alert-action config persists and round-trips, and no
|
|
114
|
+
notification is sent. Release-health crash-free counts ARE real exact tallies over persisted
|
|
115
|
+
sessions; only the time-series rollup is absent.
|
|
116
|
+
|
|
117
|
+
## Architecture
|
|
118
|
+
|
|
119
|
+
State and execution follow the shared [model](../../../docs/concepts/the-model.md) and
|
|
120
|
+
[architecture](../../../docs/contributing/architecture.md). The kernel owns storage and execution
|
|
121
|
+
mechanics; this package owns vendor semantics. Conformance tooling is a development dependency.
|
|
122
|
+
The [generated index](../../../generated/INDEX.md) records this package's protocol standing.
|
|
123
|
+
|
|
124
|
+
## Rate budget — the fail-closed backstop on live calls
|
|
125
|
+
|
|
126
|
+
`liveSentryExecute` is the **one place** this pack issues a live request, so every call it makes is charged
|
|
127
|
+
against a persistent, fail-closed spend ledger **before** the request goes out. Past the ceiling, or
|
|
128
|
+
while a `Retry-After`/429 cooldown is armed, it **throws instead of calling**. The ledger is keyed by
|
|
129
|
+
vendor and a hash of the credential (limits are per credential, so it is deliberately *not*
|
|
130
|
+
cwd-scoped) and persists across processes, so a fresh process does not get a fresh allowance; a
|
|
131
|
+
corrupt ledger counts as a **full** window rather than zero spend. There is no option to disable it,
|
|
132
|
+
and no value you can pass for `budget` that yields an unguarded client — an injected budget is
|
|
133
|
+
validated by *method identity*, so a subclass or a `Proxy` that replaces `checkBudget` is refused.
|
|
134
|
+
|
|
135
|
+
The declared numbers: **60 weighted units / 60s at weight 2 = 30 calls/minute — exactly the kernel's austere fallback**, because Sentry publishes *no* figure at all (per-endpoint windows, unstated). What the guard buys for an unknowable limit is the **cooldown**: `X-Sentry-Rate-Limit-Remaining: 0` and `Retry-After` become a persisted client-side stop instead of a retry storm. Issue/event list reads cost 4 — the paginated firehose the docs tell you not to poll.
|
|
136
|
+
|
|
137
|
+
The mechanism is **shared and vendor-agnostic** — it lives in the kernel (`@volter/world-core` →
|
|
138
|
+
`packages/world-core/src/rateBudget.ts`); what lives here in [`src/sentry-budget.ts`](src/sentry-budget.ts) is this vendor's
|
|
139
|
+
**declaration** (window, ceiling, per-endpoint weights, and a `reason` citing the limits above) plus
|
|
140
|
+
the vendor-bound `SentryBudget`. The rule is ratified as
|
|
141
|
+
[../../../docs/contributing/architecture.md](../../../docs/contributing/architecture.md) **D8**, and the kernel module's header documents what the
|
|
142
|
+
guard does *not* guarantee — read that before trusting it.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--bg: #1d1127;
|
|
3
|
+
--panel: #251a35;
|
|
4
|
+
--panel-2: #2e2140;
|
|
5
|
+
--border: #3a2d50;
|
|
6
|
+
--text: #ebe6f2;
|
|
7
|
+
--muted: #a094b3;
|
|
8
|
+
--accent: #6c5fc7;
|
|
9
|
+
--fatal: #c84b48;
|
|
10
|
+
--error: #e4774e;
|
|
11
|
+
--warning: #e2c14f;
|
|
12
|
+
--info: #5b9bd5;
|
|
13
|
+
--debug: #8a7fb0;
|
|
14
|
+
--resolved: #3aa76d;
|
|
15
|
+
--ignored: #6b5f82;
|
|
16
|
+
}
|
|
17
|
+
* { box-sizing: border-box; }
|
|
18
|
+
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
|
|
19
|
+
.mono { font-family: "SFMono-Regular", Menlo, Consolas, monospace; }
|
|
20
|
+
.app { display: flex; flex-direction: column; height: 100vh; }
|
|
21
|
+
.topbar { display: flex; align-items: center; gap: 16px; padding: 0 18px; height: 52px; background: var(--panel); border-bottom: 1px solid var(--border); }
|
|
22
|
+
.brand { font-weight: 700; font-size: 16px; }
|
|
23
|
+
.badge { font-size: 11px; background: var(--accent); padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
|
|
24
|
+
.org { color: var(--muted); font-size: 13px; }
|
|
25
|
+
.body { display: flex; flex: 1; min-height: 0; }
|
|
26
|
+
.sidenav { width: 180px; background: var(--panel); border-right: 1px solid var(--border); padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; }
|
|
27
|
+
.nav-item { text-align: left; background: none; border: none; color: var(--muted); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; }
|
|
28
|
+
.nav-item:hover { background: var(--panel-2); color: var(--text); }
|
|
29
|
+
.nav-item.active { background: var(--accent); color: #fff; }
|
|
30
|
+
.content { flex: 1; min-width: 0; overflow: hidden; display: flex; }
|
|
31
|
+
.split { display: flex; flex: 1; min-width: 0; }
|
|
32
|
+
.list { width: 480px; border-right: 1px solid var(--border); overflow-y: auto; }
|
|
33
|
+
.list.full { width: 100%; padding: 18px; }
|
|
34
|
+
.detail { flex: 1; overflow-y: auto; padding: 22px; }
|
|
35
|
+
.search-bar { padding: 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); }
|
|
36
|
+
.search-input { width: 100%; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-family: monospace; }
|
|
37
|
+
.issue-row { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); color: var(--text); padding: 12px 14px; cursor: pointer; }
|
|
38
|
+
.issue-row:hover { background: var(--panel-2); }
|
|
39
|
+
.issue-row.selected { background: var(--panel-2); border-left: 3px solid var(--accent); }
|
|
40
|
+
.issue-title { font-weight: 600; font-size: 14px; }
|
|
41
|
+
.issue-culprit { color: var(--muted); font-size: 12px; margin-top: 2px; }
|
|
42
|
+
.issue-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
|
|
43
|
+
.issue-count, .issue-lastseen { color: var(--muted); font-size: 12px; }
|
|
44
|
+
.pill { font-size: 11px; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; font-weight: 600; }
|
|
45
|
+
.level-fatal { background: var(--fatal); color: #fff; }
|
|
46
|
+
.level-error { background: var(--error); color: #fff; }
|
|
47
|
+
.level-warning { background: var(--warning); color: #1d1127; }
|
|
48
|
+
.level-info { background: var(--info); color: #fff; }
|
|
49
|
+
.level-debug, .level-muted { background: var(--debug); color: #fff; }
|
|
50
|
+
.status-unresolved { background: #43354f; color: var(--text); }
|
|
51
|
+
.status-resolved { background: var(--resolved); color: #fff; }
|
|
52
|
+
.status-ignored, .status-muted { background: var(--ignored); color: #fff; }
|
|
53
|
+
.detail-title { margin: 0 0 4px; font-size: 20px; }
|
|
54
|
+
.detail-sub { color: var(--muted); margin-bottom: 16px; }
|
|
55
|
+
.detail-stats { display: flex; gap: 26px; margin-bottom: 22px; }
|
|
56
|
+
.detail-stats .stat-label { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }
|
|
57
|
+
.detail-stats .stat-value { font-size: 18px; font-weight: 600; }
|
|
58
|
+
.stacktrace { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
|
|
59
|
+
.frame { display: flex; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 12px; }
|
|
60
|
+
.frame:last-child { border-bottom: none; }
|
|
61
|
+
.frame-fn { color: var(--accent); }
|
|
62
|
+
.frame-file { color: var(--muted); }
|
|
63
|
+
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
64
|
+
.tag { background: var(--panel); border: 1px solid var(--border); padding: 4px 8px; border-radius: 4px; font-size: 12px; }
|
|
65
|
+
.empty { color: var(--muted); padding: 24px; text-align: center; }
|
|
66
|
+
.screen-title { margin: 0 0 16px; }
|
|
67
|
+
.release-row, .project-row { display: flex; gap: 18px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
|
|
68
|
+
.release-version, .project-name { font-weight: 600; min-width: 200px; }
|
|
69
|
+
.release-commits, .release-date, .project-slug, .project-platform { color: var(--muted); font-size: 13px; }
|
|
70
|
+
h3 { margin: 22px 0 10px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
|
|
71
|
+
.alerts-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
|
|
72
|
+
.alert-rule-row { display: flex; gap: 18px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
|
|
73
|
+
.alert-rule-name { font-weight: 600; min-width: 200px; }
|
|
74
|
+
.alert-rule-triggers { display: flex; gap: 6px; }
|
|
75
|
+
.alert-trigger { background: #43354f; color: var(--text); }
|
|
76
|
+
.alert-rule-endpoints { color: var(--muted); font-size: 13px; }
|
|
77
|
+
.settings-section { margin-bottom: 24px; }
|
|
78
|
+
.setting-field, .dsn-row { display: flex; gap: 18px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); }
|
|
79
|
+
.setting-label, .dsn-name { color: var(--muted); min-width: 120px; }
|
|
80
|
+
.setting-value, .dsn-public { font-weight: 500; }
|
|
81
|
+
.dsn-public { color: var(--accent); font-size: 12px; }
|
|
82
|
+
.env-list { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
83
|
+
.env-item { background: var(--panel); border: 1px solid var(--border); color: var(--text); }
|
|
84
|
+
.dashboards-sub, .discover-results-note { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
|
|
85
|
+
.dashboard-row { padding: 14px; border-bottom: 1px solid var(--border); }
|
|
86
|
+
.dashboard-title { font-weight: 600; font-size: 15px; display: block; margin-bottom: 10px; }
|
|
87
|
+
.dashboard-widgets { display: flex; flex-wrap: wrap; gap: 10px; }
|
|
88
|
+
.widget-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; min-width: 160px; background: #1c1530; border: 1px solid var(--border); border-radius: 8px; }
|
|
89
|
+
.widget-title { font-weight: 500; }
|
|
90
|
+
.widget-type { background: #43354f; color: var(--text); align-self: flex-start; }
|
|
91
|
+
.discover-builder { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: #1c1530; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 14px; }
|
|
92
|
+
.discover-field { display: flex; flex-direction: column; gap: 6px; }
|
|
93
|
+
.discover-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
|
|
94
|
+
.discover-columns, .discover-query { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); background: #120c22; color: var(--text); font: inherit; }
|
|
95
|
+
.discover-columns-preview { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
96
|
+
.discover-column-chip { padding: 4px 8px; background: #2a2140; border-radius: 5px; font-size: 12px; }
|
|
97
|
+
.saved-query-row { display: flex; gap: 18px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
|
|
98
|
+
.saved-query-name { font-weight: 600; min-width: 180px; }
|
|
99
|
+
.saved-query-fields { color: var(--muted); font-size: 12px; }
|