Skip to content

chore: added telemetry to the plugin flow#39861

Merged
rajatagrawal merged 2 commits intoreleasefrom
test66
Mar 25, 2025
Merged

chore: added telemetry to the plugin flow#39861
rajatagrawal merged 2 commits intoreleasefrom
test66

Conversation

@vsvamsi1
Copy link
Copy Markdown
Contributor

@vsvamsi1 vsvamsi1 commented Mar 21, 2025

Description

added telemetry to the plugin 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/14052770190
Commit: e7102de
Cypress dashboard.
Tags: @tag.All
Spec:


Tue, 25 Mar 2025 09:04:21 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced new tracing constants for improved action tracking.
    • Enhanced observability across multiple plugins (for databases and APIs) by integrating monitoring capabilities into their execution flows.
  • Tests

    • Updated test setups to initialize plugins with observation support, ensuring consistency with the enhanced monitoring features.

@vsvamsi1 vsvamsi1 added the ok-to-test Required label for CI label Mar 21, 2025
@vsvamsi1 vsvamsi1 self-assigned this Mar 21, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 21, 2025

Walkthrough

This pull request introduces new observability features across several plugins and updates the tracing constants. It adds five span constants in the tracing interface and integrates Micrometer’s ObservationRegistry into the GoogleSheets, Mongo, MySQL, Postgres, and RestApi plugins. The changes update constructor signatures and method chains to incorporate observation calls and modify test instantiations to provide ObservationRegistry.NOOP.

Changes

File(s) Change Summary
app/server/appsmith-interfaces/.../ActionSpanCE.java Added five new public static final span constants: PLUGIN_EXECUTE_COMMON, MONGO_OUTPUT_MONO, CREATE_AND_EXECUTE_QUERY_FROM_CONNECTION, ACTUAL_API_CALL, and TRIGGER_API_CALL.
app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java and tests (RowsAppendMethodTest.java, RowsBulkAppendMethodTest.java, RowsBulkUpdateMethodTest.java, RowsUpdateMethodTest.java) Updated GoogleSheetsPluginExecutor to accept an ObservationRegistry via constructor injection and modified executeParameterizedWithFlags to chain observation calls; tests now instantiate the executor with ObservationRegistry.NOOP.
app/server/appsmith-plugins/mongoPlugin/src/main/java/com/external/plugins/MongoPlugin.java and tests (*DatasourceTest.java, *ErrorsTest.java, *FormsTest.java, *QueriesTest.java, *RegexTest.java, *StaleConnTest.java) Integrated ObservationRegistry in MongoPluginExecutor, modifying both executeParameterized and executeCommon with observation chaining; tests updated with ObservationRegistry.NOOP.
app/server/appsmith-plugins/mysqlPlugin/src/main/java/com/external/plugins/MySqlPlugin.java and tests (*DatasourceValidationTest.java, *MySqlPluginTest.java, *MySqlStaleConnectionErrorMessageTest.java) Enhanced MySqlPluginExecutor with dependency injection for ObservationRegistry and updated methods to include observation chaining; test instantiation updated to pass ObservationRegistry.NOOP.
app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java Modified PostgresPluginExecutor constructor to include ObservationRegistry and updated executeParameterized to chain observation calls.
app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java and test (RestApiPluginTest.java) Updated RestApiPluginExecutor to require ObservationRegistry via constructor and integrated observation in both executeParameterized and executeCommon methods.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant E as PluginExecutor
    participant R as ObservationRegistry
    participant M as Micrometer

    C->>E: executeParameterized(parameters)
    E->>R: Initialize observation
    E->>E: Execute common logic
    E->>M: Chain observation (.name, .tap)
    M-->>E: Return observation metrics
    E-->>C: Return ActionExecutionResult
Loading

Possibly related PRs

Suggested labels

Enhancement, Query & JS Pod, Integrations Product

Suggested reviewers

  • ApekshaBhosale
  • rajatagrawal
  • dvj1988

Poem

In lines of code our changes gleam,
New constants and observability reign supreme.
Constructors now accept a keen observation guide,
While chained methods track flows far and wide.
Cheers to our plugins—robust and sincere! 🚀✨
Happy coding in our realm of metrics and cheer!


🪧 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 plan to trigger planning for file edits and PR creation.
  • @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.

