Skip to content

Commit edd4623

Browse files
authored
Release v3.17.0 (#1117)
1 parent a2874f4 commit edd4623

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

CHANGELOG.md

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

3+
## [v3.17.0] (2025-06-03)
4+
5+
* LangChain instrumentation via LangSmith by @alexmojaki in [#1084](https://github.com/pydantic/logfire/pull/1084)
6+
* MCP OTel context propagation by @samuelcolvin in [#1103](https://github.com/pydantic/logfire/pull/1103)
7+
* Add `capfire.get_collected_metrics()` by @alexmojaki in [#1116](https://github.com/pydantic/logfire/pull/1116)
8+
39
## [v3.16.2] (2025-06-03)
410

511
* Fixes for OpenAI Responses API and Agents SDK by @alexmojaki in [#1092](https://github.com/pydantic/logfire/pull/1092), [#1093](https://github.com/pydantic/logfire/pull/1093), [#1094](https://github.com/pydantic/logfire/pull/1094), and [#1095](https://github.com/pydantic/logfire/pull/1095)
@@ -714,3 +720,4 @@ First release from new repo!
714720
[v3.16.0]: https://github.com/pydantic/logfire/compare/v3.15.1...v3.16.0
715721
[v3.16.1]: https://github.com/pydantic/logfire/compare/v3.16.0...v3.16.1
716722
[v3.16.2]: https://github.com/pydantic/logfire/compare/v3.16.1...v3.16.2
723+
[v3.17.0]: https://github.com/pydantic/logfire/compare/v3.16.2...v3.17.0

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from ..constants import 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, 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
3+
from ..json_schema import JsonSchemaProperties as JsonSchemaProperties, attributes_json_schema as attributes_json_schema
34
from ..scrubbing import BaseScrubber as BaseScrubber
45
from ..utils import ReadableSpanDict as ReadableSpanDict, is_asgi_send_receive_span_name as is_asgi_send_receive_span_name, is_instrumentation_suppressed as is_instrumentation_suppressed, span_to_dict as span_to_dict, truncate_string as truncate_string
56
from .wrapper import WrapperSpanProcessor as WrapperSpanProcessor
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from logfire import LevelName as LevelName, Logfire as Logfire
22
from logfire._internal.utils import handle_internal_errors as handle_internal_errors
3+
from logfire.propagate import attach_context as attach_context, get_context as get_context
34

4-
def instrument_mcp(logfire_instance: Logfire): ...
5+
def instrument_mcp(logfire_instance: Logfire, propagate_otel_context: bool): ...

logfire-api/logfire_api/_internal/main.pyi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,13 @@ class Logfire:
401401
modules in `sys.modules` (i.e. modules that have already been imported) match the modules to trace.
402402
Set to `'warn'` to issue a warning instead, or `'ignore'` to skip the check.
403403
"""
404-
def instrument_mcp(self) -> None:
405-
"""Instrument [MCP](https://modelcontextprotocol.io/) requests such as tool calls."""
404+
def instrument_mcp(self, *, propagate_otel_context: bool = True) -> None:
405+
"""Instrument [MCP](https://modelcontextprotocol.io/) requests such as tool calls.
406+
407+
Args:
408+
propagate_otel_context: Whether to enable propagation of the OpenTelemetry context.
409+
Set to False to prevent setting extra fields like `traceparent` on the metadata of requests.
410+
"""
406411
def instrument_pydantic(self, record: PydanticPluginRecordValues = 'all', include: Iterable[str] = (), exclude: Iterable[str] = ()) -> None:
407412
"""Instrument Pydantic model validations.
408413

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.16.2"
7+
version = "3.17.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.16.2"
7+
version = "3.17.0"
88
description = "The best Python observability tool! 🪵🔥"
99
requires-python = ">=3.8"
1010
authors = [

uv.lock

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

0 commit comments

Comments
 (0)