-
Notifications
You must be signed in to change notification settings - Fork 51
Description
This isn't a bug report. It's just feedback/food for thought regarding some questions I have about module-level functions vs Client functions.
I'm using a custom Client instance instead of using the default client.
I've noticed that some module-level functions, such as new_context are available on Client. Others, like identify_context and tag, aren't. It's not clear to me why that is the case and whether using the module-level functions is safe if I'm using a custom Client.
Digging through the code a bit, I think using module-level functions with a custom Client is safe because Client doesn't store any context/properties itself, but I had to do some digging to convince myself. I feel like I wouldn't have had these safety questions if functions like identify_context and tag were available on Client.
P.S. One thing I noticed is that it looks like all Client instances share the same context stack. That's not an issue in my case because I'm only using the one Client, but I found it surprising and can definitely see a case for using multiple clients with independent context stacks.