Skip to content

Commit f2be9d2

Browse files
authored
Release v3.24.0 (#1240)
1 parent b44c387 commit f2be9d2

File tree

8 files changed

+19
-6
lines changed

8 files changed

+19
-6
lines changed

CHANGELOG.md

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

3+
## [v3.24.0] (2025-07-10)
4+
5+
* Add experimental `logfire.instrument_litellm()` by @alexmojaki in [#1237](https://github.com/pydantic/logfire/pull/1237)
6+
37
## [v3.23.0] (2025-07-08)
48

59
* Add info method to logfire query clients by @hramezani in [#1204](https://github.com/pydantic/logfire/pull/1204)
@@ -777,3 +781,4 @@ First release from new repo!
777781
[v3.22.0]: https://github.com/pydantic/logfire/compare/v3.21.2...v3.22.0
778782
[v3.22.1]: https://github.com/pydantic/logfire/compare/v3.22.0...v3.22.1
779783
[v3.23.0]: https://github.com/pydantic/logfire/compare/v3.22.1...v3.23.0
784+
[v3.24.0]: https://github.com/pydantic/logfire/compare/v3.23.0...v3.24.0

logfire-api/logfire_api/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ from .version import VERSION as VERSION
1414
from logfire.sampling import SamplingOptions as SamplingOptions
1515
from typing import Any
1616

17-
__all__ = ['Logfire', 'LogfireSpan', 'LevelName', 'AdvancedOptions', 'ConsoleOptions', 'CodeSource', 'PydanticPlugin', 'configure', 'span', 'instrument', 'log', 'trace', 'debug', 'notice', 'info', 'warn', 'warning', 'error', 'exception', 'fatal', 'force_flush', 'log_slow_async_callbacks', 'install_auto_tracing', 'instrument_asgi', 'instrument_wsgi', 'instrument_pydantic', 'instrument_pydantic_ai', 'instrument_fastapi', 'instrument_openai', 'instrument_openai_agents', 'instrument_anthropic', 'instrument_google_genai', 'instrument_asyncpg', 'instrument_httpx', 'instrument_celery', 'instrument_requests', 'instrument_psycopg', 'instrument_django', 'instrument_flask', 'instrument_starlette', 'instrument_aiohttp_client', 'instrument_aiohttp_server', 'instrument_sqlalchemy', 'instrument_sqlite3', 'instrument_aws_lambda', 'instrument_redis', 'instrument_pymongo', 'instrument_mysql', 'instrument_system_metrics', 'instrument_mcp', 'AutoTraceModule', 'with_tags', 'with_settings', 'suppress_scopes', 'shutdown', 'no_auto_trace', 'ScrubMatch', 'ScrubbingOptions', 'VERSION', 'add_non_user_code_prefix', 'suppress_instrumentation', 'StructlogProcessor', 'LogfireLoggingHandler', 'loguru_handler', 'SamplingOptions', 'MetricsOptions', 'logfire_info', 'get_baggage', 'set_baggage']
17+
__all__ = ['Logfire', 'LogfireSpan', 'LevelName', 'AdvancedOptions', 'ConsoleOptions', 'CodeSource', 'PydanticPlugin', 'configure', 'span', 'instrument', 'log', 'trace', 'debug', 'notice', 'info', 'warn', 'warning', 'error', 'exception', 'fatal', 'force_flush', 'log_slow_async_callbacks', 'install_auto_tracing', 'instrument_asgi', 'instrument_wsgi', 'instrument_pydantic', 'instrument_pydantic_ai', 'instrument_fastapi', 'instrument_openai', 'instrument_openai_agents', 'instrument_anthropic', 'instrument_google_genai', 'instrument_litellm', 'instrument_asyncpg', 'instrument_httpx', 'instrument_celery', 'instrument_requests', 'instrument_psycopg', 'instrument_django', 'instrument_flask', 'instrument_starlette', 'instrument_aiohttp_client', 'instrument_aiohttp_server', 'instrument_sqlalchemy', 'instrument_sqlite3', 'instrument_aws_lambda', 'instrument_redis', 'instrument_pymongo', 'instrument_mysql', 'instrument_system_metrics', 'instrument_mcp', 'AutoTraceModule', 'with_tags', 'with_settings', 'suppress_scopes', 'shutdown', 'no_auto_trace', 'ScrubMatch', 'ScrubbingOptions', 'VERSION', 'add_non_user_code_prefix', 'suppress_instrumentation', 'StructlogProcessor', 'LogfireLoggingHandler', 'loguru_handler', 'SamplingOptions', 'MetricsOptions', 'logfire_info', 'get_baggage', 'set_baggage']
1818

1919
DEFAULT_LOGFIRE_INSTANCE = Logfire()
2020
span = DEFAULT_LOGFIRE_INSTANCE.span
@@ -31,6 +31,7 @@ instrument_openai = DEFAULT_LOGFIRE_INSTANCE.instrument_openai
3131
instrument_openai_agents = DEFAULT_LOGFIRE_INSTANCE.instrument_openai_agents
3232
instrument_anthropic = DEFAULT_LOGFIRE_INSTANCE.instrument_anthropic
3333
instrument_google_genai = DEFAULT_LOGFIRE_INSTANCE.instrument_google_genai
34+
instrument_litellm = DEFAULT_LOGFIRE_INSTANCE.instrument_litellm
3435
instrument_asyncpg = DEFAULT_LOGFIRE_INSTANCE.instrument_asyncpg
3536
instrument_httpx = DEFAULT_LOGFIRE_INSTANCE.instrument_httpx
3637
instrument_celery = DEFAULT_LOGFIRE_INSTANCE.instrument_celery

logfire-api/logfire_api/_internal/exporters/processor_wrapper.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ..constants import ATTRIBUTES_JSON_SCHEMA_KEY as ATTRIBUTES_JSON_SCHEMA_KEY, ATTRIBUTES_LOG_LEVEL_NUM_KEY as ATTRIBUTES_LOG_LEVEL_NUM_KEY, ATTRIBUTES_MESSAGE_KEY as ATTRIBUTES_MESSAGE_KEY, ATTRIBUTES_MESSAGE_TEMPLATE_KEY as ATTRIBUTES_MESSAGE_TEMPLATE_KEY, LEVEL_NUMBERS as LEVEL_NUMBERS, log_level_attributes as log_level_attributes
1+
from ..constants import ATTRIBUTES_JSON_SCHEMA_KEY as ATTRIBUTES_JSON_SCHEMA_KEY, ATTRIBUTES_LOG_LEVEL_NUM_KEY as ATTRIBUTES_LOG_LEVEL_NUM_KEY, ATTRIBUTES_MESSAGE_KEY as ATTRIBUTES_MESSAGE_KEY, ATTRIBUTES_MESSAGE_TEMPLATE_KEY as ATTRIBUTES_MESSAGE_TEMPLATE_KEY, ATTRIBUTES_TAGS_KEY as ATTRIBUTES_TAGS_KEY, LEVEL_NUMBERS as LEVEL_NUMBERS, log_level_attributes as log_level_attributes
22
from ..db_statement_summary import message_from_db_statement as message_from_db_statement
33
from ..json_schema import JsonSchemaProperties as JsonSchemaProperties, attributes_json_schema as attributes_json_schema
44
from ..scrubbing import BaseScrubber as BaseScrubber
@@ -26,3 +26,5 @@ class MainSpanProcessorWrapper(WrapperSpanProcessor):
2626
scrubber: BaseScrubber
2727
def on_start(self, span: Span, parent_context: context.Context | None = None) -> None: ...
2828
def on_end(self, span: ReadableSpan) -> None: ...
29+
30+
def guess_system(model: str): ...
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import logfire
2+
from typing import Any
3+
4+
def instrument_litellm(logfire_instance: logfire.Logfire, **kwargs: Any): ...

logfire-api/logfire_api/_internal/main.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ class Logfire:
580580
Use of this context manager is optional.
581581
"""
582582
def instrument_google_genai(self) -> None: ...
583+
def instrument_litellm(self, **kwargs: Any): ...
583584
def instrument_asyncpg(self, **kwargs: Any) -> None:
584585
"""Instrument the `asyncpg` module so that spans are automatically created for each query."""
585586
@overload

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.23.0"
7+
version = "3.24.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.23.0"
7+
version = "3.24.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)