@spotlightjs/overlay 2.15.0 → 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.
@@ -1,5 +1,5 @@
1
+ import { SentryProfileWithTraceMeta } from '../store/types';
1
2
  import { EventFrame, Span, Trace } from '../types';
2
- import { SentryProfileWithTraceMeta } from './sentryStore';
3
3
 
4
4
  export declare function getFunctionNameFromFrame(frame: EventFrame): string;
5
5
  export declare function getSpansFromProfile(trace: Trace, profile: SentryProfileWithTraceMeta, parent_span_id: string | undefined, startTs: number, endTs: number, threadIds: Set<string>): Span[];
@@ -0,0 +1,2 @@
1
+ export declare function isLocalTrace(traceId: string): boolean | null;
2
+ export declare function getLocalTraces(): import('../types').Trace[];
@@ -0,0 +1,3 @@
1
+ import { default as store } from './store';
2
+
3
+ export default store;
@@ -0,0 +1,4 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { EnvelopesSliceActions, EnvelopesSliceState, SentryStore } from '../types';
3
+
4
+ export declare const createEnvelopesSlice: StateCreator<SentryStore, [], [], EnvelopesSliceState & EnvelopesSliceActions>;
@@ -0,0 +1,4 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { EventsSliceActions, EventsSliceState, SentryStore } from '../types';
3
+
4
+ export declare const createEventsSlice: StateCreator<SentryStore, [], [], EventsSliceState & EventsSliceActions>;
@@ -0,0 +1,4 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { ProfilesSliceActions, ProfilesSliceState, SentryStore } from '../types';
3
+
4
+ export declare const createProfilesSlice: StateCreator<SentryStore, [], [], ProfilesSliceState & ProfilesSliceActions>;
@@ -0,0 +1,4 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { SDKsSliceActions, SDKsSliceState, SentryStore } from '../types';
3
+
4
+ export declare const createSDKsSlice: StateCreator<SentryStore, [], [], SDKsSliceState & SDKsSliceActions>;
@@ -0,0 +1,6 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { SentryStore, SettingsSliceActions, SettingsSliceState } from '../types';
3
+
4
+ export declare const createSettingsSlice: StateCreator<SentryStore, [
5
+ ], [
6
+ ], SettingsSliceState & SettingsSliceActions>;
@@ -0,0 +1,4 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { SentryStore, SharedSliceActions } from '../types';
3
+
4
+ export declare const createSharedSlice: StateCreator<SentryStore, [], [], SharedSliceActions>;
@@ -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 { StateCreator } from 'zustand';
2
+ import { SentryStore, TracesSliceActions, TracesSliceState } from '../types';
3
+
4
+ export declare const createTracesSlice: StateCreator<SentryStore, [], [], TracesSliceState & TracesSliceActions>;
@@ -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;
@@ -6,52 +6,78 @@ export type SentryProfileWithTraceMeta = SentryProcessedProfile & {
6
6
  timestamp: number;
7
7
  active_thread_id: string;
8
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 {
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
14
  events: SentryEvent[];
15
15
  eventIds: Set<string>;
16
- sdks: Sdk[];
16
+ }
17
+ export interface EventsSliceActions {
18
+ pushEvent: (event: SentryEvent & {
19
+ event_id?: string;
20
+ }) => Promise<void>;
21
+ getEvents: () => SentryEvent[];
22
+ }
23
+ export interface TracesSliceState {
17
24
  traces: Trace[];
18
25
  tracesById: Map<string, Trace>;
19
- profilesByTraceId: Map<string, SentryProfileWithTraceMeta>;
20
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 {
21
52
  envelopes: Array<{
22
53
  envelope: Envelope;
23
54
  rawEnvelope: RawEventContext;
24
55
  }>;
25
- contextLinesProvider: string;
26
- subscribers: Map<string, Subscription>;
27
56
  }
28
- interface SentryStoreActions {
57
+ export interface EnvelopesSliceActions {
29
58
  pushEnvelope: (params: {
30
59
  envelope: Envelope;
31
60
  rawEnvelope: RawEventContext;
32
61
  }) => 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
62
  getEnvelopes: () => Array<{
43
63
  envelope: Envelope;
44
64
  rawEnvelope: RawEventContext;
45
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 {
46
75
  getEventById: (id: string) => SentryEvent | undefined;
47
76
  getTraceById: (id: string) => Trace | undefined;
48
- getProfileByTraceId: (id: string) => SentryProfileWithTraceMeta | undefined;
49
77
  getEventsByTrace: (traceId: string, spanId?: string | null) => SentryEvent[];
50
- getAggregateCallData: () => AggregateCallData[];
51
- setSidecarUrl: (url: string) => void;
52
- inferSdkFromEvent: (event: SentryEvent) => Sdk;
53
78
  processStacktrace: (errorEvent: SentryErrorEvent) => Promise<void[]>;
54
- subscribe: (...args: Subscription) => () => void;
79
+ resetData: () => void;
55
80
  }
56
- declare const useSentryStore: import('zustand').UseBoundStore<import('zustand').StoreApi<SentryStoreState & SentryStoreActions>>;
57
- export default useSentryStore;
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;
@@ -0,0 +1,2 @@
1
+ export declare function toTimestamp(date: string | number): number;
2
+ export declare function relativeNsToTimestamp(startTs: number, ns: number | string): number;