@spotlightjs/overlay 2.14.1 → 2.15.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.
@@ -0,0 +1,2 @@
1
+ declare function Profiles(): import("react/jsx-runtime").JSX.Element;
2
+ export default Profiles;
@@ -1 +1,3 @@
1
- export default function EnvelopeList(): import("react/jsx-runtime").JSX.Element;
1
+ export default function EnvelopeList({ showAll }: {
2
+ showAll: boolean;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,3 @@
1
- export default function EnvelopesTab(): import("react/jsx-runtime").JSX.Element;
1
+ export default function EnvelopesTab(props: {
2
+ showAll: boolean;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -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 {};
@@ -0,0 +1,4 @@
1
+ export declare const ERROR_EVENT_TYPES: Set<string>;
2
+ export declare const TRACE_EVENT_TYPES: Set<string>;
3
+ export declare const PROFILE_EVENT_TYPES: Set<string>;
4
+ export declare const SUPPORTED_EVENT_TYPES: Set<string>;
@@ -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
- timeSpent: string;
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
- timeSpent: string;
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
- timeSpent: string;
90
+ totalTime: string;
74
91
  };
75
92
  export declare const QUERY_SUMMARY_HEADERS: ({
76
93
  id: string;
@@ -1,10 +1,11 @@
1
- import { Span, Trace } from '../types';
2
- import { SentryProfileWithTraceMeta } from './sentryDataCache';
1
+ import { EventFrame, Span, Trace } from '../types';
2
+ import { SentryProfileWithTraceMeta } from './sentryStore';
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, profile?: SentryProfileWithTraceMeta): void;
11
+ export declare function graftProfileSpans(trace: Trace, profile?: SentryProfileWithTraceMeta, spanTree?: Span[], parent?: Span | Trace): void;
@@ -0,0 +1,57 @@
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
+ type OnlineSubscription = ['online', (status: boolean) => void];
10
+ type EventSubscription = ['event', (event: SentryEvent) => void];
11
+ type TraceSubscription = ['trace', (trace: Trace) => void];
12
+ type Subscription = OnlineSubscription | EventSubscription | TraceSubscription;
13
+ interface SentryStoreState {
14
+ events: SentryEvent[];
15
+ eventIds: Set<string>;
16
+ sdks: Sdk[];
17
+ traces: Trace[];
18
+ tracesById: Map<string, Trace>;
19
+ profilesByTraceId: Map<string, SentryProfileWithTraceMeta>;
20
+ localTraceIds: Set<string>;
21
+ envelopes: Array<{
22
+ envelope: Envelope;
23
+ rawEnvelope: RawEventContext;
24
+ }>;
25
+ contextLinesProvider: string;
26
+ subscribers: Map<string, Subscription>;
27
+ }
28
+ interface SentryStoreActions {
29
+ pushEnvelope: (params: {
30
+ envelope: Envelope;
31
+ rawEnvelope: RawEventContext;
32
+ }) => number;
33
+ pushEvent: (event: SentryEvent & {
34
+ event_id?: string;
35
+ }) => Promise<void>;
36
+ resetData: () => void;
37
+ trackLocalTrace: (traceId: string) => void;
38
+ isTraceLocal: (traceId: string) => boolean | null;
39
+ getEvents: () => SentryEvent[];
40
+ getTraces: () => Trace[];
41
+ getSdks: () => Sdk[];
42
+ getEnvelopes: () => Array<{
43
+ envelope: Envelope;
44
+ rawEnvelope: RawEventContext;
45
+ }>;
46
+ getEventById: (id: string) => SentryEvent | undefined;
47
+ getTraceById: (id: string) => Trace | undefined;
48
+ getProfileByTraceId: (id: string) => SentryProfileWithTraceMeta | undefined;
49
+ getEventsByTrace: (traceId: string, spanId?: string | null) => SentryEvent[];
50
+ getAggregateCallData: () => AggregateCallData[];
51
+ setSidecarUrl: (url: string) => void;
52
+ inferSdkFromEvent: (event: SentryEvent) => Sdk;
53
+ processStacktrace: (errorEvent: SentryErrorEvent) => Promise<void[]>;
54
+ subscribe: (...args: Subscription) => () => void;
55
+ }
56
+ declare const useSentryStore: import('zustand').UseBoundStore<import('zustand').StoreApi<SentryStoreState & SentryStoreActions>>;
57
+ export default useSentryStore;
@@ -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?: string;
90
- span_id: string;
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;