Skip to content

Commit eb83637

Browse files
committed
fix typecheck issues
1 parent 64bc5ee commit eb83637

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/webapp/app/v3/otlpExporter.server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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({

0 commit comments

Comments
 (0)