Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ingestors/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ def ingest(self, file_path, entity, **kwargs):
log.exception(f"[{repr(entity)}] Failed to process: {pexc}")
INGESTIONS_FAILED.labels(ingestor=ingestor_name).inc()
entity.set("processingError", stringify(pexc))
capture_exception(pexc)
if settings.SENTRY_CAPTURE_PROCESSING_EXCEPTIONS:
capture_exception(pexc)
finally:
self.finalize(entity)

Expand Down
7 changes: 7 additions & 0 deletions ingestors/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@

# Also store cached values in the SQL database
sls.TAGS_DATABASE_URI = fts.DATABASE_URI

# ProcessingException is thrown whenever something goes wrong wiht
# parsing a file. Enable this with care, it can easily eat up the
# Sentry quota of events.
SENTRY_CAPTURE_PROCESSING_EXCEPTIONS = env.to_bool(
"SENTRY_CAPTURE_PROCESSING_EXCEPTIONS", False
)