Skip to content

chore: added telemetry code around plugin execution flow#39708

Merged
vsvamsi1 merged 2 commits intoreleasefrom
test62
Mar 13, 2025
Merged

chore: added telemetry code around plugin execution flow#39708
vsvamsi1 merged 2 commits intoreleasefrom
test62

Conversation

@vsvamsi1
Copy link
Contributor

@vsvamsi1 vsvamsi1 commented Mar 13, 2025

Description

added telemetry code around plugin execution flow

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

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13832941076
Commit: 4f64497
Cypress dashboard.
Tags: @tag.All
Spec:


Thu, 13 Mar 2025 12:09:38 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Improved backend monitoring and tracking of system actions, contributing to enhanced overall stability and performance.
    • Enhanced observability of action execution processes with the addition of new identifiers for various action-related processes.

@vsvamsi1 vsvamsi1 requested a review from ApekshaBhosale March 13, 2025 07:21
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2025

Walkthrough

The changes enhance the observability in the ActionExecutionSolutionCEImpl class. A set of new static final string constants are introduced to tag various reactive streams. The methods populateAndExecuteAction and executeAction are updated to include .name() and .tap() calls on their respective reactive streams, enabling detailed metrics tracking across different stages of action execution, without altering the core business logic.

Changes

File(s) Change Summary
app/.../ActionExecutionSolutionCEImpl.java - Added several static final constants for observability (e.g., GET_ENVIRONMENT_ID, POPULATED_EXECUTE_ACTION_DTO_MONO, etc.).
- Modified populateAndExecuteAction and executeAction methods to include .name() and .tap() calls on reactive streams.
app/.../ActionSpanCE.java - Added new public static final constants for action execution spans (e.g., GET_ENVIRONMENT_ID, POPULATED_EXECUTE_ACTION_DTO_MONO, etc.) to enhance observability in action processing.

Possibly related PRs

Suggested labels

Task, Query & JS Pod, Integrations Product, Integrations Pod General

Suggested reviewers

  • rajatagrawal
  • sneha122

Poem

In the realm of streams that twist and flow,
Constants now guide each reactive show.
With a tap and a name, metrics sing so clear,
Observability blooms with each step we steer.
Code dances in harmony—cheers to progress, dear!
🌟🚀


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 46b46e0 and 4f64497.

📒 Files selected for processing (1)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: parse-tags
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: server-spotless / spotless-check

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Mar 13, 2025
dvj1988
dvj1988 previously approved these changes Mar 13, 2025
@vsvamsi1 vsvamsi1 added the ok-to-test Required label for CI label Mar 13, 2025
@vsvamsi1 vsvamsi1 self-assigned this Mar 13, 2025
rajatagrawal
rajatagrawal previously approved these changes Mar 13, 2025
@vsvamsi1 vsvamsi1 dismissed stale reviews from rajatagrawal and dvj1988 via a0f84eb March 13, 2025 08:07
@vsvamsi1 vsvamsi1 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Mar 13, 2025
@vsvamsi1 vsvamsi1 requested a review from ApekshaBhosale March 13, 2025 08:14
@vsvamsi1 vsvamsi1 requested a review from ApekshaBhosale March 13, 2025 10:31
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.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between a0f84eb and 75ca29b.

📒 Files selected for processing (2)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: server-spotless / spotless-check
🔇 Additional comments (9)
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java (9)

99-99: LGTM - Good import practice.

The import is correctly using the .* notation to import all constants from the ActionSpanCE class, which makes the code cleaner.


207-211: LGTM - Appropriate telemetry instrumentation.

The code correctly adds observability by naming the reactive stream and tapping into the Micrometer observation registry.


217-219: LGTM - Consistent telemetry implementation.

This follows the same pattern as other instrumentations in the file, correctly using the constant from ActionSpanCE.


221-229: LGTM - Well-structured reactive code with telemetry.

The code maintains the reactive chain structure while adding appropriate telemetry instrumentation.


357-358: LGTM - Proper monitoring for action validation.

This adds visibility to the action validation process, which is a critical part of the execution flow.


366-368: LGTM - Good telemetry around plugin cache retrieval.

