Skip to content

Fix Wagtail transaction names#1705

Open
hmstepanek wants to merge 15 commits into
mainfrom
fix-wagtail-transaction-names
Open

Fix Wagtail transaction names#1705
hmstepanek wants to merge 15 commits into
mainfrom
fix-wagtail-transaction-names

Conversation

@hmstepanek

Copy link
Copy Markdown
Contributor

Overview

Fix Wagtail transaction names.

Related Github Issue

Fixes #1573.

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 9 0 0 0.81s
✅ MARKDOWN markdownlint 7 0 0 0 0.93s
✅ PYTHON ruff 1076 0 0 0 0.95s
✅ PYTHON ruff-format 1076 0 0 0 0.33s
✅ YAML prettier 23 0 0 0 1.32s
✅ YAML v8r 23 0 0 5.68s
✅ YAML yamllint 23 0 0 0.64s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@hmstepanek hmstepanek force-pushed the fix-wagtail-transaction-names branch from a284b4d to 9fd7f38 Compare April 6, 2026 23:27
@mergify mergify Bot added the tests-failing Tests failing in CI. label Apr 6, 2026
@codecov-commenter

codecov-commenter commented Apr 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.06%. Comparing base (d9a1079) to head (c97beab).

Files with missing lines Patch % Lines
newrelic/hooks/framework_django.py 76.19% 1 Missing and 4 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1705   +/-   ##
=======================================
  Coverage   82.06%   82.06%           
=======================================
  Files         216      216           
  Lines       26786    26807   +21     
  Branches     4238     4243    +5     
=======================================
+ Hits        21981    21999   +18     
- Misses       3339     3340    +1     
- Partials     1466     1468    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hmstepanek hmstepanek force-pushed the fix-wagtail-transaction-names branch from 49a14e6 to 58ac6f0 Compare July 6, 2026 18:55
Comment thread tests/framework_wagtail/dummy_app/models.py Outdated
Comment thread tests/framework_wagtail/dummy_app/models.py Outdated
@mergify mergify Bot removed the tests-failing Tests failing in CI. label Jul 7, 2026
@hmstepanek hmstepanek marked this pull request as ready for review July 8, 2026 17:37
@hmstepanek hmstepanek requested a review from a team as a code owner July 8, 2026 17:37
@mergify mergify Bot added the tests-failing Tests failing in CI. label Jul 8, 2026
Comment thread newrelic/hooks/framework_django.py Outdated
Comment on lines +493 to +497
try:
from wagtail.models.pages import Page
except:
Page = None
if instance and isinstance(instance, Page):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we maybe move this import to an import-hook and export it to the module level to avoid the overhead of constantly trying to import this for the vast majority of customers that don't have wagtail? We can change this if to check if Page is not none and ... and set Page to None by default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because there was already the same import hook in the wagtail hook module I had to move the wagtail import hook to the django module to make this work. Let me know your thoughts and if you'd prefer a different approach.

@mergify mergify Bot removed the tests-failing Tests failing in CI. label Jul 8, 2026
@hmstepanek hmstepanek force-pushed the fix-wagtail-transaction-names branch from ba9bf35 to e253a3e Compare July 9, 2026 23:28
@mergify mergify Bot added the tests-failing Tests failing in CI. label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-failing Tests failing in CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transaction names are inconsistent using Wagtail

3 participants