Skip to content

Fix excessive memory growth warning to log plugin name instead of None#1560

Open
beaugunderson wants to merge 1 commit intomainfrom
fix/memory-growth-log-plugin-name
Open

Fix excessive memory growth warning to log plugin name instead of None#1560
beaugunderson wants to merge 1 commit intomainfrom
fix/memory-growth-log-plugin-name

Conversation

@beaugunderson
Copy link
Member

@beaugunderson beaugunderson commented Mar 9, 2026

The warning called is_plugin_caller() in the finally block where the call stack no longer reflects the plugin context, resulting in "running None". Now uses extra_tags["plugin"] (preferred) or the name parameter instead.

(Investigator wrote this code, I just had to open the PR since it failed that step)

The warning called is_plugin_caller() in the finally block where the call
stack no longer reflects the plugin context, resulting in "running None".
Now uses extra_tags["plugin"] (preferred) or the name parameter instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@beaugunderson beaugunderson requested a review from a team as a code owner March 9, 2026 08:58
@github-actions github-actions bot added the Jira: Not Linked PR body does not contain a Jira link label Mar 9, 2026
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.56%. Comparing base (64d0f46) to head (34e8ab0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1560   +/-   ##
=======================================
  Coverage   93.56%   93.56%           
=======================================
  Files         487      487           
  Lines       21850    21850           
  Branches     1013     1013           
=======================================
  Hits        20445    20445           
  Misses       1252     1252           
  Partials      153      153           
Flag Coverage Δ
plugin-abnormal_lab_task_notification 100.00% <ø> (ø)
plugin-api_samples 33.33% <ø> (ø)
plugin-appointment_coverage_label 100.00% <ø> (ø)
plugin-coverage_metadata_sync 100.00% <ø> (ø)
plugin-my_first_plugin 100.00% <ø> (ø)
plugin-patient_summary_chart_groups 100.00% <ø> (ø)
plugin-preact_hello_world 100.00% <ø> (ø)
plugin-send_all_prescriptions 100.00% <ø> (ø)
plugin-simple_note_button_plugin 100.00% <ø> (ø)
plugin-supervising_provider_prescribe 100.00% <ø> (ø)
plugin-supervising_provider_prescribe_protocol 100.00% <ø> (ø)
plugin-upsert_patient_metadata 100.00% <ø> (ø)
plugin-vitals_visualizer_plugin 98.43% <ø> (ø)
py3.11 93.59% <100.00%> (-0.01%) ⬇️
py3.12 93.59% <100.00%> (-0.01%) ⬇️
sdk-core 93.59% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@beaugunderson beaugunderson requested a review from djantzen March 9, 2026 09:00
Copy link
Contributor

@djantzen djantzen left a comment

Choose a reason for hiding this comment

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

Thanks for catching. The metrics collected during plugin runtime show up in Grafana attributed to the plugin, but not yet for plugin load operations. Could we also add track_plugin_usage=True to def load_or_reload_plugin in plugin_runner.py?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jira: Not Linked PR body does not contain a Jira link

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants