@spotlightjs/overlay 2.12.1 → 2.13.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.
@@ -1,4 +1,4 @@
1
- import { Envelope } from '@sentry/types';
1
+ import { Envelope } from '@sentry/core';
2
2
  import { RawEventContext } from '../../../../integration';
3
3
 
4
4
  export default function EnvelopeDetails({ data }: {
@@ -2,5 +2,5 @@ type TraceTreeViewProps = {
2
2
  traceId: string;
3
3
  };
4
4
  export declare const DEFAULT_SPAN_NODE_WIDTH = 50;
5
- export default function TraceTreeview({ traceId }: TraceTreeViewProps): import("react/jsx-runtime").JSX.Element;
5
+ export default function TraceTreeview(props: TraceTreeViewProps): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,6 +1,6 @@
1
1
  import { Span, TraceContext } from '../../../../types';
2
2
 
3
- declare const SpanItem: ({ span, startTimestamp, totalDuration, depth, traceContext, totalTransactions, spanNodeWidth, setSpanNodeWidth, query, }: {
3
+ declare const SpanItem: ({ span, startTimestamp, totalDuration, depth, traceContext, totalTransactions, spanNodeWidth, setSpanNodeWidth, }: {
4
4
  span: Span;
5
5
  startTimestamp: number;
6
6
  totalDuration: number;
@@ -9,6 +9,5 @@ declare const SpanItem: ({ span, startTimestamp, totalDuration, depth, traceCont
9
9
  totalTransactions?: number;
10
10
  spanNodeWidth: number;
11
11
  setSpanNodeWidth?: (val: number) => void;
12
- query?: string;
13
12
  }) => import("react/jsx-runtime").JSX.Element;
14
13
  export default SpanItem;
@@ -1,6 +1,6 @@
1
1
  import { Span, TraceContext } from '../../../../types';
2
2
 
3
- export default function SpanTree({ traceContext, tree, startTimestamp, totalDuration, depth, totalTransactions, spanNodeWidth, setSpanNodeWidth, query, }: {
3
+ export default function SpanTree({ traceContext, tree, startTimestamp, totalDuration, depth, totalTransactions, spanNodeWidth, setSpanNodeWidth, }: {
4
4
  traceContext: TraceContext;
5
5
  tree: Span[];
6
6
  startTimestamp: number;
@@ -9,5 +9,4 @@ export default function SpanTree({ traceContext, tree, startTimestamp, totalDura
9
9
  totalTransactions?: number;
10
10
  spanNodeWidth: number;
11
11
  setSpanNodeWidth?: (val: number) => void;
12
- query?: string;
13
12
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ type SearchContextType = {
4
+ query: string;
5
+ setQuery: (query: string) => void;
6
+ };
7
+ export declare function SearchProvider({ children }: {
8
+ children: ReactNode;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export declare function useSearch(): SearchContextType;
11
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { Envelope } from '@sentry/core';
2
2
  import { RawEventContext } from '../../integration';
3
- import { Sdk, SentryErrorEvent, SentryEvent, SentryProcessedProfile, Trace } from '../types';
3
+ import { Sdk, SentryErrorEvent, SentryEvent, SentryProcessedProfile, SentryProfileV1Event, SentryTransactionEvent, Trace } from '../types';
4
4
 
5
5
  type OnlineSubscription = ['online', (status: boolean) => void];
6
6
  type EventSubscription = ['event', (event: SentryEvent) => void];
@@ -71,3 +71,6 @@ declare class SentryDataCache {
71
71
  }
72
72
  declare const _default: SentryDataCache;
73
73
  export default _default;
74
+ export declare function isErrorEvent(event: SentryEvent): event is SentryErrorEvent;
75
+ export declare function isProfileEvent(event: SentryEvent): event is SentryProfileV1Event;
76
+ export declare function isTraceEvent(event: SentryEvent): event is SentryTransactionEvent;
@@ -0,0 +1,8 @@
1
+ import { FormEvent } from 'react';
2
+
3
+ export default function useSearchInput(onSearch: (value: string) => void, delay?: number): {
4
+ inputValue: string;
5
+ showReset: boolean;
6
+ handleChange: (e: FormEvent<HTMLInputElement>) => void;
7
+ handleReset: () => void;
8
+ };
@@ -1,3 +1,4 @@
1
+ import { Envelope } from '@sentry/core';
1
2
  import { RawEventContext } from '../integration';
2
3
  import { default as ErrorsTab } from './tabs/ErrorsTab';
3
4
  import { default as ExploreTab } from './tabs/ExploreTab';
@@ -12,7 +13,7 @@ export default function sentryIntegration(options?: SentryIntegrationOptions): {
12
13
  forwardedContentType: string[];
13
14
  setup: ({ open, sidecarUrl }: import('../integration').SpotlightContext) => () => void;
14
15
  processEvent: (event: RawEventContext) => {
15
- event: import('@sentry/core').Envelope;
16
+ event: Envelope;
16
17
  rawEvent: RawEventContext;
17
18
  };
18
19
  tabs: () => ({
@@ -38,7 +39,7 @@ export default function sentryIntegration(options?: SentryIntegrationOptions): {
38
39
  * @returns parsed envelope
39
40
  */
40
41
  export declare function processEnvelope(rawEvent: RawEventContext): {
41
- event: import('@sentry/core').Envelope;
42
+ event: Envelope;
42
43
  rawEvent: RawEventContext;
43
44
  };
44
45
  export {};
@@ -1,4 +1,4 @@
1
- import { Measurements } from '@sentry/core';
1
+ import { EventEnvelopeHeaders, Measurements } from '@sentry/core';
2
2
 
3
3
  export type FrameVars = {
4
4
  [key: string]: string;
@@ -61,14 +61,13 @@ type CommonEventAttrs = {
61
61
  sdk?: Sdk;
62
62
  measurements?: Measurements;
63
63
  };
64
- export type TraceContext = {
65
- trace_id: string;
66
- span_id: string;
67
- parent_span_id?: string | null;
68
- op: string;
69
- description?: string | null;
70
- status: 'ok' | string;
71
- data?: Context;
64
+ export type TraceContext = EventEnvelopeHeaders['trace'] & {
65
+ span_id?: string;
66
+ status?: 'ok' | string;
67
+ description?: string;
68
+ parent_span_id?: string;
69
+ data?: Record<string, string>;
70
+ op?: string;
72
71
  };
73
72
  export type Contexts = {
74
73
  trace?: TraceContext;
@@ -87,7 +86,7 @@ export type SentryErrorEvent = CommonEventAttrs & {
87
86
  exception: EventException;
88
87
  };
89
88
  export type Span = {
90
- trace_id: string;
89
+ trace_id?: string;
91
90
  span_id: string;
92
91
  parent_span_id?: string | null;
93
92
  op?: string | null;
@@ -95,7 +94,7 @@ export type Span = {
95
94
  start_timestamp: number;
96
95
  tags?: Tags | null;
97
96
  timestamp: number;
98
- status: 'ok' | string;
97
+ status?: 'ok' | string;
99
98
  transaction?: SentryTransactionEvent;
100
99
  children?: Span[];
101
100
  data?: Record<string, unknown>;
@@ -162,11 +161,12 @@ export type SentryProfileV1Event = CommonEventAttrs & {
162
161
  };
163
162
  export type SentryEvent = SentryErrorEvent | SentryTransactionEvent | SentryProfileV1Event;
164
163
  export type Trace = TraceContext & {
164
+ trace_id: string;
165
165
  transactions: SentryTransactionEvent[];
166
166
  errors: number;
167
167
  start_timestamp: number;
168
168
  timestamp: number;
169
- status: string;
169
+ status?: 'ok' | string;
170
170
  rootTransaction: SentryTransactionEvent | null;
171
171
  rootTransactionName: string;
172
172
  spans: Map<string, Span>;