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
4 changes: 4 additions & 0 deletions packages/dsw-document-worker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Fixed filtering Sentry events for document template issues


## [4.16.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,13 @@ def filter_templates(event: sentry.Event, hint: sentry.Hint) -> sentry.Event | N
phase = event.get('tags', {}).get('phase')
if phase in ('render', 'prepare') and template is not None:
template_config = Context.get().app.cfg.templates.get_config(template)
if template_config is not None and not template_config.send_sentry:
send_sentry = template_config.send_sentry if template_config else False
if not send_sentry:
LOG.debug('Skipping Sentry event (template, %s, %s)',
event.get('event_id'), hint)
return None
LOG.debug('Sending Sentry event (template, %s, %s)',
event.get('event_id'), hint)
return event

SentryReporter.filters.append(filter_templates)
Expand Down
Loading