@vsvamsi1 vsvamsi1 requested a review from rajatagrawal March 21, 2025 17:55
@vsvamsi1 vsvamsi1 marked this pull request as draft March 21, 2025 17:55
@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 21, 2025
@vsvamsi1 vsvamsi1 requested a review from rajatagrawal March 25, 2025 06:10
@vsvamsi1 vsvamsi1 marked this pull request as ready for review March 25, 2025 06:10
Copy link
Copy Markdown
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: 0

🧹 Nitpick comments (1)
app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java (1)

354-417: Missing telemetry in triggerWithFlags method.

The triggerWithFlags method would benefit from similar observation instrumentation as applied to executeParameterizedWithFlags.

Consider adding observation to the exchange call in triggerWithFlags:

.exchange()
+.name(ACTUAL_API_CALL)
+.tap(Micrometer.observation(observationRegistry))
.flatMap(clientResponse -> clientResponse.toEntity(byte[].class))
📜 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 df37935 and e7102de.

📒 Files selected for processing (12)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1 hunks)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/RestAPIActivateUtils.java (5 hunks)
  • app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java (6 hunks)
  • app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java (2 hunks)
  • app/server/appsmith-plugins/mongoPlugin/src/main/java/com/external/plugins/MongoPlugin.java (6 hunks)
  • app/server/appsmith-plugins/mssqlPlugin/src/main/java/com/external/plugins/MssqlPlugin.java (4 hunks)
  • app/server/appsmith-plugins/mssqlPlugin/src/test/java/com/external/plugins/MssqlTestDBContainerManager.java (2 hunks)
  • app/server/appsmith-plugins/mysqlPlugin/src/main/java/com/external/plugins/MySqlPlugin.java (7 hunks)
  • app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java (5 hunks)
  • app/server/appsmith-plugins/postgresPlugin/src/test/java/com/external/plugins/PostgresDatasourceValidationTest.java (2 hunks)
  • app/server/appsmith-plugins/postgresPlugin/src/test/java/com/external/plugins/PostgresPluginTest.java (2 hunks)
  • app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
  • app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java
🧰 Additional context used
🧬 Code Definitions (5)
app/server/appsmith-plugins/mysqlPlugin/src/main/java/com/external/plugins/MySqlPlugin.java (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1)
  • ActionSpanCE (11-72)
app/server/appsmith-plugins/mssqlPlugin/src/main/java/com/external/plugins/MssqlPlugin.java (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1)
  • ActionSpanCE (11-72)
app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1)
  • ActionSpanCE (11-72)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/RestAPIActivateUtils.java (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1)
  • ActionSpanCE (11-72)
