Skip to content

Conversation

@nina-kollman
Copy link
Contributor

@nina-kollman nina-kollman commented Nov 4, 2025

Important

Updated Spans API documentation to use snake_case for parameters and response fields, and enhanced filters documentation.

  • Documentation:
    • Updated parameter names in get_spans.mdx to snake_case: from_timestamp_sec, to_timestamp_sec, workflow, span_name, sort_order.
    • Updated response field spanName to span_name in get_spans.mdx.
    • Enhanced filters documentation in get_spans.mdx with structure, supported operators, and URL-encoding info.

This description was created by Ellipsis for 5693a0e. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • Documentation
    • Parameter names standardized to snake_case (from_timestamp_sec, to_timestamp_sec, workflow, span_name, sort_order)
    • Added new query parameter: sortBy
    • Pagination updated: cursor marked deprecated, added compositeCursor and limit
    • Filters clarified: each filter must include id, value, operator (URL-encoded); logicalOperator removed and supported operators listed
    • Response field updated to span_name

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

Walkthrough

Standardized Spans API docs: renamed multiple query parameters and a response field from camelCase to snake_case, added sortBy, updated pagination fields (cursor deprecated, compositeCursor, limit), and tightened filters structure and supported operators with URL-encoding requirements.

Changes

Cohort / File(s) Summary
Spans API endpoint documentation
api-reference/warehouse/get_spans.mdx
Renamed query parameters to snake_case: fromTimestampSecfrom_timestamp_sec, toTimestampSecto_timestamp_sec, workflowNameworkflow, spanNamespan_name, sortOrdersort_order. Added sortBy (string). Pagination: added limit (int), added compositeCursor (CompositeCursor), marked cursor (int64) deprecated. Revised filters to require each item have id, value, and operator with URL-encoded values; removed logicalOperator and listed supported operators (equals, not_equals, greater_than, less_than, exists, not_exists, contains, starts_with). Updated response field spanNamespan_name.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check parameter/response name consistency in examples and references inside the file
  • Verify filters structure examples and operator list match backend expectations
  • Ensure deprecation note for cursor is clear and compositeCursor type is documented

Possibly related PRs

  • docs: warehouse api docs #120 — Updates and renames parameters in the same api-reference/warehouse/get_spans.mdx, adjusts filters, and adds/deprecates pagination fields; likely directly related.

Poem

🐰 I hopped through lines of docs today,
CamelCase packed up and scampered away.
Snake_case springs where order now sits,
Filters neat with encoded bits.
A tidy span — I thump and cheer,
Docs refreshed, the path is clear! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix(spans): Get spans params' is vague and does not clearly convey the specific changes made, such as renaming parameters to snake_case, adding new parameters, or updating filter documentation. Use a more descriptive title like 'fix(spans): Rename get_spans parameters to snake_case and update filter documentation' to clearly communicate the primary changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nk/warehouse_spans

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0b9d72e and 5693a0e.

📒 Files selected for processing (1)
  • api-reference/warehouse/get_spans.mdx (3 hunks)
🔇 Additional comments (4)
api-reference/warehouse/get_spans.mdx (4)

22-28: Standardized timestamp parameter names to snake_case.

The parameter renames from fromTimestampSec and toTimestampSec to from_timestamp_sec and to_timestamp_sec align with the PR's goal of standardizing to snake_case naming conventions. Clear and correct.


30-48: Parameter documentation standardization is complete and well-organized.

The renaming of query parameters (workflow, span_name, sort_order) along with the addition of new pagination fields (sortBy, compositeCursor, limit) and deprecation notice for cursor is thorough. The deprecation warning at line 51 is helpful for migration guidance.


63-67: Filters documentation is clear and comprehensive.

The updated filters description now explicitly requires id, value, and operator fields with URL-encoding requirements. The documented supported operators (equals, not_equals, greater_than, less_than, exists, not_exists, contains, starts_with) provide clear guidance to API consumers.


102-104: Response field rename is documented correctly.

