Skip to content

Conversation

@RohitR311
Copy link
Collaborator

@RohitR311 RohitR311 commented Dec 21, 2025

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Dec 21, 2025

Walkthrough

The PR enhances telemetry tracking for LLM-based robots by adding an isLLM flag to robot metadata and conditionally capturing the prompt field in telemetry payloads during robot creation. Changes affect two server-side files with no control flow modifications.

Changes

Cohort / File(s) Summary
LLM telemetry enrichment
server/src/api/sdk.ts, server/src/routes/storage.ts
Added isLLM flag to robot metadata to identify LLM-based robots; conditionally included prompt field in telemetry capture for LLM extraction operations to improve analytics tracking.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Homogeneous pattern: consistent additions of optional metadata and telemetry fields
  • Straightforward conditional logic with no structural changes
  • No control flow or error handling modifications

Possibly related PRs

Suggested reviewers

  • amhsirak

Poem

🐰 A prompt in the telemetry, a flag held high,
LLM robots now tracked as they zip through the sky,
Data enriched with wisdom, each capture so sweet,
Analytics complete—hop hop—what a treat! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: pass prompt' is vague and generic, using non-descriptive language that doesn't clearly convey the specific changes made to the codebase. Consider a more descriptive title such as 'chore: include prompt field in LLM robot telemetry' that clarifies what is being passed and where.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch prompt-fix

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.

❤️ Share

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

Copy link

@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 (2)
server/src/routes/storage.ts (1)

588-593: Verify privacy implications of capturing user prompts in telemetry.

The prompt field is now being captured in telemetry. User prompts may contain sensitive information, PII, or proprietary data. Ensure that:

  • Your analytics platform has appropriate data retention and privacy policies
  • Users are informed that prompts will be included in telemetry
  • Consider sanitizing or truncating very long prompts before capture
Optional: Add prompt length limit for telemetry
 capture('maxun-oss-llm-robot-created', {
   robot_meta: newRobot.recording_meta,
   recording: newRobot.recording,
   llm_provider: llmProvider || 'ollama',
-  prompt: prompt,
+  prompt: prompt.length > 500 ? prompt.substring(0, 500) + '...' : prompt,
 });
server/src/api/sdk.ts (1)

703-707: Verify privacy implications of capturing user prompts in telemetry.

Similar to the storage.ts endpoint, user prompts may contain sensitive information. Ensure appropriate privacy safeguards are in place.

Optional: Add prompt length limit for telemetry
 capture("maxun-oss-llm-robot-created", {
   robot_meta: robot.recording_meta,
   recording: robot.recording,
-  prompt: prompt,
+  prompt: prompt.length > 500 ? prompt.substring(0, 500) + '...' : prompt,
 });
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33bfbb6 and 5a192fd.

📒 Files selected for processing (2)
  • server/src/api/sdk.ts (3 hunks)
  • server/src/routes/storage.ts (1 hunks)
🔇 Additional comments (2)
server/src/api/sdk.ts (2)

91-91: LGTM: isLLM flag added to robot metadata.

The addition of the isLLM flag appropriately tracks whether a robot was created using LLM capabilities, enabling differentiated telemetry events.


106-113: Good practice: Conditional prompt inclusion in telemetry.

The conditional logic properly handles the optional nature of the prompt field in the generic robot creation endpoint. This ensures the prompt is only included in telemetry when the robot is LLM-based and the prompt exists.

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