@@ -7,6 +7,7 @@ import type { Profile } from './profiling';
7
7
import type { ReplayEvent , ReplayRecordingData } from './replay' ;
8
8
import type { SdkInfo } from './sdkinfo' ;
9
9
import type { SerializedSession , Session , SessionAggregates } from './session' ;
10
+ import type { Span } from './span' ;
10
11
import type { Transaction } from './transaction' ;
11
12
import type { UserFeedback } from './user' ;
12
13
@@ -41,7 +42,8 @@ export type EnvelopeItemType =
41
42
| 'replay_event'
42
43
| 'replay_recording'
43
44
| 'check_in'
44
- | 'statsd' ;
45
+ | 'statsd'
46
+ | 'span' ;
45
47
46
48
export type BaseEnvelopeHeaders = {
47
49
[ key : string ] : unknown ;
@@ -82,6 +84,7 @@ type ReplayRecordingItemHeaders = { type: 'replay_recording'; length: number };
82
84
type CheckInItemHeaders = { type : 'check_in' } ;
83
85
type StatsdItemHeaders = { type : 'statsd' ; length : number } ;
84
86
type ProfileItemHeaders = { type : 'profile' } ;
87
+ type SpanItemHeaders = { type : 'span' } ;
85
88
86
89
// TODO (v8): Replace `Event` with `SerializedEvent`
87
90
export type EventItem = BaseEnvelopeItem < EventItemHeaders , Event > ;
@@ -98,13 +101,15 @@ type ReplayRecordingItem = BaseEnvelopeItem<ReplayRecordingItemHeaders, ReplayRe
98
101
export type StatsdItem = BaseEnvelopeItem < StatsdItemHeaders , string > ;
99
102
export type FeedbackItem = BaseEnvelopeItem < FeedbackItemHeaders , FeedbackEvent > ;
100
103
export type ProfileItem = BaseEnvelopeItem < ProfileItemHeaders , Profile > ;
104
+ export type SpanItem = BaseEnvelopeItem < SpanItemHeaders , Span > ;
101
105
102
106
export type EventEnvelopeHeaders = { event_id : string ; sent_at : string ; trace ?: DynamicSamplingContext } ;
103
107
type SessionEnvelopeHeaders = { sent_at : string } ;
104
108
type CheckInEnvelopeHeaders = { trace ?: DynamicSamplingContext } ;
105
109
type ClientReportEnvelopeHeaders = BaseEnvelopeHeaders ;
106
110
type ReplayEnvelopeHeaders = BaseEnvelopeHeaders ;
107
111
type StatsdEnvelopeHeaders = BaseEnvelopeHeaders ;
112
+ type SpanEnvelopeHeaders = BaseEnvelopeHeaders ;
108
113
109
114
export type EventEnvelope = BaseEnvelope <
110
115
EventEnvelopeHeaders ,
@@ -115,12 +120,14 @@ export type ClientReportEnvelope = BaseEnvelope<ClientReportEnvelopeHeaders, Cli
115
120
export type ReplayEnvelope = [ ReplayEnvelopeHeaders , [ ReplayEventItem , ReplayRecordingItem ] ] ;
116
121
export type CheckInEnvelope = BaseEnvelope < CheckInEnvelopeHeaders , CheckInItem > ;
117
122
export type StatsdEnvelope = BaseEnvelope < StatsdEnvelopeHeaders , StatsdItem > ;
123
+ export type SpanEnvelope = BaseEnvelope < SpanEnvelopeHeaders , SpanItem > ;
118
124
119
125
export type Envelope =
120
126
| EventEnvelope
121
127
| SessionEnvelope
122
128
| ClientReportEnvelope
123
129
| ReplayEnvelope
124
130
| CheckInEnvelope
125
- | StatsdEnvelope ;
131
+ | StatsdEnvelope
132
+ | SpanEnvelope ;
126
133
export type EnvelopeItem = Envelope [ 1 ] [ number ] ;
0 commit comments