chore: code split for consolidated api span names to add module instances and entities in EE #38804
Conversation
WalkthroughThe pull request introduces a new class Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ConsolidatedApiSpanNamesCE.java (1)
10-34: Consider grouping related constants using nested classes.While the constants are well-named, consider organizing related spans (e.g., pages, actions, datasources) into nested static classes for better maintainability.
Example refactoring:
public class ConsolidatedApiSpanNamesCE { public static final String CONSOLIDATED_API_PREFIX = APPSMITH_SPAN_PREFIX + "consolidated-api."; public static final String VIEW = "view."; public static final String EDIT = "edit."; public static final String ROOT = "root"; public static final String CONSOLIDATED_API_ROOT_EDIT = CONSOLIDATED_API_PREFIX + EDIT + ROOT; public static final String CONSOLIDATED_API_ROOT_VIEW = CONSOLIDATED_API_PREFIX + VIEW + ROOT; + public static class UserSpans { public static final String USER_PROFILE_SPAN = "user_profile"; public static final String FEATURE_FLAG_SPAN = "feature_flag"; public static final String TENANT_SPAN = "tenant"; + } + public static class PageSpans { public static final String PAGES_SPAN = "pages"; public static final String PAGES_DSL_SPAN = "pages_dsl_list"; public static final String CURRENT_PAGE_SPAN = "current_page"; + } // ... similar groupings for other related constants }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ConsolidatedApiSpanNames.java(1 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ConsolidatedApiSpanNamesCE.java(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: server-spotless / spotless-check
- GitHub Check: server-unit-tests / server-unit-tests
🔇 Additional comments (2)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ConsolidatedApiSpanNames.java (1)
3-3: Clean implementation of code split.The refactoring to extend
ConsolidatedApiSpanNamesCEis well-structured and maintains all functionality through inheritance.Also applies to: 9-9
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ConsolidatedApiSpanNamesCE.java (1)
1-8: LGTM! Well-documented span naming requirements.The import and documentation clearly communicate the critical requirement about the
appsmith.prefix.
…nces and entities in EE (appsmithorg#38804) ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12945714399> > Commit: f794c00 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12945714399&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Fri, 24 Jan 2025 12:14:23 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Restructured span naming constants for consolidated API tracing - Introduced a new base class `ConsolidatedApiSpanNamesCE` to centralize span name definitions - Updated inheritance structure for `ConsolidatedApiSpanNames` - **New Features** - Added comprehensive span naming constants for various application components - Standardized span naming with `appsmith.` prefix for improved tracing consistency <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #
Issue Numberor
Fixes
Issue URLWarning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12945714399
Commit: f794c00
Cypress dashboard.
Tags:
@tag.AllSpec:
Fri, 24 Jan 2025 12:14:23 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Refactor
ConsolidatedApiSpanNamesCEto centralize span name definitionsConsolidatedApiSpanNamesNew Features
appsmith.prefix for improved tracing consistency