feat(ws): improve warehouse-sources-load observability#60231
Merged
estefaniarabadan merged 2 commits intoMay 27, 2026
Merged
Conversation
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
posthog/temporal/data_imports/pipelines/pipeline_v3/load/processor.py:140
Using `capture_exception` with a freshly-constructed `Exception` is a misuse of the error-tracking API. Sentry treats this as an exception event: it groups all occurrences under the same issue (no real traceback, no surrounding context), and the grouping algorithm will conflate different counts as one noisy fingerprint. The situation has already been logged at `WARNING` level by structlog immediately above — if Sentry alerting is desired, `capture_message` is the appropriate call here since there is no real exception to capture.
```suggestion
capture_message(f"Found {len(modified_files)} modified delta files during first sync")
```
Reviews (1): Last reviewed commit: "add batch index" | Re-trigger Greptile |
| "Found modified files during first sync, skipping partial data loading", | ||
| batch_index=export_signal.batch_index, | ||
| modified_count=len(modified_files), | ||
| ) |
Contributor
There was a problem hiding this comment.
Using
capture_exception with a freshly-constructed Exception is a misuse of the error-tracking API. Sentry treats this as an exception event: it groups all occurrences under the same issue (no real traceback, no surrounding context), and the grouping algorithm will conflate different counts as one noisy fingerprint. The situation has already been logged at WARNING level by structlog immediately above — if Sentry alerting is desired, capture_message is the appropriate call here since there is no real exception to capture.
Suggested change
| ) | |
| capture_message(f"Found {len(modified_files)} modified delta files during first sync") |
Prompt To Fix With AI
This is a comment left during a code review.
Path: posthog/temporal/data_imports/pipelines/pipeline_v3/load/processor.py
Line: 140
Comment:
Using `capture_exception` with a freshly-constructed `Exception` is a misuse of the error-tracking API. Sentry treats this as an exception event: it groups all occurrences under the same issue (no real traceback, no surrounding context), and the grouping algorithm will conflate different counts as one noisy fingerprint. The situation has already been logged at `WARNING` level by structlog immediately above — if Sentry alerting is desired, `capture_message` is the appropriate call here since there is no real exception to capture.
```suggestion
capture_message(f"Found {len(modified_files)} modified delta files during first sync")
```
How can I resolve this? If you propose a fix, please make it concise.
Contributor
There was a problem hiding this comment.
Sentry? I though that was phased out. Does this make sense for us?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
we need more logs to understand what's happening under pipelines V3
Changes
How did you test this code?
Test pass
Publish to changelog?
NO