RSPEED-2867: Add ResponsesEventData format and builder#1550
Conversation
Add ResponsesEventData dataclass and build_responses_event() builder for Responses API Splunk telemetry. Follows the same pattern as InferenceEventData in rlsapi.py. Update export chains in observability package. Signed-off-by: Major Hayden <mhayden@redhat.com> Signed-off-by: Major Hayden <major@redhat.com>
Cover ResponsesEventData construction, token defaults, auth_disabled values, and build_responses_event() output including deployment and total_llm_tokens computation. Signed-off-by: Major Hayden <mhayden@redhat.com> Signed-off-by: Major Hayden <major@redhat.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 49 minutes and 30 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
|
||
|
|
||
| @dataclass | ||
| class ResponsesEventData: # pylint: disable=too-many-instance-attributes |
There was a problem hiding this comment.
yeah, pylint is super strict ;)
Description
Add
ResponsesEventDatadataclass andbuild_responses_event()builder for Responses API Splunk telemetry, following the same pattern asInferenceEventData/build_inference_event()inrlsapi.py.Part 2 of the RSPEED-2867 Splunk HEC telemetry work. This PR adds the event data format that PR 3 will use to build telemetry events in the
/responsesendpoint.New file:
src/observability/formats/responses.pyResponsesEventDatawith fields:input_text,response_text,conversation_id,model,org_id,system_id,inference_time,input_tokens,output_tokensbuild_responses_event()addsdeploymentfrom config and computestotal_llm_tokensExport chains updated in
observability.formatsandobservabilitypackages.Dependencies: None (independent of PR #1548)
Type of change
Tools used to create PR
Related Tickets & Documents
Checklist before requesting a review
Testing
uv run pytest tests/unit/observability/formats/test_responses.py -v- 4 tests covering field construction, token defaults, auth_disabled values, and total_llm_tokens computationuv run make test-unit- 2033 passed)uv run make verifypasses all linters