-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Labels
Description
Description
Hello Logfire team,
I recently ran into a need to programmatically retrieve the project URL from my write token. Currently, this isn’t straightforward—I had to dig into the source code to figure it out (pointer: test_configure.py#L1500).
Right now, I’m using the following workaround:
from logfire._internal.config import LogfireConfig
credentials = LogfireConfig()._initialize_credentials_from_token("...")
print(credentials.project_url)
While this works, it depends on internal APIs, which may not be stable or intended for external use.
Proposed Improvement
It would be useful if the project URL could be accessed directly through the public logfire module after configuration. For example:
import logfire
logfire.configure(token="...")
print(logfire.project_url)
Thanks!