Skip to content

Conversation

@akshaydeo
Copy link
Contributor

@akshaydeo akshaydeo commented Oct 6, 2025

Summary

Added OpenTelemetry support for the Responses API and improved UI styling for the logs search input and buttons.

Changes

  • Implemented OpenTelemetry tracing for Responses API requests and responses
  • Added getResponsesRequestParams function to handle responses request parameters
  • Enhanced response usage tracking with support for ResponsesExtendedResponseUsage
  • Improved cost calculation display in telemetry data
  • Enhanced the logs search input by adding a border around the search icon and input field
  • Adjusted the search icon size and positioning for better visual alignment
  • Modified input field border radius for a more cohesive search component
  • Removed shadow-xs from all button variants for a flatter, more modern design

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

Verify the updated UI components render correctly and test the OpenTelemetry tracing for Responses API:

# UI
cd ui
pnpm i || npm i
pnpm dev || npm run dev

Navigate to the logs page to check the search input styling and verify button appearances throughout the application.

Screenshots/Recordings

[Add before/after screenshots of the updated search input and buttons]

Breaking changes

  • No
  • Yes

Related issues

N/A

Security considerations

No security implications.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

Copy link
Contributor Author

akshaydeo commented Oct 6, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@akshaydeo akshaydeo marked this pull request as ready for review October 6, 2025 08:10
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Expanded telemetry for Responses, including output messages, richer request parameters, detailed token usage, and numeric cost metrics.
  • Style

    • Refined Logs search filter styling with a bordered, rounded container and adjusted icon sizing.
    • Updated button styles by removing drop shadows across variants and improving hover/dark mode consistency.
  • Chores

    • Release pipeline now triggers on the v1.3.0 branch in addition to main.

Walkthrough

Wrapped and restyled the logs search input, removed shadows from several button variants, and added OTEL conversion support for ResponsesRequest/ResponsesStreamRequest with a new helper that emits request params and response output messages into spans.

Changes

Cohort / File(s) Summary
Logs Filters UI
ui/app/logs/views/filters.tsx
Wrapped the search input in a bordered, rounded container; reduced Search icon size and adjusted horizontal margins; updated input classes to preserve base styles and apply right-side rounding to match container.
Button Style Variants
ui/components/ui/button.tsx
Removed shadow-xs from default, destructive, outline, and secondary variant class strings; adjusted minor spacing/formatting in variant classes; no public API changes.
OTEL Responses Conversion
plugins/otel/converter.go
Added getResponsesRequestParams(req *schemas.BifrostResponsesRequest) []*KeyValue and wired ResponsesRequest/ResponsesStreamRequest into createResourceSpan and completeResourceSpan to set span name gen_ai.responses, append request parameter key-values, emit gen_ai.responses.output_messages, and improve usage/cost token reporting. Note: the helper implementation appears duplicated in the diff and should be consolidated.
CI Workflow
.github/workflows/release-pipeline.yml
Added v1.3.0 to push-triggered release branches (now ["main", "v1.3.0"]).

Sequence Diagram(s)

sequenceDiagram
    participant Handler as Request handler
    participant Converter as otel/converter
    participant OTLP as OpenTelemetry

    Note over Handler,Converter: Incoming ResponsesRequest / ResponsesStreamRequest
    Handler->>Converter: createResourceSpan(req)
    Converter->>Converter: getResponsesRequestParams(req)
    Converter->>OTLP: Start span "gen_ai.responses" + params

    Note over Converter,OTLP: Response produced
    Converter->>Converter: completeResourceSpan(resp)
    Converter->>Converter: Build gen_ai.responses.output_messages from resp.Output
    Converter->>OTLP: Add output messages, usage, tokens, cost
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • 1.3.0 minor fixes #556 — Contains the same edits (UI tweaks, button style changes, and OTEL Responses conversion including the new helper).

Poem

I twitch my nose at borders neat,
Rounded corners make the search complete.
Shadows shuffled off the button stage,
Spans now sing responses page by page.
Two helpers meet — one hop to merge and sage. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title “1.3.0 minor fixes” is too generic and only indicates a version bump without summarizing the primary changes such as OpenTelemetry integration or UI styling adjustments, so it does not clearly convey the main intent of the pull request. Please update the title to succinctly reflect the main changes, for example “Add OpenTelemetry to Responses API and refine UI search and button styles,” so reviewers can immediately understand the core improvements.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed The pull request description follows the repository template with all required sections—Summary, Changes, Type of change, Affected areas, How to test, Screenshots/Recordings, Breaking changes, Related issues, Security considerations, and Checklist—providing a clear overview of both OpenTelemetry support and UI refinements.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 679f43d and dfbd502.

