Skip to content

Conversation

@AnilSorathiya
Copy link
Contributor

Pull Request Description

Remove sentry code from the lib

What and why?

Decided not to use sentry anymore so removing all the dependencies.

How to test

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • [x ] What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@AnilSorathiya AnilSorathiya added the internal Not to be externalized in the release notes label Oct 16, 2025
@AnilSorathiya AnilSorathiya requested review from eggshell, johnwalz97, nibalizer and nrichers and removed request for nrichers October 16, 2025 16:01
@nibalizer
Copy link
Contributor

We will also need to remove docs on VM_NO_TELEMETRY cc @nrichers

@nrichers
Copy link
Collaborator

nrichers commented Oct 16, 2025

We will also need to remove docs on VM_NO_TELEMETRY cc @nrichers

@nibalizer the docs are generated off the codebase, so this should not require anything else.

Copy link
Contributor

@johnwalz97 johnwalz97 left a comment

Choose a reason for hiding this comment

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

nice! just one nitpick but lgtm

@github-actions
Copy link
Contributor

PR Summary

This PR makes several changes, primarily focusing on removing Sentry telemetry and modifying dependency definitions. The key changes include:

  1. Removal of Sentry-related functionality:

    • The API client (validmind/api_client.py) now no longer initializes Sentry telemetry. The helper functions related to Sentry (init_sentry and send_single_error) have been removed from validmind/logging.py.
    • The dependency on Sentry SDK has been modified in the lock file (sentry-sdk is now optional and tied to a specific extra marker) and removed as a direct dependency from pyproject.toml.
  2. Updates to dependency metadata in the poetry.lock file:

    • A new entry for the package "presidio-structured" has been introduced with version 0.0.4a0 along with dependency settings and platform markers.
    • The marker for the existing "presidio-structured" version 0.0.6 has been updated to target Python versions >=3.11 appropriately for the pii-detection extra.
    • Adjustments to the spacy package entries, including a redefinition of markers for pii-detection, have been made. Several obsolete spacy entries (with older versions and their associated file lists) have been removed and a new version (3.8.7) is now included.

Overall, the changes streamline error logging by removing Sentry integrations and update dependency definitions to better align with supported Python versions and feature flags.

Test Suggestions

  • Verify that API client operations (e.g., _ping and reload) function correctly without Sentry initialization, and that exceptions are raised as expected.
  • Run integration tests to ensure that dependency resolution and package markers correctly select the intended version of packages (e.g., presidio-structured and spacy) based on the Python version and extras.
  • Check that logging behavior remains robust and that error messages are being logged locally without attempting to send telemetry.
  • Perform regression tests to ensure that the removal of Sentry functionality does not affect other parts of the system that rely on error logging.

@AnilSorathiya AnilSorathiya merged commit 80bcf3e into main Oct 17, 2025
17 checks passed
@AnilSorathiya AnilSorathiya deleted the anilsorathiya/sc-12773/remove-sentry-code-from-vm-lib branch October 17, 2025 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants