From bc9894bc045e9dae12163f8e6af4790ae4ccf91c Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Tue, 14 Jan 2025 11:56:34 +0200 Subject: [PATCH] Release v3.1.1 (#797) --- CHANGELOG.md | 5 +++++ logfire-api/logfire_api/_internal/config.pyi | 2 +- logfire-api/logfire_api/_internal/exporters/otlp.pyi | 4 ++++ logfire-api/pyproject.toml | 2 +- pyproject.toml | 2 +- uv.lock | 4 ++-- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c1a770a3..c10d4d5c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes +## [v3.1.1] (2025-01-14) + +* Prevent OTel from logging noisy traceback for handled requests exceptions by @alexmojaki in [#796](https://github.com/pydantic/logfire/pull/796) + ## [v3.1.0] (2025-01-09) * Add `capture_all` to `instrument_httpx` by @Kludex in [#780](https://github.com/pydantic/logfire/pull/780) @@ -524,3 +528,4 @@ First release from new repo! [v2.11.1]: https://github.com/pydantic/logfire/compare/v2.11.0...v2.11.1 [v3.0.0]: https://github.com/pydantic/logfire/compare/v2.11.1...v3.0.0 [v3.1.0]: https://github.com/pydantic/logfire/compare/v3.0.0...v3.1.0 +[v3.1.1]: https://github.com/pydantic/logfire/compare/v3.1.0...v3.1.1 diff --git a/logfire-api/logfire_api/_internal/config.pyi b/logfire-api/logfire_api/_internal/config.pyi index 35004886c..80f9e127a 100644 --- a/logfire-api/logfire_api/_internal/config.pyi +++ b/logfire-api/logfire_api/_internal/config.pyi @@ -5,7 +5,7 @@ from .auth import DEFAULT_FILE as DEFAULT_FILE, DefaultFile as DefaultFile, is_l from .config_params import ParamManager as ParamManager, PydanticPluginRecordValues as PydanticPluginRecordValues from .constants import LevelName as LevelName, OTLP_MAX_BODY_SIZE as OTLP_MAX_BODY_SIZE, 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 from .exporters.console import ConsoleColorsValues as ConsoleColorsValues, IndentedConsoleSpanExporter as IndentedConsoleSpanExporter, ShowParentsConsoleSpanExporter as ShowParentsConsoleSpanExporter, SimpleConsoleSpanExporter as SimpleConsoleSpanExporter -from .exporters.otlp import OTLPExporterHttpSession as OTLPExporterHttpSession, RetryFewerSpansSpanExporter as RetryFewerSpansSpanExporter +from .exporters.otlp import OTLPExporterHttpSession as OTLPExporterHttpSession, QuietSpanExporter as QuietSpanExporter, RetryFewerSpansSpanExporter as RetryFewerSpansSpanExporter from .exporters.processor_wrapper import CheckSuppressInstrumentationProcessorWrapper as CheckSuppressInstrumentationProcessorWrapper, MainSpanProcessorWrapper as MainSpanProcessorWrapper from .exporters.quiet_metrics import QuietMetricExporter as QuietMetricExporter from .exporters.remove_pending import RemovePendingSpansExporter as RemovePendingSpansExporter diff --git a/logfire-api/logfire_api/_internal/exporters/otlp.pyi b/logfire-api/logfire_api/_internal/exporters/otlp.pyi index 4c0b683e1..b204bbff9 100644 --- a/logfire-api/logfire_api/_internal/exporters/otlp.pyi +++ b/logfire-api/logfire_api/_internal/exporters/otlp.pyi @@ -47,3 +47,7 @@ class BodyTooLargeError(Exception): size: Incomplete max_size: Incomplete def __init__(self, size: int, max_size: int) -> None: ... + +class QuietSpanExporter(WrapperSpanExporter): + """A SpanExporter that catches request exceptions to prevent OTEL from logging a huge traceback.""" + def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: ... diff --git a/logfire-api/pyproject.toml b/logfire-api/pyproject.toml index 6d87e9a8d..52c95eab2 100644 --- a/logfire-api/pyproject.toml +++ b/logfire-api/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "logfire-api" -version = "3.1.0" +version = "3.1.1" description = "Shim for the Logfire SDK which does nothing unless Logfire is installed" authors = [ { name = "Pydantic Team", email = "engineering@pydantic.dev" }, diff --git a/pyproject.toml b/pyproject.toml index ff865807e..5089694a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "logfire" -version = "3.1.0" +version = "3.1.1" description = "The best Python observability tool! 🪵🔥" requires-python = ">=3.8" authors = [ diff --git a/uv.lock b/uv.lock index 6ce28a37f..9ef2a7b5f 100644 --- a/uv.lock +++ b/uv.lock @@ -1911,7 +1911,7 @@ wheels = [ [[package]] name = "logfire" -version = "3.1.0" +version = "3.1.1" source = { editable = "." } dependencies = [ { name = "executing" }, @@ -2213,7 +2213,7 @@ docs = [ [[package]] name = "logfire-api" -version = "3.1.0" +version = "3.1.1" source = { editable = "logfire-api" } [package.metadata]