Skip to content

Commit 7c66b1e

Browse files
authored
Release v4.0.0 (#1269)
1 parent f255281 commit 7c66b1e

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

CHANGELOG.md

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

3+
## [v4.0.0] (2025-07-22)
4+
5+
**BREAKING CHANGES**:
6+
7+
* Remove extra FastAPI spans by default by @alexmojaki in [#1268](https://github.com/pydantic/logfire/pull/1268)
8+
* Stop implicitly emitting deprecated process runtime metrics by @alexmojaki in [#932](https://github.com/pydantic/logfire/pull/932)
9+
310
## [v3.25.0] (2025-07-18)
411

512
* Use local timezone in console logging by @fswair in [#1255](https://github.com/pydantic/logfire/pull/1255)
@@ -801,3 +808,4 @@ First release from new repo!
801808
[v3.24.1]: https://github.com/pydantic/logfire/compare/v3.24.0...v3.24.1
802809
[v3.24.2]: https://github.com/pydantic/logfire/compare/v3.24.1...v3.24.2
803810
[v3.25.0]: https://github.com/pydantic/logfire/compare/v3.24.2...v3.25.0
811+
[v4.0.0]: https://github.com/pydantic/logfire/compare/v3.25.0...v4.0.0

logfire-api/logfire_api/_internal/integrations/fastapi.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ from typing import Any, Callable
1515

1616
def find_mounted_apps(app: FastAPI) -> list[FastAPI]:
1717
"""Fetch all sub-apps mounted to a FastAPI app, including nested sub-apps."""
18-
def instrument_fastapi(logfire_instance: Logfire, app: FastAPI, *, capture_headers: bool = False, request_attributes_mapper: Callable[[Request | WebSocket, dict[str, Any]], dict[str, Any] | None] | None = None, excluded_urls: str | Iterable[str] | None = None, record_send_receive: bool = False, extra_spans: bool = True, **opentelemetry_kwargs: Any) -> AbstractContextManager[None]:
18+
def instrument_fastapi(logfire_instance: Logfire, app: FastAPI, *, capture_headers: bool = False, request_attributes_mapper: Callable[[Request | WebSocket, dict[str, Any]], dict[str, Any] | None] | None = None, excluded_urls: str | Iterable[str] | None = None, record_send_receive: bool = False, extra_spans: bool = False, **opentelemetry_kwargs: Any) -> AbstractContextManager[None]:
1919
"""Instrument a FastAPI app so that spans and logs are automatically created for each request.
2020
2121
See `Logfire.instrument_fastapi` for more details.

logfire-api/logfire_api/_internal/integrations/system_metrics.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from logfire import Logfire as Logfire
44
from typing import Literal
55
from typing_extensions import LiteralString
66

7-
MetricName: type[Literal['system.cpu.simple_utilization', 'system.cpu.time', 'system.cpu.utilization', 'system.memory.usage', 'system.memory.utilization', 'system.swap.usage', 'system.swap.utilization', 'system.disk.io', 'system.disk.operations', 'system.disk.time', 'system.network.dropped.packets', 'system.network.packets', 'system.network.errors', 'system.network.io', 'system.network.connections', 'system.thread_count', 'process.open_file_descriptor.count', 'process.context_switches', 'process.cpu.time', 'process.cpu.utilization', 'process.cpu.core_utilization', 'process.memory.usage', 'process.memory.virtual', 'process.thread.count', 'process.runtime.gc_count', 'process.runtime.memory', 'process.runtime.cpu.time', 'process.runtime.thread_count', 'process.runtime.cpu.utilization', 'process.runtime.context_switches']]
7+
MetricName: type[Literal['system.cpu.simple_utilization', 'system.cpu.time', 'system.cpu.utilization', 'system.memory.usage', 'system.memory.utilization', 'system.swap.usage', 'system.swap.utilization', 'system.disk.io', 'system.disk.operations', 'system.disk.time', 'system.network.dropped.packets', 'system.network.packets', 'system.network.errors', 'system.network.io', 'system.network.connections', 'system.thread_count', 'process.open_file_descriptor.count', 'process.context_switches', 'process.cpu.time', 'process.cpu.utilization', 'process.cpu.core_utilization', 'process.memory.usage', 'process.memory.virtual', 'process.thread.count', 'process.runtime.gc_count']]
88
Config = dict[MetricName, Iterable[str] | None]
99
CPU_FIELDS: list[LiteralString]
1010
MEMORY_FIELDS: list[LiteralString]

logfire-api/logfire_api/_internal/main.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ class Logfire:
432432
def instrument_pydantic_ai(self, obj: pydantic_ai.Agent | None = None, /, *, event_mode: Literal['attributes', 'logs'] = 'attributes', include_binary_content: bool | None = None, **kwargs: Any) -> None: ...
433433
@overload
434434
def instrument_pydantic_ai(self, obj: pydantic_ai.models.Model, /, *, event_mode: Literal['attributes', 'logs'] = 'attributes', include_binary_content: bool | None = None, **kwargs: Any) -> pydantic_ai.models.Model: ...
435-
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, excluded_urls: str | Iterable[str] | None = None, record_send_receive: bool = False, extra_spans: bool = True, **opentelemetry_kwargs: Any) -> AbstractContextManager[None]:
435+
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, excluded_urls: str | Iterable[str] | None = None, record_send_receive: bool = False, extra_spans: bool = False, **opentelemetry_kwargs: Any) -> AbstractContextManager[None]:
436436
"""Instrument a FastAPI app so that spans and logs are automatically created for each request.
437437
438438
Uses the [OpenTelemetry FastAPI Instrumentation](https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/fastapi/fastapi.html)

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 = "3.25.0"
7+
version = "4.0.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 = "3.25.0"
7+
version = "4.0.0"
88
description = "The best Python observability tool! 🪵🔥"
99
requires-python = ">=3.9"
1010
authors = [

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)