@spotlightjs/overlay 2.14.1 → 2.15.1
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/dist/integrations/sentry/components/insights/Profiles.d.ts +2 -0
- package/dist/integrations/sentry/components/insights/envelopes/EnvelopeList.d.ts +3 -1
- package/dist/integrations/sentry/components/insights/envelopes/index.d.ts +3 -1
- package/dist/integrations/sentry/components/shared/TimeBar.d.ts +9 -0
- package/dist/integrations/sentry/constants/sentry.d.ts +4 -0
- package/dist/integrations/sentry/constants.d.ts +20 -3
- package/dist/integrations/sentry/data/profiles.d.ts +4 -3
- package/dist/integrations/sentry/store/helpers.d.ts +2 -0
- package/dist/integrations/sentry/store/index.d.ts +3 -0
- package/dist/integrations/sentry/store/slices/envelopesSlice.d.ts +4 -0
- package/dist/integrations/sentry/store/slices/eventsSlice.d.ts +4 -0
- package/dist/integrations/sentry/store/slices/profilesSlice.d.ts +4 -0
- package/dist/integrations/sentry/store/slices/sdksSlice.d.ts +4 -0
- package/dist/integrations/sentry/store/slices/settingsSlice.d.ts +6 -0
- package/dist/integrations/sentry/store/slices/sharedSlice.d.ts +4 -0
- package/dist/integrations/sentry/store/slices/subscriptionsSlice.d.ts +6 -0
- package/dist/integrations/sentry/store/slices/tracesSlice.d.ts +4 -0
- package/dist/integrations/sentry/store/store.d.ts +4 -0
- package/dist/integrations/sentry/store/types.d.ts +83 -0
- package/dist/integrations/sentry/store/utils.d.ts +2 -0
- package/dist/integrations/sentry/types.d.ts +10 -2
- package/dist/integrations/sentry/utils/sentry.d.ts +5 -0
- package/dist/sentry-spotlight.iife.js +106 -106
- package/dist/sentry-spotlight.iife.js.map +1 -1
- package/dist/sentry-spotlight.js +10323 -10166
- package/dist/sentry-spotlight.js.map +1 -1
- package/dist/sentry-spotlight.umd.cjs +106 -106
- package/dist/sentry-spotlight.umd.cjs.map +1 -1
- package/package.json +3 -2
- package/dist/integrations/sentry/data/sentryDataCache.d.ts +0 -76
- package/dist/integrations/sentry/data/useSentryHelpers.d.ts +0 -3
- /package/dist/integrations/sentry/{data/sentryDataCache.spec.d.ts → store/store.spec.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type TimeBarProps = {
|
|
2
|
+
value: number;
|
|
3
|
+
maxValue: number;
|
|
4
|
+
title?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function TimeBar({ value, maxValue, title, children, className }: TimeBarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
export declare const DB_SPAN_REGEX: RegExp;
|
|
2
|
+
export declare const AGGREGATE_CALL_PROFILES_SORT_KEYS: {
|
|
3
|
+
functionName: string;
|
|
4
|
+
totalTime: string;
|
|
5
|
+
samples: string;
|
|
6
|
+
traces: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const AGGREGATE_PROFILES_HEADERS: ({
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
sortKey: string;
|
|
12
|
+
primary: boolean;
|
|
13
|
+
} | {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
sortKey: string;
|
|
17
|
+
primary?: undefined;
|
|
18
|
+
})[];
|
|
2
19
|
export declare const RESOURCES_SORT_KEYS: {
|
|
3
20
|
avgDuration: string;
|
|
4
|
-
|
|
21
|
+
totalTime: string;
|
|
5
22
|
description: string;
|
|
6
23
|
avgEncodedSize: string;
|
|
7
24
|
};
|
|
@@ -18,7 +35,7 @@ export declare const RESOURCE_HEADERS: ({
|
|
|
18
35
|
})[];
|
|
19
36
|
export declare const QUERIES_SORT_KEYS: {
|
|
20
37
|
queryDesc: string;
|
|
21
|
-
|
|
38
|
+
totalTime: string;
|
|
22
39
|
avgDuration: string;
|
|
23
40
|
};
|
|
24
41
|
export declare const QUERIES_HEADERS: ({
|
|
@@ -70,7 +87,7 @@ export declare const TRANSACTION_SUMMARY_TABLE_HEADERS: ({
|
|
|
70
87
|
export declare const QUERY_SUMMARY_SORT_KEYS: {
|
|
71
88
|
foundIn: string;
|
|
72
89
|
spanId: string;
|
|
73
|
-
|
|
90
|
+
totalTime: string;
|
|
74
91
|
};
|
|
75
92
|
export declare const QUERY_SUMMARY_HEADERS: ({
|
|
76
93
|
id: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SentryProfileWithTraceMeta } from '../store/types';
|
|
2
|
+
import { EventFrame, Span, Trace } from '../types';
|
|
3
3
|
|
|
4
|
+
export declare function getFunctionNameFromFrame(frame: EventFrame): string;
|
|
4
5
|
export declare function getSpansFromProfile(trace: Trace, profile: SentryProfileWithTraceMeta, parent_span_id: string | undefined, startTs: number, endTs: number, threadIds: Set<string>): Span[];
|
|
5
6
|
/**
|
|
6
7
|
* Modifies the spanTree in place recursively by adding spans from the
|
|
7
8
|
* profile data where there are gaps in the trace data.
|
|
8
9
|
* @param spanTree Span[] The tree of spans to graft profile spans into
|
|
9
10
|
*/
|
|
10
|
-
export declare function graftProfileSpans(trace: Trace, spanTree?: Span[], parent?: Span | Trace
|
|
11
|
+
export declare function graftProfileSpans(trace: Trace, profile?: SentryProfileWithTraceMeta, spanTree?: Span[], parent?: Span | Trace): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StateCreator } from 'zustand';
|
|
2
|
+
import { SentryStore, SubscriptionsSliceActions, SubscriptionsSliceState } from '../types';
|
|
3
|
+
|
|
4
|
+
export declare const createSubscriptionsSlice: StateCreator<SentryStore, [
|
|
5
|
+
], [
|
|
6
|
+
], SubscriptionsSliceState & SubscriptionsSliceActions>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SharedSliceActions } from './types';
|
|
2
|
+
|
|
3
|
+
declare const useSentryStore: import('zustand').UseBoundStore<import('zustand').StoreApi<import('./types').EventsSliceState & import('./types').TracesSliceState & import('./types').ProfilesSliceState & import('./types').SubscriptionsSliceState & import('./types').SettingsSliceState & import('./types').EnvelopesSliceState & import('./types').SDKsSliceState & import('./types').EventsSliceActions & import('./types').TracesSliceActions & import('./types').ProfilesSliceActions & import('./types').SubscriptionsSliceActions & import('./types').SettingsSliceActions & import('./types').EnvelopesSliceActions & import('./types').SDKsSliceActions & SharedSliceActions>>;
|
|
4
|
+
export default useSentryStore;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Envelope } from '@sentry/core';
|
|
2
|
+
import { RawEventContext } from '../../integration';
|
|
3
|
+
import { AggregateCallData, Sdk, SentryErrorEvent, SentryEvent, SentryProcessedProfile, Trace } from '../types';
|
|
4
|
+
|
|
5
|
+
export type SentryProfileWithTraceMeta = SentryProcessedProfile & {
|
|
6
|
+
timestamp: number;
|
|
7
|
+
active_thread_id: string;
|
|
8
|
+
};
|
|
9
|
+
export type OnlineSubscription = ['online', (status: boolean) => void];
|
|
10
|
+
export type EventSubscription = ['event', (event: SentryEvent) => void];
|
|
11
|
+
export type TraceSubscription = ['trace', (trace: Trace) => void];
|
|
12
|
+
export type Subscription = OnlineSubscription | EventSubscription | TraceSubscription;
|
|
13
|
+
export interface EventsSliceState {
|
|
14
|
+
events: SentryEvent[];
|
|
15
|
+
eventIds: Set<string>;
|
|
16
|
+
}
|
|
17
|
+
export interface EventsSliceActions {
|
|
18
|
+
pushEvent: (event: SentryEvent & {
|
|
19
|
+
event_id?: string;
|
|
20
|
+
}) => Promise<void>;
|
|
21
|
+
getEvents: () => SentryEvent[];
|
|
22
|
+
}
|
|
23
|
+
export interface TracesSliceState {
|
|
24
|
+
traces: Trace[];
|
|
25
|
+
tracesById: Map<string, Trace>;
|
|
26
|
+
localTraceIds: Set<string>;
|
|
27
|
+
}
|
|
28
|
+
export interface TracesSliceActions {
|
|
29
|
+
trackLocalTrace: (traceId: string) => void;
|
|
30
|
+
getTraces: () => Trace[];
|
|
31
|
+
}
|
|
32
|
+
export interface ProfilesSliceState {
|
|
33
|
+
profilesByTraceId: Map<string, SentryProfileWithTraceMeta>;
|
|
34
|
+
}
|
|
35
|
+
export interface ProfilesSliceActions {
|
|
36
|
+
getProfileByTraceId: (id: string) => SentryProfileWithTraceMeta | undefined;
|
|
37
|
+
getAggregateCallData: () => AggregateCallData[];
|
|
38
|
+
}
|
|
39
|
+
export interface SubscriptionsSliceState {
|
|
40
|
+
subscribers: Map<string, Subscription>;
|
|
41
|
+
}
|
|
42
|
+
export interface SubscriptionsSliceActions {
|
|
43
|
+
subscribe: (...args: Subscription) => () => void;
|
|
44
|
+
}
|
|
45
|
+
export interface SettingsSliceState {
|
|
46
|
+
contextLinesProvider: string;
|
|
47
|
+
}
|
|
48
|
+
export interface SettingsSliceActions {
|
|
49
|
+
setSidecarUrl: (url: string) => void;
|
|
50
|
+
}
|
|
51
|
+
export interface EnvelopesSliceState {
|
|
52
|
+
envelopes: Array<{
|
|
53
|
+
envelope: Envelope;
|
|
54
|
+
rawEnvelope: RawEventContext;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
export interface EnvelopesSliceActions {
|
|
58
|
+
pushEnvelope: (params: {
|
|
59
|
+
envelope: Envelope;
|
|
60
|
+
rawEnvelope: RawEventContext;
|
|
61
|
+
}) => number;
|
|
62
|
+
getEnvelopes: () => Array<{
|
|
63
|
+
envelope: Envelope;
|
|
64
|
+
rawEnvelope: RawEventContext;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
export interface SDKsSliceState {
|
|
68
|
+
sdks: Sdk[];
|
|
69
|
+
}
|
|
70
|
+
export interface SDKsSliceActions {
|
|
71
|
+
inferSdkFromEvent: (event: SentryEvent) => Sdk;
|
|
72
|
+
getSdks: () => Sdk[];
|
|
73
|
+
}
|
|
74
|
+
export interface SharedSliceActions {
|
|
75
|
+
getEventById: (id: string) => SentryEvent | undefined;
|
|
76
|
+
getTraceById: (id: string) => Trace | undefined;
|
|
77
|
+
getEventsByTrace: (traceId: string, spanId?: string | null) => SentryEvent[];
|
|
78
|
+
processStacktrace: (errorEvent: SentryErrorEvent) => Promise<void[]>;
|
|
79
|
+
resetData: () => void;
|
|
80
|
+
}
|
|
81
|
+
export type SentryStoreState = EventsSliceState & TracesSliceState & ProfilesSliceState & SubscriptionsSliceState & SettingsSliceState & EnvelopesSliceState & SDKsSliceState;
|
|
82
|
+
export type SentryStoreActions = EventsSliceActions & TracesSliceActions & ProfilesSliceActions & SubscriptionsSliceActions & SettingsSliceActions & EnvelopesSliceActions & SDKsSliceActions & SharedSliceActions;
|
|
83
|
+
export type SentryStore = SentryStoreState & SentryStoreActions;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EventEnvelopeHeaders, Measurements } from '@sentry/core';
|
|
2
2
|
|
|
3
|
+
export type TraceId = string;
|
|
4
|
+
export type SpanId = string;
|
|
3
5
|
export type FrameVars = {
|
|
4
6
|
[key: string]: string;
|
|
5
7
|
};
|
|
@@ -86,8 +88,8 @@ export type SentryErrorEvent = CommonEventAttrs & {
|
|
|
86
88
|
exception: EventException;
|
|
87
89
|
};
|
|
88
90
|
export type Span = {
|
|
89
|
-
trace_id?:
|
|
90
|
-
span_id:
|
|
91
|
+
trace_id?: TraceId;
|
|
92
|
+
span_id: SpanId;
|
|
91
93
|
parent_span_id?: string | null;
|
|
92
94
|
op?: string | null;
|
|
93
95
|
description?: string | null;
|
|
@@ -130,6 +132,12 @@ export type SentryProfile = {
|
|
|
130
132
|
export type SentryProcessedProfile = SentryProfile & {
|
|
131
133
|
samples: ProcessedProfileSample[];
|
|
132
134
|
};
|
|
135
|
+
export type AggregateCallData = {
|
|
136
|
+
name: string;
|
|
137
|
+
totalTime: number;
|
|
138
|
+
samples: number;
|
|
139
|
+
traceIds: Set<TraceId>;
|
|
140
|
+
};
|
|
133
141
|
export type SentryDeviceInfo = {
|
|
134
142
|
architecture: string;
|
|
135
143
|
is_emulator?: boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SentryErrorEvent, SentryEvent, SentryProfileV1Event, SentryTransactionEvent } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare function isErrorEvent(event: SentryEvent): event is SentryErrorEvent;
|
|
4
|
+
export declare function isProfileEvent(event: SentryEvent): event is SentryProfileV1Event;
|
|
5
|
+
export declare function isTraceEvent(event: SentryEvent): event is SentryTransactionEvent;
|