-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Client Side: ``` async def the_parent_function(): async with AsyncClient(app=fake_app, base_url="http://localhost:8000") as client: headers = {} if span := get_current_span(): headers.update(span.to_headers()) return await client.post("/fake-route", headers=headers) ``` Server Side: ``` @fake_app.post("/fake-route") async def fake_route(request: Request): with tracing_context(headers=request.headers): fake_function() return {"message": "Fake route response"} ``` If people like, we could add some fun middleware, but probably not necessary
- Loading branch information
Showing
9 changed files
with
484 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.