File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -489,8 +489,8 @@ function convertMetricsToClickhouseRows(
489489 // Process gauge data points
490490 if ( metric . gauge ) {
491491 for ( const dp of metric . gauge . dataPoints ) {
492- const value =
493- dp . asDouble !== 0 ? dp . asDouble : dp . asInt !== BigInt ( 0 ) ? Number ( dp . asInt ) : 0 ;
492+ const value : number =
493+ ( dp . asDouble ?? 0 ) !== 0 ? dp . asDouble ! : dp . asInt !== BigInt ( 0 ) ? Number ( dp . asInt ) : 0 ;
494494 const resolved = resolveDataPointContext ( dp . attributes ?? [ ] , resourceCtx ) ;
495495
496496 rows . push ( {
@@ -514,8 +514,8 @@ function convertMetricsToClickhouseRows(
514514 // Process sum data points
515515 if ( metric . sum ) {
516516 for ( const dp of metric . sum . dataPoints ) {
517- const value =
518- dp . asDouble !== 0 ? dp . asDouble : dp . asInt !== BigInt ( 0 ) ? Number ( dp . asInt ) : 0 ;
517+ const value : number =
518+ ( dp . asDouble ?? 0 ) !== 0 ? dp . asDouble ! : dp . asInt !== BigInt ( 0 ) ? Number ( dp . asInt ) : 0 ;
519519 const resolved = resolveDataPointContext ( dp . attributes ?? [ ] , resourceCtx ) ;
520520
521521 rows . push ( {
You can’t perform that action at this time.
0 commit comments