agentops
agentops copied to clipboard
Add sentry for error emissions in AgentOps SDK
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
- Controlling Sentry
- A global variable determines whether Sentry is active.
- This variable can be changed dynamically at runtime.
- Sentry Setup
- If enabled, Sentry initializes with the appropriate configuration.
- If disabled, Sentry is not initialized, ensuring no errors are sent.
- 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??