Skip to content

fix(seq): write context values as raw JSON only when they are valid JSON literals - #6

Merged
amigin merged 1 commit into
mainfrom
fix/seq-context-json-literals
Oct 21, 2026
Merged

amigin merged 1 commit into
mainfrom
fix/seq-context-json-literals

Conversation

@mxmgorin

@mxmgorin mxmgorin commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Context values that looked numeric to my_json::json_utils::is_number were written unquoted, including values that are not valid JSON numbers (0922). Seq rejects such a payload with 400 and drops the whole chunk; NULL/True had the same problem.

Seq ingestion log:

Input string '0922' is not a valid number. Path 'code'
{"@l":"Info",...,"Application":"discount-codes-flows-grpc",...,"code":0922,...}
  • A context value is written raw only when it is a valid JSON literal: strict JSON number grammar or null/true/false (case-sensitive). Everything else is written as a string.

@mxmgorin
mxmgorin force-pushed the fix/seq-context-json-literals branch from 505b930 to 7e2563c Compare October 21, 2026 12:17
@amigin
amigin merged commit fab7a7f into main Oct 21, 2026
2 checks passed
@mxmgorin
mxmgorin deleted the fix/seq-context-json-literals branch October 21, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants