Skip to content

Commit b99052a

Browse files
authored
fix: cityHash64 result cast to string to avoid precision issues (#1496)
Closes HDX-3073
1 parent 50ba92a commit b99052a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/olive-nails-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
fix: cityHash64 in sessions cast to string due to number precision issues in the browser

packages/app/src/SessionSubpanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ export default function SessionSubpanel({
280280
alias: 'http.url',
281281
},
282282
{
283-
valueExpression: `cityHash64(${traceSource.traceIdExpression}, ${traceSource.parentSpanIdExpression}, ${traceSource.spanIdExpression}, ${traceSource.timestampValueExpression})`,
283+
// Using toString here because Javascript does not have the precision to accurately represent this
284+
valueExpression: `toString(cityHash64(${traceSource.traceIdExpression}, ${traceSource.parentSpanIdExpression}, ${traceSource.spanIdExpression}))`,
284285
alias: 'id',
285286
},
286287
{

0 commit comments

Comments
 (0)