You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@burr.apache.org by "Smitaambiger (via GitHub)" <gi...@apache.org> on 2026/03/09 17:20:07 UTC

[PR] Enable Burr UI to be added to existing FastAPI app [burr]

Smitaambiger opened a new pull request, #671:
URL: https://github.com/apache/burr/pull/671

   This PR adds a reusable FastAPI factory and helper function to allow the Burr UI
   to be mounted inside an existing FastAPI application.
   
   Changes:
   - Added `create_burr_ui_app()` factory to construct the Burr UI FastAPI app.
   - Added `mount_burr_ui(parent_app, path="/burr")` helper to mount the UI as a sub-application.
   - Preserved existing behaviour with `app = create_burr_ui_app()`.
   
   This enables users to run Burr tracking UI alongside their own FastAPI services
   in the same application.
   
   Closes #503


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "Smitaambiger (via GitHub)" <gi...@apache.org>.
Smitaambiger commented on PR #671:
URL: https://github.com/apache/burr/pull/671#issuecomment-4054941316

   @skrawcz,Thanks for the feedback! I've updated the PR to:
   
   • expose the `name` parameter in mount_burr_ui
   • add parameter docstrings and an example in the function docstring
   • add a working example under /examples
   • add documentation under docs/concepts/tracking.rst
   
   Let me know if any further adjustments are needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz commented on code in PR #671:
URL: https://github.com/apache/burr/pull/671#discussion_r2926993545


##########
burr/tracking/server/run.py:
##########
@@ -140,7 +140,17 @@ async def lifespan(app: FastAPI):
     await backend.lifespan(app).__anext__()
 
 
-app = FastAPI(lifespan=lifespan)
+def create_burr_ui_app() -> FastAPI:
+    return FastAPI(lifespan=lifespan)
+
+app = create_burr_ui_app()
+
+def mount_burr_ui(parent_app: FastAPI, path: str = "/burr") -> None:
+    """
+    Mount the Burr UI inside another FastAPI app.

Review Comment:
   and example code on how to mount it from some other code.
   
   Also can you add and example to /examples and docs to docs/ for this new feature you're adding so that it's documented on how to use it? The example will show folks and prove out that this works.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "Smitaambiger (via GitHub)" <gi...@apache.org>.
Smitaambiger commented on PR #671:
URL: https://github.com/apache/burr/pull/671#issuecomment-4025447807

   Hi @skrawcz, I’ve opened a PR implementing the FastAPI factory and mount helper to allow Burr UI to be embedded inside another FastAPI app. Happy to adjust based on feedback.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz commented on PR #671:
URL: https://github.com/apache/burr/pull/671#issuecomment-4105550636

   Otherwise thanks for getting this started @Smitaambiger !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz commented on code in PR #671:
URL: https://github.com/apache/burr/pull/671#discussion_r2926980568


##########
burr/tracking/server/run.py:
##########
@@ -140,7 +140,17 @@ async def lifespan(app: FastAPI):
     await backend.lifespan(app).__anext__()
 
 
-app = FastAPI(lifespan=lifespan)
+def create_burr_ui_app() -> FastAPI:
+    return FastAPI(lifespan=lifespan)
+
+app = create_burr_ui_app()
+
+def mount_burr_ui(parent_app: FastAPI, path: str = "/burr") -> None:
+    """
+    Mount the Burr UI inside another FastAPI app.
+    """
+    ui_app = create_burr_ui_app()
+    parent_app.mount(path, ui_app, name="burr-ui")

Review Comment:
   let's expose `name` as a parameter



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "Smitaambiger (via GitHub)" <gi...@apache.org>.
Smitaambiger commented on PR #671:
URL: https://github.com/apache/burr/pull/671#issuecomment-4112487307

   @skrawcz, Thanks for the feedback!
   
   I’ll make sure to run and verify the feature locally end-to-end and include screenshots or validation steps in future PRs.
   Appreciate the fixes and guidance!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz commented on code in PR #671:
URL: https://github.com/apache/burr/pull/671#discussion_r2926984075


##########
burr/tracking/server/run.py:
##########
@@ -140,7 +140,17 @@ async def lifespan(app: FastAPI):
     await backend.lifespan(app).__anext__()
 
 
-app = FastAPI(lifespan=lifespan)
+def create_burr_ui_app() -> FastAPI:
+    return FastAPI(lifespan=lifespan)
+
+app = create_burr_ui_app()
+
+def mount_burr_ui(parent_app: FastAPI, path: str = "/burr") -> None:
+    """
+    Mount the Burr UI inside another FastAPI app.

Review Comment:
   doc string for parameters



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz merged PR #671:
URL: https://github.com/apache/burr/pull/671


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable Burr UI to be added to existing FastAPI app [burr]

Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz commented on PR #671:
URL: https://github.com/apache/burr/pull/671#issuecomment-4104206431

   @Smitaambiger with changes like these you really need to run things locally and verify that things work. Please do that next time and provide screenshots of things working.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org