Skip to content

docs: add documentation for experimental browser proxy handler#1742

Open
AlanPonnachan wants to merge 3 commits intopydantic:mainfrom
AlanPonnachan:docs/browser-proxy-handler
Open

docs: add documentation for experimental browser proxy handler#1742
AlanPonnachan wants to merge 3 commits intopydantic:mainfrom
AlanPonnachan:docs/browser-proxy-handler

Conversation

@AlanPonnachan
Copy link
Contributor

Summary

This PR adds the documentation for the newly merged experimental browser proxy handler (logfire.experimental.forwarding.logfire_proxy) introduced in #1697.

It bridges the gap between frontend browser telemetry and Python backends by explaining how to securely route OTLP payloads to Logfire without exposing the Write Token in the client-side code.

Changes Made

  • docs/integrations/javascript/browser.md:
    • Updated the "Securely Sending Traces" admonition to explicitly mention the new Python built-in handler.
    • Added cross-reference links to the FastAPI and Starlette documentation.
    • Updated the TS example to show url.pathname = "/logfire-proxy/v1/traces".
  • docs/integrations/web-frameworks/fastapi.md:
    • Added a "Proxying Browser Telemetry" section.
    • Provided idiomatic FastAPI examples showing how to mount the handler using @app.post while injecting the Request object.
    • Included an example demonstrating how to protect the unauthenticated endpoint using FastAPI's Depends (addressing security considerations discussed in the previous PR).
  • docs/integrations/web-frameworks/starlette.md:
    • Added a "Proxying Browser Telemetry" section.
    • Provided an example of mounting the handler directly as a Starlette Route.
    • Added a security admonition regarding authentication and rate-limiting for production use.

devin-ai-integration[bot]

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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