Skip to content

Commit 61f1ead

Browse files
authored
Release v3.16.0 (#1077)
1 parent ce3e370 commit 61f1ead

File tree

7 files changed

+36
-4
lines changed

7 files changed

+36
-4
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+
## [v3.16.0] (2025-05-14)
4+
5+
* Make OpenAI spans show token usage in logfire UI by @alexmojaki in [#1076](https://github.com/pydantic/logfire/pull/1076)
6+
* Fixes for verbose console logging by @alexmojaki in [#1071](https://github.com/pydantic/logfire/pull/1071) and [#1072](https://github.com/pydantic/logfire/pull/1072)
7+
* Export first batch of spans more quickly by @alexmojaki in [#1066](https://github.com/pydantic/logfire/pull/1066)
8+
* Tighten scrubbing patterns to reduce accidental matches by @alexmojaki in [#1074](https://github.com/pydantic/logfire/pull/1074)
9+
* Add `do_not_scrub` and `binary_content` as safe keys for scrubber by @alexmojaki in [#1075](https://github.com/pydantic/logfire/pull/1075)
10+
311
## [v3.15.1] (2025-05-12)
412

513
* Support OpenTelemetry SDK 1.33.0 by @alexmojaki in [#1067](https://github.com/pydantic/logfire/pull/1067)
@@ -691,3 +699,4 @@ First release from new repo!
691699
[v3.14.1]: https://github.com/pydantic/logfire/compare/v3.14.0...v3.14.1
692700
[v3.15.0]: https://github.com/pydantic/logfire/compare/v3.14.1...v3.15.0
693701
[v3.15.1]: https://github.com/pydantic/logfire/compare/v3.15.0...v3.15.1
702+
[v3.16.0]: https://github.com/pydantic/logfire/compare/v3.15.1...v3.16.0

logfire-api/logfire_api/_internal/config.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ from .auth import DEFAULT_FILE as DEFAULT_FILE, DefaultFile as DefaultFile, is_l
55
from .config_params import ParamManager as ParamManager, PydanticPluginRecordValues as PydanticPluginRecordValues
66
from .constants import LevelName as LevelName, RESOURCE_ATTRIBUTES_CODE_ROOT_PATH as RESOURCE_ATTRIBUTES_CODE_ROOT_PATH, RESOURCE_ATTRIBUTES_CODE_WORK_DIR as RESOURCE_ATTRIBUTES_CODE_WORK_DIR, RESOURCE_ATTRIBUTES_DEPLOYMENT_ENVIRONMENT_NAME as RESOURCE_ATTRIBUTES_DEPLOYMENT_ENVIRONMENT_NAME, RESOURCE_ATTRIBUTES_VCS_REPOSITORY_REF_REVISION as RESOURCE_ATTRIBUTES_VCS_REPOSITORY_REF_REVISION, RESOURCE_ATTRIBUTES_VCS_REPOSITORY_URL as RESOURCE_ATTRIBUTES_VCS_REPOSITORY_URL
77
from .exporters.console import ConsoleColorsValues as ConsoleColorsValues, ConsoleLogExporter as ConsoleLogExporter, IndentedConsoleSpanExporter as IndentedConsoleSpanExporter, ShowParentsConsoleSpanExporter as ShowParentsConsoleSpanExporter, SimpleConsoleSpanExporter as SimpleConsoleSpanExporter
8+
from .exporters.dynamic_batch import DynamicBatchSpanProcessor as DynamicBatchSpanProcessor
89
from .exporters.logs import CheckSuppressInstrumentationLogProcessorWrapper as CheckSuppressInstrumentationLogProcessorWrapper, MainLogProcessorWrapper as MainLogProcessorWrapper
910
from .exporters.otlp import BodySizeCheckingOTLPSpanExporter as BodySizeCheckingOTLPSpanExporter, OTLPExporterHttpSession as OTLPExporterHttpSession, QuietLogExporter as QuietLogExporter, QuietSpanExporter as QuietSpanExporter, RetryFewerSpansSpanExporter as RetryFewerSpansSpanExporter
1011
from .exporters.processor_wrapper import CheckSuppressInstrumentationProcessorWrapper as CheckSuppressInstrumentationProcessorWrapper, MainSpanProcessorWrapper as MainSpanProcessorWrapper
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from _typeshed import Incomplete
2+
from logfire._internal.exporters.wrapper import WrapperSpanProcessor as WrapperSpanProcessor
3+
from opentelemetry.sdk.trace import ReadableSpan
4+
from opentelemetry.sdk.trace.export import SpanExporter
5+
6+
class DynamicBatchSpanProcessor(WrapperSpanProcessor):
7+
"""A wrapper around a BatchSpanProcessor that dynamically adjusts the schedule delay.
8+
9+
The initial schedule delay is set to 100ms, and after processing 10 spans, it is set to the value of
10+
the `OTEL_BSP_SCHEDULE_DELAY` environment variable (default: 500ms).
11+
This makes the initial experience of the SDK more responsive.
12+
"""
13+
final_delay: Incomplete
14+
num_processed: int
15+
def __init__(self, exporter: SpanExporter) -> None: ...
16+
def on_end(self, span: ReadableSpan) -> None: ...

logfire-api/logfire_api/_internal/main.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,8 @@ class Logfire:
926926
def metric_counter_callback(self, name: str, *, callbacks: Sequence[CallbackT], unit: str = '', description: str = '') -> None:
927927
"""Create a counter metric that uses a callback to collect observations.
928928
929+
The callback is called every 60 seconds in a background thread.
930+
929931
The counter metric is a cumulative metric that represents a single numerical value that only ever goes up.
930932
931933
```py
@@ -964,6 +966,8 @@ class Logfire:
964966
def metric_gauge_callback(self, name: str, callbacks: Sequence[CallbackT], *, unit: str = '', description: str = '') -> None:
965967
"""Create a gauge metric that uses a callback to collect observations.
966968
969+
The callback is called every 60 seconds in a background thread.
970+
967971
The gauge metric is a metric that represents a single numerical value that can arbitrarily go up and down.
968972
969973
```py
@@ -1000,6 +1004,8 @@ class Logfire:
10001004
def metric_up_down_counter_callback(self, name: str, callbacks: Sequence[CallbackT], *, unit: str = '', description: str = '') -> None:
10011005
"""Create an up-down counter metric that uses a callback to collect observations.
10021006
1007+
The callback is called every 60 seconds in a background thread.
1008+
10031009
The up-down counter is a cumulative metric that represents a single numerical value that can be adjusted up or
10041010
down.
10051011

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.15.1"
7+
version = "3.16.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.15.1"
7+
version = "3.16.0"
88
description = "The best Python observability tool! 🪵🔥"
99
requires-python = ">=3.8"
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)