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

chore(flags): add exception logging during DatabaseError handling in flag matching logic #29839

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

havenbarnes
Copy link
Contributor

Problem

Context: https://posthog.slack.com/archives/C08G5CFHC3V/p1741798684938329?thread_ts=1741620851.975329&cid=C08G5CFHC3V

Changes

Just two exception logs

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Existing coverage sufficient for validating syntax

@havenbarnes havenbarnes requested review from danielxnj and a team March 12, 2025 17:09
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds detailed exception logging for DatabaseError handling in the feature flag matching logic, improving observability for database-related issues during flag evaluation.

  • Added exception logging in group_types_to_indexes method to capture database errors during group type mapping retrieval
  • Added exception logging in query_conditions method to track database errors during flag condition evaluation
  • Both logs include error message and stack trace for better debugging context

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

very cool

@havenbarnes havenbarnes enabled auto-merge (squash) March 12, 2025 17:24
@havenbarnes havenbarnes merged commit 1c1173a into master Mar 12, 2025
88 checks passed
@havenbarnes havenbarnes deleted the decide-add-db-error-logging branch March 12, 2025 19:37
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.

3 participants