Skip to content

add logfire dep group for performance exploration #17860

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

Merged
merged 6 commits into from
May 2, 2025
Merged

add logfire dep group for performance exploration #17860

merged 6 commits into from
May 2, 2025

Conversation

zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Apr 18, 2025

adds logfire and pyinstrument behind a perf dependency group (not published in project metadata)

to use this with prefect server start, just set

export PREFECT_LOGFIRE_ENABLED=1
export PREFECT_LOGFIRE_WRITE_TOKEN=asdfasdfasdfasdfasdfasdf

this should have no effect by default

Copy link

codspeed-hq bot commented Apr 18, 2025

CodSpeed Performance Report

Merging #17860 will not alter performance

Comparing logfire (10e209b) with main (5d6e0c6)

Summary

✅ 2 untouched benchmarks

@github-actions github-actions bot added the docs label Apr 18, 2025
@zzstoatzz zzstoatzz added development Tech debt, refactors, CI, tests, and other related work. and removed docs labels Apr 18, 2025
@github-actions github-actions bot added the docs label Apr 18, 2025
@zzstoatzz zzstoatzz marked this pull request as ready for review April 18, 2025 19:46
@zzstoatzz zzstoatzz changed the title add logfire extra for performance exploration add logfire dep group for performance exploration Apr 19, 2025
Comment on lines 11 to 28
class _LogfireSettings(PrefectBaseSettings):
"""
Settings for Logfire tracing
"""

model_config: ClassVar[SettingsConfigDict] = build_settings_config(
("experiments", "logfire")
)

enabled: bool = Field(
default=False,
description="If `True`, enables Logfire tracing. Set to `False` to disable Logfire tracing.",
)

write_token: Optional[str] = Field(
default=None,
description="The Logfire write token to use for tracing.",
)
Copy link
Member

Choose a reason for hiding this comment

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

If logfire isn't going to be installed via normal operation, I don't think we should include these settings as part of our schema. If we want to keep these settings then I think we should add a logfire extra. Otherwise, I think we can use plain environment variables to control logfire.

@zzstoatzz zzstoatzz merged commit bc7f6b2 into main May 2, 2025
55 checks passed
@zzstoatzz zzstoatzz deleted the logfire branch May 2, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants