Skip to content

Conversation

the-wondersmith
Copy link
Contributor

PR adds a simple Drop impl for ShutdownHandler to guarantee ShutdownHandler::shutdown is called, and "final" spans are sent.

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll move forward with this and probably an accompanying split so that .configure() first returns a Logfire instance. Because this ShutdownHandler is currently cloneable and I think the on-drop type probably doesn't want to be to avoid surprises of the whole system shutting down when one of the cloned instances is dropped.

(I guess the internals could be reference-counted, but that doesn't feel totally satisfying to me either. I think it's nicer to have a real Logfire type.)

@davidhewitt davidhewitt enabled auto-merge (squash) July 31, 2025 19:56
@davidhewitt davidhewitt merged commit a047e52 into pydantic:main Jul 31, 2025
7 checks passed
@the-wondersmith
Copy link
Contributor Author

( {...} I think it's nicer to have a real Logfire type.)

Agreed 😅. Please let me know what I / we (Shuttle) can do to help 😁.

@the-wondersmith the-wondersmith deleted the chore/impl-shutdownhandler-drop branch August 2, 2025 18:04
@davidhewitt
Copy link
Contributor

Think I have this done in #87

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants