Skip to content

feat: Enhance New Relic APM integration with improved initialization …#164

Merged
rostilos merged 1 commit intomainfrom
1.5.5-rc
Mar 6, 2026
Merged

feat: Enhance New Relic APM integration with improved initialization …#164
rostilos merged 1 commit intomainfrom
1.5.5-rc

Conversation

@rostilos
Copy link
Owner

@rostilos rostilos commented Mar 6, 2026

…and ASGI wrapping

Summary by CodeRabbit

Release Notes

  • Chores
    • Improved application startup process with enhanced error handling and comprehensive logging during initialization steps to provide better visibility into the startup sequence.
    • Optimized monitoring instrumentation with graceful fallback behavior when optional dependencies are unavailable or not properly initialized, ensuring the application continues to function reliably.

@rostilos rostilos merged commit 2492b73 into main Mar 6, 2026
1 check was pending
@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e8dbd781-e372-40c3-81b8-c8fec908ac72

📥 Commits

Reviewing files that changed from the base of the PR and between 7ed76d2 and 42942fa.

📒 Files selected for processing (2)
  • python-ecosystem/inference-orchestrator/src/api/app.py
  • python-ecosystem/inference-orchestrator/src/main.py

📝 Walkthrough

Walkthrough

Adds conditional New Relic instrumentation wrapping to the FastAPI application and improves bootstrap initialization with guarded imports, error handling, and detailed runtime logging across two initialization entry points.

Changes

Cohort / File(s) Summary
New Relic Instrumentation & Bootstrap
src/api/app.py, src/main.py
Adds defensive ASGI instrumentation wrapping in the HTTP server with conditional NewRelic agent initialization. Replaces naive boot initialization in main.py with guarded try/except pattern, enhanced logging for import/version/initialization steps, and graceful fallback when NewRelic is unavailable or unconfigured.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 New Relic wrapped with care and grace,
Guards against errors in every place,
With try-except blocks standing tall,
Instrumentation for one and all,
Logs that whisper when things go right,
Silent when missing—what a delight! 🌙

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 1.5.5-rc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant