@@ -18,7 +18,7 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
18
18
expect ( envelopeItems [ 0 ] ) . toEqual ( [
19
19
{
20
20
type : 'log' ,
21
- item_count : 11 ,
21
+ item_count : 15 ,
22
22
content_type : 'application/vnd.sentry.items.log+json' ,
23
23
} ,
24
24
{
@@ -33,6 +33,9 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
33
33
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
34
34
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
35
35
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
36
+ 'sentry.message.template' : { value : 'console.trace {} {}' , type : 'string' } ,
37
+ 'sentry.message.parameter.0' : { value : 123 , type : 'integer' } ,
38
+ 'sentry.message.parameter.1' : { value : false , type : 'boolean' } ,
36
39
} ,
37
40
} ,
38
41
{
@@ -45,6 +48,9 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
45
48
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
46
49
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
47
50
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
51
+ 'sentry.message.template' : { value : 'console.debug {} {}' , type : 'string' } ,
52
+ 'sentry.message.parameter.0' : { value : 123 , type : 'integer' } ,
53
+ 'sentry.message.parameter.1' : { value : false , type : 'boolean' } ,
48
54
} ,
49
55
} ,
50
56
{
@@ -57,6 +63,9 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
57
63
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
58
64
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
59
65
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
66
+ 'sentry.message.template' : { value : 'console.log {} {}' , type : 'string' } ,
67
+ 'sentry.message.parameter.0' : { value : 123 , type : 'integer' } ,
68
+ 'sentry.message.parameter.1' : { value : false , type : 'boolean' } ,
60
69
} ,
61
70
} ,
62
71
{
@@ -69,6 +78,9 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
69
78
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
70
79
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
71
80
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
81
+ 'sentry.message.template' : { value : 'console.info {} {}' , type : 'string' } ,
82
+ 'sentry.message.parameter.0' : { value : 123 , type : 'integer' } ,
83
+ 'sentry.message.parameter.1' : { value : false , type : 'boolean' } ,
72
84
} ,
73
85
} ,
74
86
{
@@ -81,6 +93,9 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
81
93
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
82
94
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
83
95
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
96
+ 'sentry.message.template' : { value : 'console.warn {} {}' , type : 'string' } ,
97
+ 'sentry.message.parameter.0' : { value : 123 , type : 'integer' } ,
98
+ 'sentry.message.parameter.1' : { value : false , type : 'boolean' } ,
84
99
} ,
85
100
} ,
86
101
{
@@ -93,6 +108,9 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
93
108
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
94
109
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
95
110
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
111
+ 'sentry.message.template' : { value : 'console.error {} {}' , type : 'string' } ,
112
+ 'sentry.message.parameter.0' : { value : 123 , type : 'integer' } ,
113
+ 'sentry.message.parameter.1' : { value : false , type : 'boolean' } ,
96
114
} ,
97
115
} ,
98
116
{
@@ -117,6 +135,8 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
117
135
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
118
136
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
119
137
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
138
+ 'sentry.message.template' : { value : 'Object: {}' , type : 'string' } ,
139
+ 'sentry.message.parameter.0' : { value : '{"key":"value","nested":{"prop":123}}' , type : 'string' } ,
120
140
} ,
121
141
} ,
122
142
{
@@ -129,6 +149,8 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
129
149
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
130
150
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
131
151
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
152
+ 'sentry.message.template' : { value : 'Array: {}' , type : 'string' } ,
153
+ 'sentry.message.parameter.0' : { value : '[1,2,3,"string"]' , type : 'string' } ,
132
154
} ,
133
155
} ,
134
156
{
@@ -141,6 +163,11 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
141
163
'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
142
164
'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
143
165
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
166
+ 'sentry.message.template' : { value : 'Mixed: {} {} {} {}' , type : 'string' } ,
167
+ 'sentry.message.parameter.0' : { value : 'prefix' , type : 'string' } ,
168
+ 'sentry.message.parameter.1' : { value : '{"obj":true}' , type : 'string' } ,
169
+ 'sentry.message.parameter.2' : { value : '[4,5,6]' , type : 'string' } ,
170
+ 'sentry.message.parameter.3' : { value : 'suffix' , type : 'string' } ,
144
171
} ,
145
172
} ,
146
173
{
@@ -155,6 +182,62 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
155
182
'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
156
183
} ,
157
184
} ,
185
+ {
186
+ timestamp : expect . any ( Number ) ,
187
+ level : 'info' ,
188
+ severity_number : 10 ,
189
+ trace_id : expect . any ( String ) ,
190
+ body : 'String substitution %s %d test 42' ,
191
+ attributes : {
192
+ 'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
193
+ 'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
194
+ 'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
195
+ } ,
196
+ } ,
197
+ {
198
+ timestamp : expect . any ( Number ) ,
199
+ level : 'info' ,
200
+ severity_number : 10 ,
201
+ trace_id : expect . any ( String ) ,
202
+ body : 'Object substitution %o {"key":"value"}' ,
203
+ attributes : {
204
+ 'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
205
+ 'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
206
+ 'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
207
+ } ,
208
+ } ,
209
+ {
210
+ timestamp : expect . any ( Number ) ,
211
+ level : 'info' ,
212
+ severity_number : 10 ,
213
+ trace_id : expect . any ( String ) ,
214
+ body : 'first 0 1 2' ,
215
+ attributes : {
216
+ 'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
217
+ 'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
218
+ 'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
219
+ 'sentry.message.template' : { value : 'first {} {} {}' , type : 'string' } ,
220
+ 'sentry.message.parameter.0' : { value : 0 , type : 'integer' } ,
221
+ 'sentry.message.parameter.1' : { value : 1 , type : 'integer' } ,
222
+ 'sentry.message.parameter.2' : { value : 2 , type : 'integer' } ,
223
+ } ,
224
+ } ,
225
+ {
226
+ timestamp : expect . any ( Number ) ,
227
+ level : 'info' ,
228
+ severity_number : 10 ,
229
+ trace_id : expect . any ( String ) ,
230
+ body : 'hello true null undefined' ,
231
+ attributes : {
232
+ 'sentry.origin' : { value : 'auto.console.logging' , type : 'string' } ,
233
+ 'sentry.sdk.name' : { value : 'sentry.javascript.browser' , type : 'string' } ,
234
+ 'sentry.sdk.version' : { value : expect . any ( String ) , type : 'string' } ,
235
+ 'sentry.message.template' : { value : 'hello {} {} {}' , type : 'string' } ,
236
+ 'sentry.message.parameter.0' : { value : true , type : 'boolean' } ,
237
+ 'sentry.message.parameter.1' : { value : 'null' , type : 'string' } ,
238
+ 'sentry.message.parameter.2' : { value : '' , type : 'string' } ,
239
+ } ,
240
+ } ,
158
241
] ,
159
242
} ,
160
243
] ) ;
0 commit comments