@@ -220,8 +220,8 @@ function convertLogsToCreateableEvents(
220220 SemanticInternalAttributes . METADATA
221221 ) ;
222222
223- const properties = {
224- ... convertKeyValueItemsToMap (
223+ const properties =
224+ convertKeyValueItemsToMap (
225225 truncateAttributes ( log . attributes ?? [ ] , spanAttributeValueLengthLimit ) ,
226226 [ ] ,
227227 undefined ,
@@ -233,8 +233,7 @@ function convertLogsToCreateableEvents(
233233 SemanticInternalAttributes . METRIC_EVENTS ,
234234 SemanticInternalAttributes . TRIGGER ,
235235 ]
236- ) ,
237- } ;
236+ ) ?? { } ;
238237
239238 return {
240239 traceId : binaryToHex ( log . traceId ) ,
@@ -257,7 +256,7 @@ function convertLogsToCreateableEvents(
257256 metadata : logProperties . metadata ?? resourceProperties . metadata ?? { } ,
258257 environmentId :
259258 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
261260 organizationId :
262261 logProperties . organizationId ?? resourceProperties . organizationId ?? "unknown" ,
263262 projectId : logProperties . projectId ?? resourceProperties . projectId ?? "unknown" ,
@@ -304,8 +303,8 @@ function convertSpansToCreateableEvents(
304303 SemanticInternalAttributes . METADATA
305304 ) ;
306305
307- const properties = {
308- ... convertKeyValueItemsToMap (
306+ const properties =
307+ convertKeyValueItemsToMap (
309308 truncateAttributes ( span . attributes ?? [ ] , spanAttributeValueLengthLimit ) ,
310309 [ ] ,
311310 undefined ,
@@ -317,8 +316,7 @@ function convertSpansToCreateableEvents(
317316 SemanticInternalAttributes . METRIC_EVENTS ,
318317 SemanticInternalAttributes . TRIGGER ,
319318 ]
320- ) ,
321- } ;
319+ ) ?? { } ;
322320
323321 return {
324322 traceId : binaryToHex ( span . traceId ) ,
0 commit comments