@@ -13,7 +13,7 @@ sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page
13
13
14
14
expect ( envelopeHeader ) . toEqual ( { sdk : { name : 'sentry.javascript.browser' , version : expect . any ( String ) } } ) ;
15
15
16
- expect ( envelopeItems . length ) . toBe ( 14 ) ;
16
+ expect ( envelopeItems . length ) . toBe ( 12 ) ;
17
17
18
18
expect ( envelopeItems [ 0 ] ) . toEqual ( [
19
19
{
@@ -53,7 +53,7 @@ sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page
53
53
attributes : [ ] ,
54
54
timeUnixNano : expect . any ( String ) ,
55
55
traceId : expect . any ( String ) ,
56
- severityNumber : 1 ,
56
+ severityNumber : 9 ,
57
57
} ,
58
58
] ) ;
59
59
@@ -67,7 +67,7 @@ sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page
67
67
attributes : [ ] ,
68
68
timeUnixNano : expect . any ( String ) ,
69
69
traceId : expect . any ( String ) ,
70
- severityNumber : 1 ,
70
+ severityNumber : 13 ,
71
71
} ,
72
72
] ) ;
73
73
@@ -81,7 +81,7 @@ sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page
81
81
attributes : [ ] ,
82
82
timeUnixNano : expect . any ( String ) ,
83
83
traceId : expect . any ( String ) ,
84
- severityNumber : 1 ,
84
+ severityNumber : 17 ,
85
85
} ,
86
86
] ) ;
87
87
@@ -95,7 +95,7 @@ sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page
95
95
attributes : [ ] ,
96
96
timeUnixNano : expect . any ( String ) ,
97
97
traceId : expect . any ( String ) ,
98
- severityNumber : 1 ,
98
+ severityNumber : 21 ,
99
99
} ,
100
100
] ) ;
101
101
@@ -104,9 +104,40 @@ sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page
104
104
type : 'otel_log' ,
105
105
} ,
106
106
{
107
- severityText : 'critical' ,
108
- body : { stringValue : 'test critical' } ,
109
- attributes : [ ] ,
107
+ severityText : 'trace' ,
108
+ body : { stringValue : 'test trace stringArg false 123' } ,
109
+ attributes : [
110
+ {
111
+ key : 'sentry.message.template' ,
112
+ value : {
113
+ stringValue : 'test %s %s %s %s' ,
114
+ } ,
115
+ } ,
116
+ {
117
+ key : 'sentry.message.param.0' ,
118
+ value : {
119
+ stringValue : 'trace' ,
120
+ } ,
121
+ } ,
122
+ {
123
+ key : 'sentry.message.param.1' ,
124
+ value : {
125
+ stringValue : 'stringArg' ,
126
+ } ,
127
+ } ,
128
+ {
129
+ key : 'sentry.message.param.2' ,
130
+ value : {
131
+ boolValue : false ,
132
+ } ,
133
+ } ,
134
+ {
135
+ key : 'sentry.message.param.3' ,
136
+ value : {
137
+ doubleValue : 123 ,
138
+ } ,
139
+ } ,
140
+ ] ,
110
141
timeUnixNano : expect . any ( String ) ,
111
142
traceId : expect . any ( String ) ,
112
143
severityNumber : 1 ,
@@ -118,31 +149,223 @@ sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page
118
149
type : 'otel_log' ,
119
150
} ,
120
151
{
121
- severityText : 'trace ' ,
122
- body : { stringValue : 'test trace stringArg 123' } ,
152
+ severityText : 'debug ' ,
153
+ body : { stringValue : 'test debug stringArg false 123' } ,
123
154
attributes : [
124
155
{
125
156
key : 'sentry.message.template' ,
126
157
value : {
127
- stringValue : 'test %s %s' ,
158
+ stringValue : 'test %s %s %s %s ' ,
128
159
} ,
129
160
} ,
130
161
{
131
- key : 'sentry.message.params.0' ,
162
+ key : 'sentry.message.param.0' ,
163
+ value : {
164
+ stringValue : 'debug' ,
165
+ } ,
166
+ } ,
167
+ {
168
+ key : 'sentry.message.param.1' ,
132
169
value : {
133
170
stringValue : 'stringArg' ,
134
171
} ,
135
172
} ,
136
173
{
137
- key : 'sentry.message.params.1' ,
174
+ key : 'sentry.message.param.2' ,
175
+ value : {
176
+ boolValue : false ,
177
+ } ,
178
+ } ,
179
+ {
180
+ key : 'sentry.message.param.3' ,
138
181
value : {
139
182
doubleValue : 123 ,
140
183
} ,
141
184
} ,
142
185
] ,
143
186
timeUnixNano : expect . any ( String ) ,
144
187
traceId : expect . any ( String ) ,
145
- severityNumber : 1 ,
188
+ severityNumber : 5 ,
189
+ } ,
190
+ ] ) ;
191
+
192
+ expect ( envelopeItems [ 8 ] ) . toEqual ( [
193
+ {
194
+ type : 'otel_log' ,
195
+ } ,
196
+ {
197
+ severityText : 'info' ,
198
+ body : { stringValue : 'test info stringArg false 123' } ,
199
+ attributes : [
200
+ {
201
+ key : 'sentry.message.template' ,
202
+ value : {
203
+ stringValue : 'test %s %s %s %s' ,
204
+ } ,
205
+ } ,
206
+ {
207
+ key : 'sentry.message.param.0' ,
208
+ value : {
209
+ stringValue : 'info' ,
210
+ } ,
211
+ } ,
212
+ {
213
+ key : 'sentry.message.param.1' ,
214
+ value : {
215
+ stringValue : 'stringArg' ,
216
+ } ,
217
+ } ,
218
+ {
219
+ key : 'sentry.message.param.2' ,
220
+ value : {
221
+ boolValue : false ,
222
+ } ,
223
+ } ,
224
+ {
225
+ key : 'sentry.message.param.3' ,
226
+ value : {
227
+ doubleValue : 123 ,
228
+ } ,
229
+ } ,
230
+ ] ,
231
+ timeUnixNano : expect . any ( String ) ,
232
+ traceId : expect . any ( String ) ,
233
+ severityNumber : 9 ,
234
+ } ,
235
+ ] ) ;
236
+
237
+ expect ( envelopeItems [ 9 ] ) . toEqual ( [
238
+ {
239
+ type : 'otel_log' ,
240
+ } ,
241
+ {
242
+ severityText : 'warn' ,
243
+ body : { stringValue : 'test warn stringArg false 123' } ,
244
+ attributes : [
245
+ {
246
+ key : 'sentry.message.template' ,
247
+ value : {
248
+ stringValue : 'test %s %s %s %s' ,
249
+ } ,
250
+ } ,
251
+ {
252
+ key : 'sentry.message.param.0' ,
253
+ value : {
254
+ stringValue : 'warn' ,
255
+ } ,
256
+ } ,
257
+ {
258
+ key : 'sentry.message.param.1' ,
259
+ value : {
260
+ stringValue : 'stringArg' ,
261
+ } ,
262
+ } ,
263
+ {
264
+ key : 'sentry.message.param.2' ,
265
+ value : {
266
+ boolValue : false ,
267
+ } ,
268
+ } ,
269
+ {
270
+ key : 'sentry.message.param.3' ,
271
+ value : {
272
+ doubleValue : 123 ,
273
+ } ,
274
+ } ,
275
+ ] ,
276
+ timeUnixNano : expect . any ( String ) ,
277
+ traceId : expect . any ( String ) ,
278
+ severityNumber : 13 ,
279
+ } ,
280
+ ] ) ;
281
+
282
+ expect ( envelopeItems [ 10 ] ) . toEqual ( [
283
+ {
284
+ type : 'otel_log' ,
285
+ } ,
286
+ {
287
+ severityText : 'error' ,
288
+ body : { stringValue : 'test error stringArg false 123' } ,
289
+ attributes : [
290
+ {
291
+ key : 'sentry.message.template' ,
292
+ value : {
293
+ stringValue : 'test %s %s %s %s' ,
294
+ } ,
295
+ } ,
296
+ {
297
+ key : 'sentry.message.param.0' ,
298
+ value : {
299
+ stringValue : 'error' ,
300
+ } ,
301
+ } ,
302
+ {
303
+ key : 'sentry.message.param.1' ,
304
+ value : {
305
+ stringValue : 'stringArg' ,
306
+ } ,
307
+ } ,
308
+ {
309
+ key : 'sentry.message.param.2' ,
310
+ value : {
311
+ boolValue : false ,
312
+ } ,
313
+ } ,
314
+ {
315
+ key : 'sentry.message.param.3' ,
316
+ value : {
317
+ doubleValue : 123 ,
318
+ } ,
319
+ } ,
320
+ ] ,
321
+ timeUnixNano : expect . any ( String ) ,
322
+ traceId : expect . any ( String ) ,
323
+ severityNumber : 17 ,
324
+ } ,
325
+ ] ) ;
326
+
327
+ expect ( envelopeItems [ 11 ] ) . toEqual ( [
328
+ {
329
+ type : 'otel_log' ,
330
+ } ,
331
+ {
332
+ severityText : 'fatal' ,
333
+ body : { stringValue : 'test fatal stringArg false 123' } ,
334
+ attributes : [
335
+ {
336
+ key : 'sentry.message.template' ,
337
+ value : {
338
+ stringValue : 'test %s %s %s %s' ,
339
+ } ,
340
+ } ,
341
+ {
342
+ key : 'sentry.message.param.0' ,
343
+ value : {
344
+ stringValue : 'fatal' ,
345
+ } ,
346
+ } ,
347
+ {
348
+ key : 'sentry.message.param.1' ,
349
+ value : {
350
+ stringValue : 'stringArg' ,
351
+ } ,
352
+ } ,
353
+ {
354
+ key : 'sentry.message.param.2' ,
355
+ value : {
356
+ boolValue : false ,
357
+ } ,
358
+ } ,
359
+ {
360
+ key : 'sentry.message.param.3' ,
361
+ value : {
362
+ doubleValue : 123 ,
363
+ } ,
364
+ } ,
365
+ ] ,
366
+ timeUnixNano : expect . any ( String ) ,
367
+ traceId : expect . any ( String ) ,
368
+ severityNumber : 21 ,
146
369
} ,
147
370
] ) ;
148
371
} ) ;
0 commit comments