Skip to content

Commit

Permalink
Use birthday, not age on original example (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle authored Sep 5, 2024
1 parent f3462f0 commit 3494b30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ We'd love anyone interested to contribute to the Logfire SDK and documentation.
## How to contribute

1. Fork and clone the repository
2. [Install Rye](https://rye-up.com/guide/basics/)
2. [Install Rye](https://rye.astral.sh/guide/installation/)
3. Run `make install` to install dependencies
4. Run `make test` to run unit tests
5. Run `make format` to format code
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ logfire.configure() # (1)!

logfire.info('Hello, {name}!', name='world') # (2)!

with logfire.span('Asking the user their {question}', question='age'): # (3)!
user_input = input('How old are you [YYYY-mm-dd]? ')
with logfire.span('Asking the user for their {question}', question='birthday'): # (3)!
user_input = input('When were you born [YYYY-mm-dd]? ')
dob = date.fromisoformat(user_input) # (4)!
logfire.debug('{dob=} {age=!r}', dob=dob, age=date.today() - dob) # (5)!
```
Expand Down

0 comments on commit 3494b30

Please sign in to comment.