Skip to content

Commit

Permalink
Update docs/integrations/fastapi.md
Browse files Browse the repository at this point in the history
Co-authored-by: David Montague <[email protected]>
  • Loading branch information
sydney-runkle and dmontagu authored Oct 10, 2024
1 parent 40cbba6 commit 43f0885
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/integrations/fastapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ To avoid tracing certain URLs, you can specify a string of comma-separated regex
uvicorn.run(app)
```

If you visit http://127.0.0.1:8000/, that matches the above regex, so no span will be sent to logfire.
If you visit http://127.0.0.1:8000/hello/ (or any other endpoing that's not `/`, for that matter), a span will be sent to logfire.
If you visit http://127.0.0.1:8000/, that matches the above regex, so no tracing data will be recorded or sent to Logfire.
If you visit http://127.0.0.1:8000/hello/ (or any other endpoing that's not `/`, for that matter), a trace will be started and sent to Logfire.

Note that under the hood, the `opentelemetry` library is using `re.search` (not `re.match` or `re.fullmatch`) to check for a match between the route and the `excluded_urls` regex, which is why we need to include the `^` at the start and `$` at the end of the regex.

Expand Down

0 comments on commit 43f0885

Please sign in to comment.