Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add error telemetry support #778

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

himanshu-dixit
Copy link
Collaborator

@himanshu-dixit himanshu-dixit commented Oct 26, 2024

Important

Adds error telemetry support with global error handling and logging in exceptionHandler.ts, and updates related configurations.

  • Error Telemetry:
    • Adds exceptionHandler.ts to log errors to a remote server using Axios.
    • Implements logError() and setupErrorHandlers() for global error handling.
    • Uses COMPOSIO_VERSION from constants.js in error payload.
  • Constants:
    • Adds COMPOSIO_VERSION to constants.js.
  • Index:
    • Requires exceptionHandler in index.ts to initialize error handling.
  • Documentation:
    • Updates typedoc.json to include new entry points and exclude *.spec.ts files.

This description was created by Ellipsis for 796467d. It will automatically update as commits are pushed.

Copy link

vercel bot commented Oct 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 28, 2024 8:10am

Copy link
Contributor

@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.

❌ Changes requested. Reviewed everything up to aece8c6 in 19 seconds

More details
  • Looked at 131 lines of code in 5 files
  • Skipped 1 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. js/src/exceptionHandler.ts:1
  • Draft comment:
    The import version from 'os' is unused and can be removed.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The import statement for 'version' from 'os' is unused in the file. It should be removed to clean up the code.
2. js/src/index.ts:4
  • Draft comment:
    Remove the extra semicolon at the end of the import statement.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    There is an extra semicolon at the end of the import statement for OpenAIToolSet. This is a minor syntax issue.

Workflow ID: wflow_DB9w4m2FR9djsba7


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

nodeVersion: process.version
};

axios.post(`${baseURL}/api/v1/sdk/error`, payload);
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using await with axios.post to handle potential promise rejections.

Suggested change
axios.post(`${baseURL}/api/v1/sdk/error`, payload);
await axios.post(`${baseURL}/api/v1/sdk/error`, payload);

Copy link
Contributor

@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.

👍 Looks good to me! Incremental review on 796467d in 6 seconds

More details
  • Looked at 9 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_Wvqbv3JTILlQn1Dl


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Oct 26, 2024

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-11549819426/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-11549819426/html-report/report.html

Copy link

sweep-ai bot commented Oct 28, 2024

Hey @himanshu-dixit, here are examples of how you can ask me to improve this pull request:

@Sweep Fix the CI errors.
@Sweep Add unit tests for `logError` function in `exceptionHandler.ts` to verify:
- Error payload structure is correct
- API endpoint is called with correct parameters
- Error handling for failed API calls

📖 For more information on how to use Sweep, please read our documentation.

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.

1 participant