Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add def non_user_code_prefix #745

Open
samuelcolvin opened this issue Dec 30, 2024 · 1 comment
Open

add def non_user_code_prefix #745

samuelcolvin opened this issue Dec 30, 2024 · 1 comment
Assignees

Comments

@samuelcolvin
Copy link
Member

Description

Add

def non_user_code_prefix(path: str | Path) -> None:
    if isinstance(path, Path):
        path = str(path)
    logfire._internal.stack_info.NON_USER_CODE_PREFIXES += (path,)

Equivilant to

logfire._internal.stack_info.NON_USER_CODE_PREFIXES += (str(Path(__file__).parent.absolute()),)
@samuelcolvin
Copy link
Member Author

samuelcolvin commented Dec 30, 2024

See pydantic/pydantic-ai#570, adding this to the public API, would also make it available via logfire_api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants