@oneuptime/common 14.0.2 → 14.0.3
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/Models/DatabaseModels/AlertFeed.ts +2 -0
- package/Models/DatabaseModels/IncidentAlert.ts +540 -0
- package/Models/DatabaseModels/IncidentFeed.ts +2 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/Project.ts +60 -0
- package/Models/DatabaseModels/RumApplication.ts +52 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1794800000000-AddSessionReplaySameOriginTracePropagation.ts +28 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1794900000000-AddIncidentAlert.ts +89 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
- package/Server/Services/IncidentAlertService.ts +1811 -0
- package/Server/Services/IncidentService.ts +210 -10
- package/Server/Services/IncidentStateTimelineService.ts +24 -0
- package/Server/Services/Index.ts +2 -0
- package/Server/Utils/SessionReplay/SessionReplayGateCache.ts +24 -2
- package/Tests/App/Dashboard/BulkIncidentLinkActions.test.tsx +869 -0
- package/Tests/App/Dashboard/CephMetricTooltips.test.tsx +1777 -0
- package/Tests/App/Dashboard/CloudFleetSummary.test.ts +8 -0
- package/Tests/App/Dashboard/CloudMetricTooltips.test.tsx +887 -0
- package/Tests/App/Dashboard/ContainerHostMetricTooltips.test.tsx +1309 -0
- package/Tests/App/Dashboard/DiscoveryScanLivePage.test.tsx +39 -0
- package/Tests/App/Dashboard/DockerSwarmClustersListTooltips.test.tsx +414 -0
- package/Tests/App/Dashboard/DockerSwarmMetricTooltips.test.ts +796 -0
- package/Tests/App/Dashboard/DockerSwarmOverviewTooltips.test.tsx +747 -0
- package/Tests/App/Dashboard/ExceptionMonitorEnvironmentFilter.test.tsx +38 -18
- package/Tests/App/Dashboard/HostDetailViewTooltips.test.tsx +725 -0
- package/Tests/App/Dashboard/HostListColumnTooltips.test.tsx +472 -0
- package/Tests/App/Dashboard/HostMetricTooltips.test.ts +709 -0
- package/Tests/App/Dashboard/HostOverviewTooltips.test.tsx +698 -0
- package/Tests/App/Dashboard/HostTooltipHarness.ts +124 -0
- package/Tests/App/Dashboard/HostsListTooltips.test.tsx +395 -0
- package/Tests/App/Dashboard/IncidentAlertLinkDialog.test.tsx +691 -0
- package/Tests/App/Dashboard/IncidentAlertLinkHelpers.test.ts +458 -0
- package/Tests/App/Dashboard/IncidentAlertLinkPages.test.tsx +828 -0
- package/Tests/App/Dashboard/IncidentAlertLinkSideMenus.test.tsx +231 -0
- package/Tests/App/Dashboard/IncidentCreateFromAlerts.test.tsx +689 -0
- package/Tests/App/Dashboard/IoTMetricTooltips.test.tsx +1123 -0
- package/Tests/App/Dashboard/KubernetesClusterMetricTooltips.test.ts +837 -0
- package/Tests/App/Dashboard/KubernetesClusterOverviewTooltips.test.tsx +699 -0
- package/Tests/App/Dashboard/KubernetesContainersTabTooltips.test.tsx +320 -0
- package/Tests/App/Dashboard/KubernetesCostTooltips.test.tsx +502 -0
- package/Tests/App/Dashboard/KubernetesInsightsTooltips.test.tsx +222 -0
- package/Tests/App/Dashboard/KubernetesResourceMetricTooltips.test.ts +561 -0
- package/Tests/App/Dashboard/KubernetesResourcePagesTooltips.test.tsx +1168 -0
- package/Tests/App/Dashboard/LinkIncidentAlertModal.test.tsx +154 -0
- package/Tests/App/Dashboard/MetricDescriptionRules.ts +170 -0
- package/Tests/App/Dashboard/MetricDescriptionsCatalog.test.ts +206 -0
- package/Tests/App/Dashboard/MetricDescriptionsConsistency.test.ts +275 -0
- package/Tests/App/Dashboard/NetworkDeviceTooltips.test.tsx +852 -0
- package/Tests/App/Dashboard/NetworkDiagnosticsTooltips.test.tsx +556 -0
- package/Tests/App/Dashboard/NetworkMetricTooltips.test.ts +1348 -0
- package/Tests/App/Dashboard/NetworkSiteTooltips.test.tsx +679 -0
- package/Tests/App/Dashboard/ProxmoxMetricTooltips.test.ts +592 -0
- package/Tests/App/Dashboard/ProxmoxOverviewTooltips.test.tsx +1002 -0
- package/Tests/App/Dashboard/ProxmoxResourcePageTooltips.test.tsx +923 -0
- package/Tests/App/Dashboard/ResourceOverviewTileTooltips.test.tsx +1066 -0
- package/Tests/App/Dashboard/RumOverviewPage.test.tsx +1195 -0
- package/Tests/App/Dashboard/ServerlessMetricTooltips.test.tsx +474 -0
- package/Tests/App/Dashboard/ServiceMetricTooltips.test.tsx +772 -0
- package/Tests/App/Dashboard/SessionReplayAuditTable.test.tsx +56 -1
- package/Tests/App/Dashboard/TelemetryMetricsSignals.test.ts +1207 -0
- package/Tests/App/Dashboard/TelemetryResourceTabTooltips.test.tsx +437 -0
- package/Tests/App/Dashboard/VMwareMetricTooltips.test.ts +801 -0
- package/Tests/App/Dashboard/VMwareOverviewTooltips.test.tsx +601 -0
- package/Tests/App/Dashboard/VMwareResourcePagesTooltips.test.tsx +646 -0
- package/Tests/App/Dashboard/VMwareTooltipHarness.ts +145 -0
- package/Tests/Models/DatabaseModels/IncidentAlertModel.test.ts +554 -0
- package/Tests/Models/DatabaseModels/SessionReplayModels.test.ts +117 -0
- package/Tests/Server/Infrastructure/Postgres/AddIncidentAlertMigration.test.ts +341 -0
- package/Tests/Server/Infrastructure/Postgres/AddSessionReplaySameOriginTracePropagationMigration.test.ts +247 -0
- package/Tests/Server/Services/IncidentAlertPostgres.test.ts +903 -0
- package/Tests/Server/Services/IncidentAlertRegistration.test.ts +96 -0
- package/Tests/Server/Services/IncidentAlertService.test.ts +2225 -0
- package/Tests/Server/Services/IncidentAlertStateCascade.test.ts +970 -0
- package/Tests/Server/Services/IncidentCreateFromAlerts.test.ts +1284 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayGateCachePolicy.test.ts +103 -0
- package/Tests/Types/Rum/WebVitals.test.ts +173 -0
- package/Tests/UI/Components/FieldLabelInfoCardTooltip.test.tsx +413 -0
- package/Tests/UI/Components/InfoTooltip.test.tsx +242 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableBulkDelete.test.tsx +207 -3
- package/Tests/UI/Components/ModelTable/BaseModelTableBulkDeleteVerb.test.tsx +367 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableCreateButtonTitle.test.tsx +275 -0
- package/Tests/UI/Components/TableHeaderTooltip.test.tsx +662 -0
- package/Tests/UI/Rum/PrivacySummaryCard.test.tsx +166 -9
- package/Tests/UI/Rum/RecordingHealthTooltips.test.tsx +447 -0
- package/Tests/UI/Rum/ReplayCorrelationPanel.test.tsx +164 -0
- package/Tests/UI/Rum/ReplayFrameCapture.test.ts +6750 -0
- package/Tests/UI/Rum/ReplayRail.test.tsx +723 -12
- package/Tests/UI/Rum/ReplayRailDetail.test.tsx +86 -0
- package/Tests/UI/Rum/ReplayScreenshot.test.ts +2124 -0
- package/Tests/UI/Rum/ReplayScreenshotActions.test.tsx +3288 -0
- package/Tests/UI/Rum/ReplayStage.test.tsx +62 -0
- package/Tests/UI/Rum/ReplayStageOverlays.test.tsx +983 -2
- package/Tests/UI/Rum/SessionReplaySettingsPolicyLoading.test.tsx +149 -0
- package/Tests/UI/Rum/SessionReplaySetupGuide.test.tsx +107 -6
- package/Tests/UI/Rum/SessionReplayUsersTableTooltips.test.tsx +330 -0
- package/Tests/UI/Rum/UserFlowTooltips.test.tsx +886 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +10 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +2 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +76 -0
- package/Tests/Utils/Incident/IncidentFromAlerts.test.ts +696 -0
- package/Tests/Utils/Rum/SessionTraceState.test.ts +239 -0
- package/Types/Incident/IncidentAlertLink.ts +38 -0
- package/Types/Permission.ts +48 -0
- package/Types/Rum/SessionReplay.ts +25 -6
- package/Types/Rum/WebVitals.ts +52 -0
- package/UI/Components/Detail/FieldLabel.tsx +8 -0
- package/UI/Components/InfoCard/InfoCard.tsx +47 -1
- package/UI/Components/ModelTable/BaseModelTable.tsx +95 -17
- package/UI/Components/ModelTable/Column.ts +5 -0
- package/UI/Components/Table/TableHeader.tsx +47 -2
- package/UI/Components/Table/Types/Column.ts +7 -0
- package/UI/Components/Tooltip/InfoTooltip.tsx +78 -0
- package/UI/Utils/PermissionGate.ts +11 -2
- package/Utils/Incident/IncidentFromAlerts.ts +516 -0
- package/Utils/Rum/SessionTraceState.ts +212 -0
- package/build/dist/Models/DatabaseModels/AlertFeed.js +2 -0
- package/build/dist/Models/DatabaseModels/AlertFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentAlert.js +553 -0
- package/build/dist/Models/DatabaseModels/IncidentAlert.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentFeed.js +2 -0
- package/build/dist/Models/DatabaseModels/IncidentFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +62 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js +53 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794800000000-AddSessionReplaySameOriginTracePropagation.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794800000000-AddSessionReplaySameOriginTracePropagation.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794900000000-AddIncidentAlert.js +42 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1794900000000-AddIncidentAlert.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/IncidentAlertService.js +1370 -0
- package/build/dist/Server/Services/IncidentAlertService.js.map +1 -0
- package/build/dist/Server/Services/IncidentService.js +164 -12
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +21 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +2 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCache.js +8 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCache.js.map +1 -1
- package/build/dist/Types/Incident/IncidentAlertLink.js +34 -0
- package/build/dist/Types/Incident/IncidentAlertLink.js.map +1 -0
- package/build/dist/Types/Permission.js +42 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Rum/WebVitals.js +25 -0
- package/build/dist/Types/Rum/WebVitals.js.map +1 -1
- package/build/dist/UI/Components/Detail/FieldLabel.js +2 -0
- package/build/dist/UI/Components/Detail/FieldLabel.js.map +1 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js +22 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +66 -14
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/Table/TableHeader.js +18 -2
- package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
- package/build/dist/UI/Components/Tooltip/InfoTooltip.js +28 -0
- package/build/dist/UI/Components/Tooltip/InfoTooltip.js.map +1 -0
- package/build/dist/UI/Utils/PermissionGate.js +4 -2
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -1
- package/build/dist/Utils/Incident/IncidentFromAlerts.js +306 -0
- package/build/dist/Utils/Incident/IncidentFromAlerts.js.map +1 -0
- package/build/dist/Utils/Rum/SessionTraceState.js +154 -0
- package/build/dist/Utils/Rum/SessionTraceState.js.map +1 -0
- package/package.json +1 -1
|
@@ -8,6 +8,8 @@ import { act, fireEvent, render, screen, within } from "@testing-library/react";
|
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { MemoryRouter } from "react-router-dom";
|
|
10
10
|
import { describe, expect, it } from "@jest/globals";
|
|
11
|
+
import fs from "fs";
|
|
12
|
+
import path from "path";
|
|
11
13
|
import { ExceptionGroupSummary } from "../../../../App/FeatureSet/Dashboard/src/Utils/ExceptionCorrelation";
|
|
12
14
|
import getJestMockFunction, { MockFunction } from "../../MockType";
|
|
13
15
|
import SessionReplayMaskingMode from "../../../Types/Rum/SessionReplayMaskingMode";
|
|
@@ -17,6 +19,9 @@ import {
|
|
|
17
19
|
} from "../../../Types/Rum/SessionReplay";
|
|
18
20
|
import ReplayCorrelationPanel, {
|
|
19
21
|
getReplayDetailsExternalUrl,
|
|
22
|
+
REPLAY_HEADER_EXCEPTION_GROUP_CAP,
|
|
23
|
+
REPLAY_HEADER_FINAL_TRACE_ID_CAP,
|
|
24
|
+
REPLAY_HEADER_LIVE_TRACE_ID_CAP,
|
|
20
25
|
ReplayCorrelationPanelProps,
|
|
21
26
|
ReplaySessionDetails,
|
|
22
27
|
} from "../../../../App/FeatureSet/Dashboard/src/Components/SessionReplay/ReplayCorrelationPanel";
|
|
@@ -207,11 +212,81 @@ describe("ReplayCorrelationPanel Session tab", () => {
|
|
|
207
212
|
expect(
|
|
208
213
|
screen.getByText(/Mobile traces and logs reach this rail/),
|
|
209
214
|
).toHaveTextContent("OneUptimeReplay.onSessionChange()");
|
|
215
|
+
/*
|
|
216
|
+
* Issue #3979 made web linking automatic; React Native did not change.
|
|
217
|
+
* Its SDK instruments no networking, so the manual hook stays, and the
|
|
218
|
+
* copy says why rather than borrowing the web's "automatic" claim.
|
|
219
|
+
*/
|
|
220
|
+
expect(
|
|
221
|
+
screen.getByText(/Mobile traces and logs reach this rail/),
|
|
222
|
+
).toHaveTextContent("adds nothing to your app's own requests");
|
|
223
|
+
expect(
|
|
224
|
+
screen.queryByTestId("details-correlation-web"),
|
|
225
|
+
).not.toBeInTheDocument();
|
|
210
226
|
expect(
|
|
211
227
|
screen.queryByText(/recorder stamps session.id on its own network/),
|
|
212
228
|
).not.toBeInTheDocument();
|
|
213
229
|
});
|
|
214
230
|
|
|
231
|
+
/*
|
|
232
|
+
* Issue #3979: a web recording links backend telemetry with no code -
|
|
233
|
+
* same-origin requests carry the session's trace context, ingest stamps
|
|
234
|
+
* spans, the rail joins logs and exceptions by trace id. The copy used
|
|
235
|
+
* to say every other signal "must add the same attribute" through
|
|
236
|
+
* onSessionChange; the hook is optional now.
|
|
237
|
+
*/
|
|
238
|
+
it("tells a web recording that backend linking is automatic and the session hook optional", () => {
|
|
239
|
+
renderPanel();
|
|
240
|
+
|
|
241
|
+
const copy: HTMLElement = screen.getByTestId("details-correlation-web");
|
|
242
|
+
|
|
243
|
+
expect(copy).toHaveTextContent("own origin");
|
|
244
|
+
expect(copy).toHaveTextContent("stamped with its id at ingest");
|
|
245
|
+
expect(copy).toHaveTextContent("by trace id");
|
|
246
|
+
expect(copy).toHaveTextContent("no code needed");
|
|
247
|
+
expect(copy).toHaveTextContent("Trace propagation origins");
|
|
248
|
+
expect(copy).toHaveTextContent(
|
|
249
|
+
"OneUptimeReplay.onSessionChange() is optional",
|
|
250
|
+
);
|
|
251
|
+
expect(copy).not.toHaveTextContent("must add");
|
|
252
|
+
expect(copy).not.toHaveTextContent("Signals are matched using session.id");
|
|
253
|
+
expect(copy).not.toHaveTextContent(
|
|
254
|
+
/recorder stamps session.id on its own network/,
|
|
255
|
+
);
|
|
256
|
+
expect(
|
|
257
|
+
screen.queryByText(/Mobile traces and logs reach this rail/),
|
|
258
|
+
).not.toBeInTheDocument();
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
/*
|
|
262
|
+
* Same-origin propagation is a per-application switch, off for anyone
|
|
263
|
+
* who followed the redirect/download fix. The copy used to state the
|
|
264
|
+
* automatic link unconditionally, so an operator with the switch off
|
|
265
|
+
* (or a session recorded with it off) was told something false and
|
|
266
|
+
* given no reason for an empty rail.
|
|
267
|
+
*/
|
|
268
|
+
it("qualifies the automatic link on a web recording with the Same-origin trace propagation switch", () => {
|
|
269
|
+
renderPanel();
|
|
270
|
+
|
|
271
|
+
const copy: HTMLElement = screen.getByTestId("details-correlation-web");
|
|
272
|
+
|
|
273
|
+
expect(copy).toHaveTextContent(
|
|
274
|
+
"carry the session's trace context automatically, unless Same-origin trace propagation is turned off in the Replay Policy, so backend spans are stamped",
|
|
275
|
+
);
|
|
276
|
+
/* The switch is named the way the Replay Policy page titles it. */
|
|
277
|
+
expect(
|
|
278
|
+
within(copy).getByText("Same-origin trace propagation").tagName,
|
|
279
|
+
).toBe("EM");
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
it("does not mention the web-only switch on a mobile recording", () => {
|
|
283
|
+
renderPanel({ details: makeDetails({ recorderKind: "rn-view-tree" }) });
|
|
284
|
+
|
|
285
|
+
expect(
|
|
286
|
+
screen.getByText(/Mobile traces and logs reach this rail/),
|
|
287
|
+
).not.toHaveTextContent("Same-origin trace propagation");
|
|
288
|
+
});
|
|
289
|
+
|
|
215
290
|
it("organizes metadata into named, semantic sections", () => {
|
|
216
291
|
renderPanel();
|
|
217
292
|
|
|
@@ -701,6 +776,95 @@ describe("ReplayCorrelationPanel Session tab", () => {
|
|
|
701
776
|
).toBeInTheDocument();
|
|
702
777
|
});
|
|
703
778
|
|
|
779
|
+
/*
|
|
780
|
+
* The copy under the lists said "capped at 50" long after the header
|
|
781
|
+
* kept 100 trace ids while live and 200 once finalized. The numbers are
|
|
782
|
+
* now named constants, pinned below against the server sources.
|
|
783
|
+
*/
|
|
784
|
+
it("quotes the header caps that apply to a finalized session", () => {
|
|
785
|
+
renderPanel({
|
|
786
|
+
details: makeDetails({
|
|
787
|
+
isFinalized: true,
|
|
788
|
+
traceIds: ["4bf92f3577b34da6a3ce929d0e0e4736"],
|
|
789
|
+
exceptionFingerprints: ["fp-1"],
|
|
790
|
+
}),
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
const caps: HTMLElement = screen.getByTestId("details-correlation-caps");
|
|
794
|
+
|
|
795
|
+
expect(caps).toHaveTextContent(
|
|
796
|
+
"The session header keeps at most 200 trace IDs and 100 exception groups; the rail queries your telemetry directly, so it is not limited to these.",
|
|
797
|
+
);
|
|
798
|
+
expect(caps).not.toHaveTextContent("50");
|
|
799
|
+
});
|
|
800
|
+
|
|
801
|
+
it("quotes the live cap, and the final one, while the session is not finalized", () => {
|
|
802
|
+
renderPanel({
|
|
803
|
+
details: makeDetails({
|
|
804
|
+
isFinalized: false,
|
|
805
|
+
traceIds: ["4bf92f3577b34da6a3ce929d0e0e4736"],
|
|
806
|
+
}),
|
|
807
|
+
});
|
|
808
|
+
|
|
809
|
+
const caps: HTMLElement = screen.getByTestId("details-correlation-caps");
|
|
810
|
+
|
|
811
|
+
expect(caps).toHaveTextContent(
|
|
812
|
+
"While the session is live its header keeps at most 100 trace IDs (200 once it is finalized, with up to 100 exception groups)",
|
|
813
|
+
);
|
|
814
|
+
expect(caps).not.toHaveTextContent("capped at 50");
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
it("says nothing about caps when the header carries no ids", () => {
|
|
818
|
+
renderPanel({
|
|
819
|
+
details: makeDetails({ traceIds: [], exceptionFingerprints: [] }),
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
expect(
|
|
823
|
+
screen.queryByTestId("details-correlation-caps"),
|
|
824
|
+
).not.toBeInTheDocument();
|
|
825
|
+
});
|
|
826
|
+
|
|
827
|
+
it("restates the caps the ingest and the finalizer actually enforce", () => {
|
|
828
|
+
const appRoot: string = path.resolve(__dirname, "../../../../App");
|
|
829
|
+
const ingest: string = fs.readFileSync(
|
|
830
|
+
path.join(
|
|
831
|
+
appRoot,
|
|
832
|
+
"FeatureSet/Telemetry/Services/SessionReplayIngestService.ts",
|
|
833
|
+
),
|
|
834
|
+
"utf8",
|
|
835
|
+
);
|
|
836
|
+
const finalizer: string = fs.readFileSync(
|
|
837
|
+
path.join(appRoot, "FeatureSet/Workers/Jobs/Rum/FinalizeSessions.ts"),
|
|
838
|
+
"utf8",
|
|
839
|
+
);
|
|
840
|
+
|
|
841
|
+
const readConstant: (source: string, name: string) => number = (
|
|
842
|
+
source: string,
|
|
843
|
+
name: string,
|
|
844
|
+
): number => {
|
|
845
|
+
const match: RegExpMatchArray | null = source.match(
|
|
846
|
+
new RegExp(`${name}: number = (\\d+);`),
|
|
847
|
+
);
|
|
848
|
+
|
|
849
|
+
expect([name, match !== null]).toEqual([name, true]);
|
|
850
|
+
|
|
851
|
+
return Number((match as RegExpMatchArray)[1]);
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
expect(readConstant(ingest, "PROVISIONAL_HEADER_MAX_TRACE_IDS")).toBe(
|
|
855
|
+
REPLAY_HEADER_LIVE_TRACE_ID_CAP,
|
|
856
|
+
);
|
|
857
|
+
expect(readConstant(finalizer, "MAX_TRACE_IDS_PER_SESSION")).toBe(
|
|
858
|
+
REPLAY_HEADER_FINAL_TRACE_ID_CAP,
|
|
859
|
+
);
|
|
860
|
+
expect(
|
|
861
|
+
readConstant(finalizer, "MAX_EXCEPTION_FINGERPRINTS_PER_SESSION"),
|
|
862
|
+
).toBe(REPLAY_HEADER_EXCEPTION_GROUP_CAP);
|
|
863
|
+
|
|
864
|
+
/* The provisional header never carries exception groups at all. */
|
|
865
|
+
expect(ingest).toContain("exceptionFingerprints: [],");
|
|
866
|
+
});
|
|
867
|
+
|
|
704
868
|
/*
|
|
705
869
|
* correlation-7: the panel used to render the bare fingerprint hash and
|
|
706
870
|
* link it to a filtered list. It resolves the groups in one lookup now,
|