Release Notes — v1.1.2¶
Released: 2026-05-21 Type: Patch — Stability & Integration Fixes
Summary¶
v1.1.2 is a quality-of-life and stability patch releasing critical fixes for exceptions handling, reporting tools, and RAM/CPU auto-detection routines. It also introduces one breaking change renaming the Django middleware for naming consistency.
Breaking Changes¶
Django Middleware Renaming¶
For naming consistency across integrations, the Django middleware class has been renamed to EcoTraceDjangoMiddleware and its module location updated to ecotrace.middleware.django. The FastAPI EcoTraceMiddleware remains unchanged.
# Old (v1.1.0)
MIDDLEWARE = [
"ecotrace.middleware.django.EcoTraceMiddleware",
...
]
# New (v1.1.2)
MIDDLEWARE = [
"ecotrace.middleware.django.EcoTraceDjangoMiddleware",
...
]
Bug Fixes & Engine Improvements¶
1. Robust Exception Propagation¶
In measure and measure_async decorators/managers, user exceptions are now guaranteed to propagate after measurement teardown. Any internal EcoTrace telemetry errors during teardown are caught and handled, preventing them from masking original application failures.
2. Session atexit Optimization¶
Replaced per-instance registration of atexit handlers with a class-level handler tracking active WeakSet instances, reducing clean-up overhead and preventing memory retention issues during runtime restarts.
3. RAM & CPU Hardware Detection¶
- Windows: Upgraded to use PowerShell
Get-CimInstanceto retrieve RAM info, deprecatingwmicusage which could trigger security or deprecation warnings on newer Windows editions. - Linux:
dmidecodeis run withoutsudofirst. If output is empty, it attemptssudo -nfor passwordless execution. - CPU Info Caching: The caching logic was improved to reuse
fetch_raw_cpu_info()results instead of performing redundantcpuinfocalls.
4. PDF & CSV Reporting¶
generate_pdf_reportnow accepts customlog_path.- CSV report parser now correctly resolves columns via
DictReadercolumn names instead of hardcoded indexes, improving durability against log schema modifications.
5. Dependency & Versioning Tweaks¶
- Gemini AI:
google.generativeaipackage is now lazy-loaded insideget_gemini_insights(), avoiding unnecessary startup delays when AI features are not used. - User Agent: Resolved from installed package version with appropriate fallback values.
- Update Checker: Added safety check to return
Falseif parsing version strings fails. - Restored the default log level to
WARNINGto reduce terminal noise.
Installation¶
pip install ecotrace==1.1.2