The instrumentation correctly captures metrics for plugin cache retrieval, which can be useful for performance analysis.


369-372: LGTM - Appropriate plugin executor monitoring.

This addition provides visibility into plugin executor retrieval performance.


382-383: LGTM - Proper execution result monitoring.

This instrumentation helps track the performance of result retrieval, which is valuable for debugging and optimization.


404-405: LGTM - Good error case monitoring.

The telemetry correctly wraps the error handling path as well, ensuring comprehensive monitoring.

@github-actions
Copy link

Failed server tests

  • com.external.plugins.MssqlPluginTest#
  • com.external.plugins.MssqlGetDBSchemaTest#
  • com.external.plugins.FirestorePluginTest#
  • com.external.plugins.RedshiftPluginTest#
  • com.external.plugins.AmazonS3PluginTest#
  • com.external.utils.AmazonS3ErrorUtilsTest#
  • com.external.config.MethodConfigTest#
  • com.external.config.FileListMethodTest#
  • com.external.config.RowsBulkUpdateMethodTest#
  • com.external.config.GetStructureMethodTest#
  • com.external.config.RowsUpdateMethodTest#
  • com.external.config.RowsAppendMethodTest#
  • com.external.config.GetDatasourceMetadataMethodTest#
  • com.external.config.SheetsUtilTest#
  • com.external.config.RowsGetMethodTest#
  • com.external.config.FileInfoMethodTest#
  • com.external.config.RowsBulkAppendMethodTest#
  • com.external.plugins.GraphQLPluginTest#
  • com.external.plugins.SnowflakePluginTest#
  • com.external.plugins.SmtpPluginTest#
  • com.external.plugins.ChatCommandTest#
  • com.external.plugins.VisionCommandTest#
  • com.external.plugins.OpenAIPluginTest#
  • com.external.plugins.EmbeddingCommandTest#
  • com.external.plugins.AnthropicPluginTest#
  • com.external.plugins.GoogleAiPluginTest#
  • com.external.plugins.GenerateContentCommandTest#
  • com.external.plugins.services.HeadersUtilTest#
  • com.external.plugins.services.FieldValidationHelperTest#
  • com.external.plugins.services.FileUtilTest#
  • com.external.plugins.services.AiFeatureServiceFactoryTest#
  • com.external.plugins.services.features.ImageEntityExtractionServiceImplTest#
  • com.external.plugins.services.features.ImageClassificationServiceImplTest#
  • com.external.plugins.services.features.TextSummarizationServiceImplTest#
  • com.external.plugins.services.features.TextClassificationServiceImplTest#
  • com.external.plugins.services.features.TextGenerationServiceImplTest#
  • com.external.plugins.services.features.ImageCaptioningServiceImplTest#
  • com.external.plugins.services.features.TextEntityExtractionServiceImplTest#
  • com.external.plugins.AwsLambdaPluginTest#
  • com.external.plugins.DatabricksPluginTest#
  • GsonUnorderedToOrderedSerializationTest#
  • com.appsmith.git.helpers.DSLTransformerHelperTest#
  • com.appsmith.git.helpers.FileUtilsImplTest#
  • com.appsmith.git.converters.GsonDoubleToLongConverterTest#
  • com.external.plugins.RedisPluginTest#itShouldExecuteCommandWithArgs

@vsvamsi1 vsvamsi1 requested a review from ApekshaBhosale March 13, 2025 10:55
@vsvamsi1 vsvamsi1 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Mar 13, 2025
@vsvamsi1 vsvamsi1 merged commit 4969006 into release Mar 13, 2025
87 of 89 checks passed
@vsvamsi1 vsvamsi1 deleted the test62 branch March 13, 2025 12:33
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
…#39708)

## Description
added telemetry code around plugin execution flow


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/13832941076>
> Commit: 4f64497
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13832941076&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Thu, 13 Mar 2025 12:09:38 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

- **Chores**
- Improved backend monitoring and tracking of system actions,
contributing to enhanced overall stability and performance.
- Enhanced observability of action execution processes with the addition
of new identifiers for various action-related processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants