Skip to content

fix: Maxim SDK logging fixes#33

Merged
akshaydeo merged 1 commit intomainfrom
05-12-fix_maxim_sdk_fixes
May 18, 2025
Merged

fix: Maxim SDK logging fixes#33
akshaydeo merged 1 commit intomainfrom
05-12-fix_maxim_sdk_fixes

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

Add JSON tags to Bifrost schemas and enhance Maxim SDK logging

This PR enhances the Bifrost codebase in two key areas:

  1. Adds JSON struct tags to the Bifrost request and related schemas to ensure proper serialization/deserialization.

  2. Significantly improves the Maxim SDK logging plugin:

    • Replaces timestamp-based trace IDs with UUID-based identifiers
    • Adds structured logging for different request types (chat vs. text completion)
    • Captures detailed information about requests including model parameters
    • Implements proper generation tracking with separate generation IDs
    • Adds proper trace and generation lifecycle management (ending traces and flushing logs)
    • Extracts and logs message content in a more structured way

The PR also updates the plugins module dependencies to include the Google UUID package.

@Pratham-Mishra04 Pratham-Mishra04 marked this pull request as ready for review May 12, 2025 17:55
Copy link
Copy Markdown
Contributor

one more thing we would need to add is support for traceId and/or spanId to be passed in headers for distributed tracing -

for example, add support for headers

  1. x-maxim-trace-id - add generation to the trace with id
  2. x-maxim-span-id - add generation to the span with id

if you find any of these - the generation will be added to the corresponding entity.

Copy link
Copy Markdown
Contributor

@akshaydeo akshaydeo left a comment

Choose a reason for hiding this comment

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

added one comment

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 05-12-fix_maxim_sdk_fixes branch from a91417b to 71cdb98 Compare May 13, 2025 07:34
Copy link
Copy Markdown
Collaborator Author

yes we can do that in http transport

Copy link
Copy Markdown
Contributor

akshaydeo commented May 18, 2025

Merge activity

  • May 18, 5:42 PM GMT+5:30: A user started a stack merge that includes this pull request via Graphite.
  • May 18, 5:42 PM GMT+5:30: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo merged commit 0da66d8 into main May 18, 2025
1 check passed
@Pratham-Mishra04 Pratham-Mishra04 deleted the 05-12-fix_maxim_sdk_fixes branch June 3, 2025 08:48
akshaydeo added a commit that referenced this pull request Nov 17, 2025
# Add JSON tags to Bifrost schemas and enhance Maxim SDK logging

This PR enhances the Bifrost codebase in two key areas:

1. Adds JSON struct tags to the Bifrost request and related schemas to ensure proper serialization/deserialization.

2. Significantly improves the Maxim SDK logging plugin:
   - Replaces timestamp-based trace IDs with UUID-based identifiers
   - Adds structured logging for different request types (chat vs. text completion)
   - Captures detailed information about requests including model parameters
   - Implements proper generation tracking with separate generation IDs
   - Adds proper trace and generation lifecycle management (ending traces and flushing logs)
   - Extracts and logs message content in a more structured way

The PR also updates the plugins module dependencies to include the Google UUID package.
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