📒 Files selected for processing (4)
  • .github/workflows/release-pipeline.yml (1 hunks)
  • plugins/otel/converter.go (5 hunks)
  • ui/app/logs/views/filters.tsx (1 hunks)
  • ui/components/ui/button.tsx (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7f5bf5 and d277c42.

📒 Files selected for processing (2)
  • ui/app/logs/views/filters.tsx (1 hunks)
  • ui/components/ui/button.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
ui/app/logs/views/filters.tsx (1)
ui/components/ui/input.tsx (1)
  • Input (15-69)
🔇 Additional comments (2)
ui/components/ui/button.tsx (1)

13-17: LGTM!

The removal of shadow-xs from button variants creates a cleaner, flatter design consistent with the border-focused styling updates elsewhere in the PR.

ui/app/logs/views/filters.tsx (1)

101-102: LGTM!

The bordered container wrapper and icon adjustments create a cohesive search component that aligns well with the overall styling updates.

@akshaydeo akshaydeo force-pushed the 10-06-1.3.0_minor_fixes branch from d277c42 to d67ceba Compare October 6, 2025 08:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
plugins/otel/converter.go (1)

287-354: Fix formatting inconsistencies.

The implementation looks correct overall, but there are minor formatting issues:

  1. Line 314: The line is under-indented. It should align with the opening if statement.
  2. Line 331: Double space before && operator.

Apply this diff to fix the formatting:

 		if req.Params.Text != nil {
 			if req.Params.Text.Verbosity != nil {
-			params = append(params, kvStr("gen_ai.request.text", *req.Params.Text.Verbosity))
+				params = append(params, kvStr("gen_ai.request.text", *req.Params.Text.Verbosity))
 			}
 			if req.Params.Text.Format != nil {
 				params = append(params, kvStr("gen_ai.request.text_format_type", req.Params.Text.Format.Type))
 			}

 		}
 		if req.Params.TopLogProbs != nil {
 			params = append(params, kvInt("gen_ai.request.top_logprobs", int64(*req.Params.TopLogProbs)))
 		}
 		if req.Params.TopP != nil {
 			params = append(params, kvDbl("gen_ai.request.top_p", *req.Params.TopP))
 		}
 		if req.Params.ToolChoice != nil {
 			if req.Params.ToolChoice.ResponsesToolChoiceStr != nil && *req.Params.ToolChoice.ResponsesToolChoiceStr != "" {
 				params = append(params, kvStr("gen_ai.request.tool_choice_type", *req.Params.ToolChoice.ResponsesToolChoiceStr))
 			}
-			if req.Params.ToolChoice.ResponsesToolChoiceStruct != nil  && req.Params.ToolChoice.ResponsesToolChoiceStruct.Name != nil {
+			if req.Params.ToolChoice.ResponsesToolChoiceStruct != nil && req.Params.ToolChoice.ResponsesToolChoiceStruct.Name != nil {
 				params = append(params, kvStr("gen_ai.request.tool_choice_name", *req.Params.ToolChoice.ResponsesToolChoiceStruct.Name))
 			}
 			
 		}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d277c42 and d67ceba.

📒 Files selected for processing (3)
  • plugins/otel/converter.go (4 hunks)
  • ui/app/logs/views/filters.tsx (1 hunks)
  • ui/components/ui/button.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • ui/components/ui/button.tsx
  • ui/app/logs/views/filters.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
plugins/otel/converter.go (3)
core/schemas/bifrost.go (1)
  • BifrostResponsesRequest (136-142)
plugins/otel/types.go (2)
  • KeyValue (21-21)
  • AnyValue (24-24)
core/schemas/responses.go (2)
  • ResponsesToolChoiceStruct (1150-1156)
  • ResponsesResponse (85-98)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
🔇 Additional comments (4)
plugins/otel/converter.go (4)

380-382: LGTM!

The handling of ResponsesRequest and ResponsesStreamRequest is consistent with other request types in the switch statement.


420-420: LGTM!

Good formatting cleanup to maintain consistency with other token usage lines.


493-505: LGTM!

The response object handling is correctly implemented with appropriate nil checks and follows the same pattern as other object types.


287-354: No duplicate implementation found. The function getResponsesRequestParams is defined only once in plugins/otel/converter.go; the duplicate claim is inaccurate.

Likely an incorrect or invalid review comment.

@akshaydeo akshaydeo force-pushed the 10-06-1.3.0_minor_fixes branch from d67ceba to 679f43d Compare October 6, 2025 08:38
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d67ceba and 679f43d.

📒 Files selected for processing (3)
  • plugins/otel/converter.go (5 hunks)
  • ui/app/logs/views/filters.tsx (1 hunks)
  • ui/components/ui/button.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • ui/components/ui/button.tsx
  • ui/app/logs/views/filters.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
plugins/otel/converter.go (4)
core/schemas/bifrost.go (1)
  • BifrostResponsesRequest (136-142)
plugins/otel/types.go (2)
  • KeyValue (21-21)
  • AnyValue (24-24)
core/schemas/providers/gemini/types.go (3)
  • Type (778-778)
  • Role (12-12)
  • Content (955-963)
core/schemas/responses.go (4)
  • ResponsesToolChoiceStruct (1150-1156)
  • ResponsesExtendedResponseUsage (125-130)
  • ResponsesResponse (85-98)
  • ResponsesReasoning (928-931)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check

@akshaydeo akshaydeo force-pushed the 10-06-1.3.0_minor_fixes branch 3 times, most recently from 907d7eb to ae2fbc2 Compare October 6, 2025 09:15
@akshaydeo akshaydeo force-pushed the 10-06-1.3.0_minor_fixes branch from ae2fbc2 to dfbd502 Compare October 6, 2025 09:17
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from v1.3.0 to graphite-base/556 October 6, 2025 09:30
@akshaydeo akshaydeo merged commit fef5f64 into graphite-base/556 Oct 6, 2025
2 of 3 checks passed
@akshaydeo akshaydeo deleted the 10-06-1.3.0_minor_fixes branch October 6, 2025 09:37
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