The span_name field is correctly documented in snake_case, consistent with the parameter standardization goal.


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

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 0b9d72e in 1 minute and 47 seconds. Click for details.
  • Reviewed 47 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. api-reference/warehouse/get_spans.mdx:22
  • Draft comment:
    Changed query param to snake_case: ensure consistency with other time params.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. api-reference/warehouse/get_spans.mdx:26
  • Draft comment:
    Renamed 'toTimestampSec' to 'to_timestamp_sec' for snake_case consistency.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it only states that a function was renamed for consistency. It does not provide any actionable feedback or suggestions for improvement.
3. api-reference/warehouse/get_spans.mdx:42
  • Draft comment:
    Updated 'sortOrder' to 'sort_order' to match snake_case naming conventions.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it only states what was changed without providing any suggestion, question, or request for confirmation. It doesn't align with the rules for useful comments.
4. api-reference/warehouse/get_spans.mdx:63
  • Draft comment:
    Enhanced filter parameter description—ensure that 'URL-encoded' note and supported operators match the backend implementation.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the author to ensure that the description matches the backend implementation, which is a form of asking for confirmation or verification. This violates the rule against asking the author to confirm or ensure things.
5. api-reference/warehouse/get_spans.mdx:106
  • Draft comment:
    Renamed response field 'spanName' to 'span_name'. Update example responses accordingly for consistency.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it is just stating that a field was renamed and suggesting to update example responses for consistency. It does not provide a specific code suggestion or ask for a test to be written.

Workflow ID: wflow_g7M8f35RiMUAJm9T

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f47f65b and 0b9d72e.

📒 Files selected for processing (1)
  • api-reference/warehouse/get_spans.mdx (4 hunks)
🔇 Additional comments (2)
api-reference/warehouse/get_spans.mdx (2)

22-22: Verify parameter naming reflects actual backend API expectations.

The documentation does show mixed parameter naming conventions (snake_case: from_timestamp_sec, to_timestamp_sec, sort_order and camelCase: envProjectIDs, workflowName, sortBy, compositeCursor, logicalOperator). However, without access to the backend API implementation in this repository, it cannot be confirmed whether this mixed naming is intentional (reflecting actual API parameter names) or a documentation oversight.

Clarify with the backend team whether the API actually expects these exact parameter names with mixed conventions, or if they should be standardized in both the API and documentation.


78-172: Correct the documentation field name span_name to spanName to match the example response.

The review comment's premise is incorrect. Query parameters are not standardized to snake_case—they use mixed naming conventions (from_timestamp_sec, sort_order alongside workflowName, spanName, sortBy).

However, there is a real documentation error: the response field is documented as "span_name" but the example response shows "spanName" in camelCase. Update line 78-172 to change the span_name field documentation to spanName to align with the actual example response and the camelCase convention used throughout the response object.

Likely an incorrect or invalid review comment.

Comment on lines +106 to 108
<ResponseField name="span_name" type="string">
The name of the span.
</ResponseField>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Example response doesn't match updated field name documentation.

Line 106 documents the response field as span_name (snake_case), but the example response on line 186 still has "spanName" (camelCase). This creates a breaking inconsistency for API consumers.

Update the example response to match the new field name:

     "parentSpanId": "span_parent_789",
     "traceState": "",
-    "spanName": "llm.completion",
+    "span_name": "llm.completion",
     "spanKind": "CLIENT",

Also applies to: 186-186

🤖 Prompt for AI Agents
In api-reference/warehouse/get_spans.mdx around lines 106-108 (and example at
line 186), the docs define the response field as "span_name" (snake_case) but
the example JSON still uses "spanName" (camelCase); update the example response
at line 186 (and any other examples) to use "span_name" instead of "spanName" so
the example matches the documented field name, and run a quick search in this
file to replace any remaining camelCase occurrences of this field.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 5693a0e in 1 minute and 53 seconds. Click for details.
  • Reviewed 33 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. api-reference/warehouse/get_spans.mdx:27
  • Draft comment:
    Update query parameter to snake_case: 'workflowName' → 'workflow'.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. api-reference/warehouse/get_spans.mdx:38
  • Draft comment:
    Convert parameter 'spanName' to snake_case ('span_name').
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. api-reference/warehouse/get_spans.mdx:66
  • Draft comment:
    Remove deprecated 'logicalOperator' parameter; ensure clients are aware.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_HxNiDHqnz9DwrBsV

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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