diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c8e0e163f9..e17a24220e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ In the future, we will probably offer a way to explicitly choose which behaviour - server: add a new `/dev/rts_stats` endpoint, enabled when hasura is started with '+RTS -T' - server: re-enable a default HASURA_GRAPHQL_PG_CONN_LIFETIME of 10min - server: support for bigquery datasets +- server: format the values of `injectEventContext` as hexadecimal string instead of integer (fix #6465) - console: add custom_column_names to track_table request with replaced invalid characters (#992) - console: add details button to the success notification to see inserted row - console: add request preview for REST endpoints diff --git a/server/src-lib/Hasura/Tracing.hs b/server/src-lib/Hasura/Tracing.hs index f3e180d999a..35da15993b1 100644 --- a/server/src-lib/Hasura/Tracing.hs +++ b/server/src-lib/Hasura/Tracing.hs @@ -247,8 +247,8 @@ extractHttpContext hdrs = do injectEventContext :: TraceContext -> J.Value injectEventContext TraceContext{..} = J.object - [ "trace_id" J..= tcCurrentTrace - , "span_id" J..= tcCurrentSpan + [ "trace_id" J..= word64ToHex tcCurrentTrace + , "span_id" J..= word64ToHex tcCurrentSpan ] -- | Extract a trace context from an event trigger payload. @@ -256,9 +256,9 @@ extractEventContext :: J.Value -> IO (Maybe TraceContext) extractEventContext e = do freshSpanId <- liftIO Rand.randomIO pure $ TraceContext - <$> (e ^? JL.key "trace_context" . JL.key "trace_id" . JL._Integral) + <$> (hexToWord64 =<< e ^? JL.key "trace_context" . JL.key "trace_id" . JL._String) <*> pure freshSpanId - <*> pure (e ^? JL.key "trace_context" . JL.key "span_id" . JL._Integral) + <*> pure (hexToWord64 =<< e ^? JL.key "trace_context" . JL.key "span_id" . JL._String) -- | Perform HTTP request which supports Trace headers tracedHttpRequest