@@ -220,8 +220,8 @@ function convertLogsToCreateableEvents(
220
220
SemanticInternalAttributes . METADATA
221
221
) ;
222
222
223
- const properties = {
224
- ... convertKeyValueItemsToMap (
223
+ const properties =
224
+ convertKeyValueItemsToMap (
225
225
truncateAttributes ( log . attributes ?? [ ] , spanAttributeValueLengthLimit ) ,
226
226
[ ] ,
227
227
undefined ,
@@ -233,8 +233,7 @@ function convertLogsToCreateableEvents(
233
233
SemanticInternalAttributes . METRIC_EVENTS ,
234
234
SemanticInternalAttributes . TRIGGER ,
235
235
]
236
- ) ,
237
- } ;
236
+ ) ?? { } ;
238
237
239
238
return {
240
239
traceId : binaryToHex ( log . traceId ) ,
@@ -257,7 +256,7 @@ function convertLogsToCreateableEvents(
257
256
metadata : logProperties . metadata ?? resourceProperties . metadata ?? { } ,
258
257
environmentId :
259
258
logProperties . environmentId ?? resourceProperties . environmentId ?? "unknown" ,
260
- environmentType : "DEVELOPMENT" as const ,
259
+ environmentType : "DEVELOPMENT" as const , // We've deprecated this but we need to keep it for backwards compatibility
261
260
organizationId :
262
261
logProperties . organizationId ?? resourceProperties . organizationId ?? "unknown" ,
263
262
projectId : logProperties . projectId ?? resourceProperties . projectId ?? "unknown" ,
@@ -304,8 +303,8 @@ function convertSpansToCreateableEvents(
304
303
SemanticInternalAttributes . METADATA
305
304
) ;
306
305
307
- const properties = {
308
- ... convertKeyValueItemsToMap (
306
+ const properties =
307
+ convertKeyValueItemsToMap (
309
308
truncateAttributes ( span . attributes ?? [ ] , spanAttributeValueLengthLimit ) ,
310
309
[ ] ,
311
310
undefined ,
@@ -317,8 +316,7 @@ function convertSpansToCreateableEvents(
317
316
SemanticInternalAttributes . METRIC_EVENTS ,
318
317
SemanticInternalAttributes . TRIGGER ,
319
318
]
320
- ) ,
321
- } ;
319
+ ) ?? { } ;
322
320
323
321
return {
324
322
traceId : binaryToHex ( span . traceId ) ,
0 commit comments