app/server/appsmith-plugins/mongoPlugin/src/main/java/com/external/plugins/MongoPlugin.java (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (1)
  • ActionSpanCE (11-72)
⏰ Context from checks skipped due to timeout of 90000ms (60)
  • GitHub Check: perform-test / ci-test / ci-test (59)
  • GitHub Check: perform-test / ci-test / ci-test (58)
  • GitHub Check: perform-test / ci-test / ci-test (57)
  • GitHub Check: perform-test / ci-test / ci-test (56)
  • GitHub Check: perform-test / ci-test / ci-test (55)
  • GitHub Check: perform-test / ci-test / ci-test (54)
  • GitHub Check: perform-test / ci-test / ci-test (53)
  • GitHub Check: perform-test / ci-test / ci-test (52)
  • GitHub Check: perform-test / ci-test / ci-test (51)
  • GitHub Check: perform-test / ci-test / ci-test (50)
  • GitHub Check: perform-test / ci-test / ci-test (49)
  • GitHub Check: perform-test / ci-test / ci-test (48)
  • GitHub Check: perform-test / ci-test / ci-test (47)
  • GitHub Check: perform-test / ci-test / ci-test (46)
  • GitHub Check: perform-test / ci-test / ci-test (45)
  • GitHub Check: perform-test / ci-test / ci-test (44)
  • GitHub Check: perform-test / ci-test / ci-test (43)
  • GitHub Check: perform-test / ci-test / ci-test (41)
  • GitHub Check: perform-test / ci-test / ci-test (40)
  • GitHub Check: perform-test / ci-test / ci-test (39)
  • GitHub Check: perform-test / ci-test / ci-test (38)
  • GitHub Check: perform-test / ci-test / ci-test (37)
  • GitHub Check: perform-test / ci-test / ci-test (36)
  • GitHub Check: perform-test / ci-test / ci-test (35)
  • GitHub Check: perform-test / ci-test / ci-test (34)
  • GitHub Check: perform-test / ci-test / ci-test (33)
  • GitHub Check: perform-test / ci-test / ci-test (32)
  • GitHub Check: perform-test / ci-test / ci-test (31)
  • GitHub Check: perform-test / ci-test / ci-test (30)
  • GitHub Check: perform-test / ci-test / ci-test (29)
  • GitHub Check: perform-test / ci-test / ci-test (28)
  • GitHub Check: perform-test / ci-test / ci-test (27)
  • GitHub Check: perform-test / ci-test / ci-test (26)
  • GitHub Check: perform-test / ci-test / ci-test (25)
  • GitHub Check: perform-test / ci-test / ci-test (24)
  • GitHub Check: perform-test / ci-test / ci-test (23)
  • GitHub Check: perform-test / ci-test / ci-test (22)
  • GitHub Check: perform-test / ci-test / ci-test (21)
  • GitHub Check: perform-test / ci-test / ci-test (20)
  • GitHub Check: perform-test / ci-test / ci-test (19)
  • GitHub Check: perform-test / ci-test / ci-test (18)
  • GitHub Check: perform-test / ci-test / ci-test (17)
  • GitHub Check: perform-test / ci-test / ci-test (16)
  • GitHub Check: perform-test / ci-test / ci-test (15)
  • GitHub Check: perform-test / ci-test / ci-test (14)
  • GitHub Check: perform-test / ci-test / ci-test (13)
  • GitHub Check: perform-test / ci-test / ci-test (12)
  • GitHub Check: perform-test / ci-test / ci-test (11)
  • GitHub Check: perform-test / ci-test / ci-test (10)
  • GitHub Check: perform-test / ci-test / ci-test (9)
  • GitHub Check: perform-test / ci-test / ci-test (8)
  • GitHub Check: perform-test / ci-test / ci-test (7)
  • GitHub Check: perform-test / ci-test / ci-test (6)
  • GitHub Check: perform-test / ci-test / ci-test (5)
  • GitHub Check: perform-test / ci-test / ci-test (4)
  • GitHub Check: perform-test / ci-test / ci-test (3)
  • GitHub Check: perform-test / ci-test / ci-test (2)
  • GitHub Check: perform-test / ci-test / ci-test (1)
  • GitHub Check: perform-test / ci-test / ci-test (0)
  • GitHub Check: server-unit-tests / server-unit-tests
🔇 Additional comments (50)
app/server/appsmith-plugins/postgresPlugin/src/test/java/com/external/plugins/PostgresDatasourceValidationTest.java (4)

14-14: Import added for ObservationRegistry.

The import statement is correctly added to support the updated constructor parameters.


33-34: Constructor updated to include ObservationRegistry parameter.

The PostgresPluginExecutor instantiation now includes ObservationRegistry.NOOP as required by the modified constructor signature. This is part of the telemetry implementation being added to the plugin flow.


14-14: Added import for ObservationRegistry.

The added import aligns with the updated constructor parameter introduced below.


33-34: Updated constructor call to include ObservationRegistry.

The PostgresPluginExecutor now requires an observation registry parameter, which is correctly provided with ObservationRegistry.NOOP for testing purposes.

app/server/appsmith-plugins/postgresPlugin/src/test/java/com/external/plugins/PostgresPluginTest.java (4)

32-32: Import added for ObservationRegistry.

The import statement is correctly added to support the updated constructor parameters.


92-93: Constructor updated to include ObservationRegistry parameter.

The PostgresPluginExecutor instantiation now includes ObservationRegistry.NOOP as required by the modified constructor signature. This is consistent with the changes made to PostgresDatasourceValidationTest.


32-32: Added import for ObservationRegistry.

This import supports the updated constructor parameter.


92-93: Updated constructor call with ObservationRegistry parameter.

The executor instantiation now includes ObservationRegistry.NOOP as the third parameter, consistent with the constructor signature change.

app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java (9)

31-31: New imports for observation-related dependencies.

Required imports added for the Micrometer observation registry implementation.

Also applies to: 40-40


51-52: Static imports for span constants.

These constants are correctly imported and will be used to name the observation spans for better traceability.


82-86: Observation registry field and constructor added.

The field and constructor properly initialize the observation registry, which will be used for telemetry. Good practice to use constructor injection for this dependency.


163-165: Added telemetry instrumentation to executeParameterizedWithFlags method.

The method correctly implements telemetry by naming the observation with PLUGIN_EXECUTE_COMMON and tapping into the Micrometer observation API.


225-226: Added telemetry instrumentation to the actual API call.

The HTTP exchange is properly instrumented with the ACTUAL_API_CALL name for observability. This will help track API call performance.


31-31: Added necessary imports for telemetry implementation.

The imports support the Micrometer observation features and define constants for span names.

Also applies to: 40-40, 51-52


82-86: Added ObservationRegistry field and constructor.

The executor now properly stores the observation registry instance for use in instrumentation.


163-165: Added observation to executeCommon method call.

Properly instruments the executeCommon method with a named observation span.


225-226: Added observation to API call exchange.

Instruments the actual API call with an observation span for better telemetry.

app/server/appsmith-plugins/mssqlPlugin/src/test/java/com/external/plugins/MssqlTestDBContainerManager.java (4)

10-10: Import added for ObservationRegistry.

Import statement correctly added to support the modified constructor parameters.


32-32: Constructor updated to include ObservationRegistry parameter.

The MssqlPluginExecutor instantiation now includes ObservationRegistry.NOOP as required by the updated constructor signature, consistent with the pattern applied to other plugin executors.


10-10: Added import for ObservationRegistry.

Supports the constructor parameter addition below.


31-32: Updated MssqlPluginExecutor instantiation with ObservationRegistry.

Correctly provides ObservationRegistry.NOOP for testing purposes, matching the constructor signature change.

app/server/appsmith-plugins/mssqlPlugin/src/main/java/com/external/plugins/MssqlPlugin.java (5)

5-5: Adding import for ActionSpanCE to support telemetry.

This import is correctly added to access the PLUGIN_EXECUTE_COMMON constant used in the updated code.


37-38: Adding Micrometer imports for observability.

These imports are necessary for the new telemetry functionality being added to the plugin. The ObservationRegistry and Micrometer imports are essential for the observability chain.

Also applies to: 45-45


123-124: Adding ObservationRegistry field.

Adding this private final field to store the registry instance is the correct approach for making it available throughout the class.


125-128: Constructor updated to accept ObservationRegistry.

The constructor has been updated to accept and store the ObservationRegistry, maintaining good dependency injection practices.


190-193: Adding telemetry to query execution.

This enhancement adds observability to the query execution flow by naming the operation and tapping into the observation registry. This is a good practice for monitoring plugin performance.

app/server/appsmith-plugins/mysqlPlugin/src/main/java/com/external/plugins/MySqlPlugin.java (7)

38-38: Adding ObservationRegistry import.

This import is necessary for the new telemetry functionality.


57-57: Adding Micrometer import for observability.

This import provides the Micrometer.observation() method used to enhance telemetry.


77-78: Importing ActionSpanCE constants.

These static imports provide the span names used for telemetry tracking in the plugin execution.


171-176: Adding ObservationRegistry field and constructor parameter.

Properly adding the ObservationRegistry as a dependency through constructor injection.


242-244: Adding telemetry to non-prepared statement execution path.

Enhancing observability for the non-prepared statement execution path by naming the operation and adding an observation tap.


261-262: Adding telemetry to prepared statement execution path.

Ensuring both execution paths (prepared and non-prepared statements) have consistent telemetry implementation.


367-368: Adding telemetry to query creation and execution.

This adds detailed telemetry for the specific query creation and execution phase, providing more granular performance tracking.

app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java (2)

25-25: Adding ObservationRegistry import.

This import is needed for the new parameter passed to the triggerApiCall method.


288-289: Adding ObservationRegistry.NOOP to triggerApiCall method.

This change passes a no-operation observation registry to the triggerApiCall method, maintaining consistency with the updated method signature without enabling active telemetry in this specific context.

app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ActionSpanCE.java (3)

20-21: Adding constants for plugin execution spans.

These constants define span names for common plugin execution operations and MongoDB output tracking.


23-24: Adding constant for query execution span.

This constant defines the span name for tracking the query creation and execution phase across database plugins.


26-27: Adding constants for API call spans.

These constants define span names for tracking actual API calls and API call triggers, enhancing observability for API-based plugins.

app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/RestAPIActivateUtils.java (5)

20-21: Good addition of ObservationRegistry import

The addition of Micrometer's ObservationRegistry is appropriate for implementing telemetry in the REST API component.


33-34: Properly imported Micrometer observability

The Micrometer reactive observability import is essential for integrating with the observation registry.


50-51: Good practice using constant for span naming

Using a predefined constant from ActionSpanCE for naming the span ensures consistency across the codebase.


79-80: Method signature updated correctly

The method signature has been properly updated to include the ObservationRegistry parameter, maintaining backward compatibility with the method logic.


81-84: Well-implemented observability pattern

The implementation follows the standard reactive observability pattern with proper naming and tap operations. This will provide valuable telemetry data for API calls.

app/server/appsmith-plugins/mongoPlugin/src/main/java/com/external/plugins/MongoPlugin.java (7)

54-55: Good addition of ObservationRegistry import

The ObservationRegistry import enables telemetry collection for MongoDB operations.


74-75: Properly imported Micrometer observability

The reactive Micrometer observability import aligns with the project's telemetry approach.


102-104: Good practice using constants for span naming

Importing constants for span names from ActionSpanCE ensures naming consistency across plugins.


230-235: Well-implemented constructor injection

The addition of the ObservationRegistry field and constructor properly implements dependency injection, allowing for consistent telemetry collection.


299-302: Properly instrumented executeCommon method

The instrumentation of the executeCommon method call with the PLUGIN_EXECUTE_COMMON span name will provide visibility into plugin execution time and frequency.


348-351: Effectively instrumented MongoDB operation

Adding observability to the mongoOutputMono will provide valuable metrics about MongoDB command execution performance, which is especially useful for identifying slow queries.


1-1178:

Details

✅ Verification successful

Verify test coverage for new telemetry features

The telemetry additions are well-implemented, but ensure that tests have been updated to verify telemetry is correctly emitted. ObservationRegistry.NOOP should be used for tests to avoid unintended side effects.


🏁 Script executed:

#!/bin/bash
# Check if tests are passing and properly using ObservationRegistry.NOOP

# Search for test files that may need updating with the new ObservationRegistry parameter
echo "Looking for test files that may need updates for ObservationRegistry..."
rg -l "MongoPluginExecutor|RestAPIActivateUtils" --glob="*Test.java" --glob="*Tests.java"

# Check if tests are using ObservationRegistry.NOOP
echo "Checking if tests are using ObservationRegistry.NOOP..."
rg "ObservationRegistry.NOOP" --glob="*Test.java" --glob="*Tests.java"

Length of output: 4800


Telemetry Test Coverage Verified for Mongo Plugin
The tests have been updated to correctly utilize ObservationRegistry.NOOP. In particular, files like MongoPluginStaleConnTest.java, MongoPluginDatasourceTest.java, MongoPluginRegexTest.java, MongoPluginQueriesTest.java, and MongoPluginFormsTest.java properly instantiate the plugin executor with ObservationRegistry.NOOP, ensuring that telemetry data is emitted as expected without side effects.

@vsvamsi1 vsvamsi1 requested a review from ApekshaBhosale March 25, 2025 07:06
@rajatagrawal rajatagrawal added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Mar 25, 2025
@rajatagrawal rajatagrawal merged commit a8a831c into release Mar 25, 2025
95 of 157 checks passed
@rajatagrawal rajatagrawal deleted the test66 branch March 25, 2025 09:00
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description
added telemetry to the plugin 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  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14052770190>
> Commit: e7102de
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14052770190&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.All
> Spec: 
> The following are new failures, please fix them before merging the PR:
<ol>
>
<li>cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetEditorPropertyPane_spec.ts</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.
> <hr>Tue, 25 Mar 2025 08:51:35 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

- **New Features**
  - Introduced new tracing constants for improved action tracking.
- Enhanced observability across multiple plugins (for databases and
APIs) by integrating monitoring capabilities into their execution flows.

- **Tests**
- Updated test setups to initialize plugins with observation support,
ensuring consistency with the enhanced monitoring features.
<!-- 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.

2 participants