Skip to content

support arbitrary logs#394

Merged
xzrderek merged 2 commits intomainfrom
derekx/support-arbitrary-logs
Jan 6, 2026
Merged

support arbitrary logs#394
xzrderek merged 2 commits intomainfrom
derekx/support-arbitrary-logs

Conversation

@xzrderek
Copy link
Contributor

@xzrderek xzrderek commented Jan 6, 2026

Note

Adds flexible metadata support in logging and normalizes adapter responses.

  • Extend FireworksTracingHttpHandler and FireworksTransport to merge user-provided extras into extras payload alongside logger_name, level, timestamp
  • Update FireworksTracingAdapter.search_logs to include status and extras in normalized results
  • Bump typescript/package.json to version 0.1.11 and format files array

Written by Cursor Bugbot for commit 02b05ea. This will update automatically on new commits. Configure here.

const extraInput =
info.extras && typeof info.extras === 'object' && !Array.isArray(info.extras)
? info.extras
: {};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unhandled JSON serialization error in debug logging path

The new extraInput spread at lines 213-216 allows arbitrary user-provided values into the payload. If these contain non-serializable values (BigInt, circular references, functions), the JSON.stringify(payload).length call at line 101 will throw outside the try-catch block. This only happens when EP_DEBUG is true, but unlike the Python implementation which wraps debug logging in try-except, the TypeScript version lacks this protection. The error propagates as an event rather than being silently handled as intended.

Additional Locations (1)

Fix in Cursor Fix in Web

@xzrderek xzrderek merged commit 8a5d7da into main Jan 6, 2026
17 checks passed
@xzrderek xzrderek deleted the derekx/support-arbitrary-logs branch January 6, 2026 08:30
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.

1 participant