Skip to content

Commit d784965

Browse files
authored
Release v0.54.0 (#450)
1 parent 6be22a1 commit d784965

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Release Notes
22

3+
## [v0.54.0] (2024-09-26)
4+
5+
* **Changes in `logfire.configure()`:**
6+
* Remove `show_summary` and `fast_shutdown` by @alexmojaki in https://github.com/pydantic/logfire/pull/431
7+
* Move `base_url`, `id_generator`, and `ns_timestamp_generator` parameters into `advanced: AdvancedOptions` by @alexmojaki in https://github.com/pydantic/logfire/pull/432
8+
* Add `metrics` parameter by @alexmojaki in https://github.com/pydantic/logfire/pull/444
9+
* Remove default `min_duration` for `install_auto_tracing` by @alexmojaki in https://github.com/pydantic/logfire/pull/446
10+
311
## [v0.53.0] (2024-09-17)
412

513
* Tail sampling by @alexmojaki in https://github.com/pydantic/logfire/pull/407
@@ -282,6 +290,7 @@ First release from new repo!
282290
* Ensure `logfire.testing` doesn't depend on pydantic and eval_type_backport by @alexmojaki in https://github.com/pydantic/logfire/pull/40
283291
* Allow using pydantic plugin with models defined before calling logfire.configure by @alexmojaki in https://github.com/pydantic/logfire/pull/36
284292

293+
[v0.54.0]: https://github.com/pydantic/logfire/compare/v0.53.0...v0.54.0
285294
[v0.53.0]: https://github.com/pydantic/logfire/compare/v0.52.0...v0.53.0
286295
[v0.52.0]: https://github.com/pydantic/logfire/compare/v0.51.0...v0.52.0
287296
[v0.51.0]: https://github.com/pydantic/logfire/compare/v0.50.1...v0.51.0

logfire-api/logfire_api/_internal/auto_trace/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from .import_hook import LogfireFinder as LogfireFinder
44
from .types import AutoTraceModule as AutoTraceModule
55
from typing import Callable, Literal, Sequence
66

7-
def install_auto_tracing(logfire: Logfire, modules: Sequence[str] | Callable[[AutoTraceModule], bool], *, check_imported_modules: Literal['error', 'warn', 'ignore'] = 'error', min_duration: float = 0) -> None:
7+
def install_auto_tracing(logfire: Logfire, modules: Sequence[str] | Callable[[AutoTraceModule], bool], *, min_duration: float, check_imported_modules: Literal['error', 'warn', 'ignore'] = 'error') -> None:
88
"""Install automatic tracing.
99
1010
See `Logfire.install_auto_tracing` for more information.

logfire-api/logfire_api/_internal/main.pyi

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,12 @@ class Logfire:
335335
without waiting for the context manager to be opened,
336336
i.e. it's not necessary to use this as a context manager.
337337
"""
338-
def install_auto_tracing(self, modules: Sequence[str] | Callable[[AutoTraceModule], bool], *, check_imported_modules: Literal['error', 'warn', 'ignore'] = 'error', min_duration: float = 0) -> None:
338+
def install_auto_tracing(self, modules: Sequence[str] | Callable[[AutoTraceModule], bool], *, min_duration: float, check_imported_modules: Literal['error', 'warn', 'ignore'] = 'error') -> None:
339339
"""Install automatic tracing.
340340
341+
See the [Auto-Tracing guide](https://logfire.pydantic.dev/docs/guides/onboarding_checklist/add_auto_tracing/)
342+
for more info.
343+
341344
This will trace all non-generator function calls in the modules specified by the modules argument.
342345
It's equivalent to wrapping the body of every function in matching modules in `with logfire.span(...):`.
343346
@@ -356,13 +359,13 @@ class Logfire:
356359
Args:
357360
modules: List of module names to trace, or a function which returns True for modules that should be traced.
358361
If a list is provided, any submodules within a given module will also be traced.
362+
min_duration: A minimum duration in seconds for which a function must run before it's traced.
363+
Setting to `0` causes all functions to be traced from the beginning.
364+
Otherwise, the first time(s) each function is called, it will be timed but not traced.
365+
Only after the function has run for at least `min_duration` will it be traced in subsequent calls.
359366
check_imported_modules: If this is `'error'` (the default), then an exception will be raised if any of the
360367
modules in `sys.modules` (i.e. modules that have already been imported) match the modules to trace.
361368
Set to `'warn'` to issue a warning instead, or `'ignore'` to skip the check.
362-
min_duration: An optional minimum duration in seconds for which a function must run before it's traced.
363-
The default is `0`, which means all functions are traced from the beginning.
364-
Otherwise, the first time(s) each function is called, it will be timed but not traced.
365-
Only after the function has run for at least `min_duration` will it be traced in subsequent calls.
366369
"""
367370
def instrument_fastapi(self, app: FastAPI, *, capture_headers: bool = False, request_attributes_mapper: Callable[[Request | WebSocket, dict[str, Any]], dict[str, Any] | None] | None = None, use_opentelemetry_instrumentation: bool = True, excluded_urls: str | Iterable[str] | None = None, record_send_receive: bool = False, **opentelemetry_kwargs: Any) -> ContextManager[None]:
368371
"""Instrument a FastAPI app so that spans and logs are automatically created for each request.

logfire-api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "logfire-api"
7-
version = "0.53.0"
7+
version = "0.54.0"
88
description = "Shim for the Logfire SDK which does nothing unless Logfire is installed"
99
authors = [
1010
{ name = "Pydantic Team", email = "[email protected]" },

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "logfire"
7-
version = "0.53.0"
7+
version = "0.54.0"
88
description = "The best Python observability tool! 🪵🔥"
99
authors = [
1010
{ name = "Pydantic Team", email = "[email protected]" },

0 commit comments

Comments
 (0)