Repository navigation
Logs: follow the standard keys we are using everywhere - #13326
Conversation
I found that we had different logging keys for the same thing in different files. That makes debugging more difficult. I'm sticking with the same name everywhere, following the patterns we already have established.
Documentation build overview
9 files changed ·
|
| structlog.contextvars.bind_contextvars( | ||
| email=email_address.email, | ||
| username=user.username, | ||
| user_username=user.username, |
There was a problem hiding this comment.
I think it's fine to username, we aren't using user_email above.
There was a problem hiding this comment.
yeah, I was following the <model>_<field> pattern we are following in the rest of the log lines, but maybe for username and email doesn't make too much sense.
There was a problem hiding this comment.
Oh, I did the search and replace and it seems we are using user_username in a bunch of places already. So, it will be better to standardize to it instead of just username.
There was a problem hiding this comment.
We can make user_email as well if we want to, and keep this model_field consistency there as well.
|
I'd like to move forward here since I've been hitting issues when parsing NR logs due to having different keyword for the same values. |
ericholscher
left a comment
There was a problem hiding this comment.
This seems fine, but we should probably document this somewhere to keep it standardized.
We don't really have a good place for this particular content. We could create a new page on https://docs.readthedocs.com/dev/latest/guides/index.html maybe? I added to the |
I found that we had different logging keys for the same thing in different files. That makes debugging more difficult. I'm sticking with the same name everywhere, following the patterns we already have established.