agentops icon indicating copy to clipboard operation
agentops copied to clipboard

Add sentry for error emissions in AgentOps SDK

Open devin-ai-integration[bot] opened this issue 9 months ago • 1 comments

Requirements

  • Put Sentry in the SDK so we see where folks are breaking
  • Provide an opt-out variable and document it

Proposed Approach for Managing Sentry Integration

  1. Controlling Sentry
  • A global variable determines whether Sentry is active.
  • This variable can be changed dynamically at runtime.
  1. Sentry Setup
  • If enabled, Sentry initializes with the appropriate configuration.
  • If disabled, Sentry is not initialized, ensuring no errors are sent.
  1. Handling Errors
  • Errors are only logged in Sentry if tracking is turned on. -All exceptions are handled using the custom sentry function

Usage

By default, Sentry is enabled but can be switched on or off as needed. Provide a function to toggle this setting when needed. Developers can adjust the setting depending on requirements.

This method keeps Sentry tracking flexible while ensuring errors are recorded only when necessary.

@areibman @teocns Should I go with this approach??

fenilfaldu avatar Mar 19 '25 21:03 fenilfaldu