logfire-api 6.0.0b2__tar.gz → 6.0.0b4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/PKG-INFO +1 -1
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/__init__.py +3 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/__init__.pyi +2 -1
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/mcp.pyi +0 -1
- logfire_api-6.0.0b4/logfire_api/_internal/integrations/monty.pyi +28 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/main.pyi +16 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/pyproject.toml +1 -1
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/.gitignore +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/README.md +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/ast_utils.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/async_.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/auth.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/auto_trace/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/auto_trace/import_hook.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/auto_trace/rewrite_ast.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/auto_trace/types.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/baggage.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli/ai_tools.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli/auth.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli/gateway.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli/gateway_auth.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli/prompt.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli/run.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/cli.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/client.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/collect_system_info.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/config.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/config_params.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/constants.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/db_statement_summary.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/console.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/dynamic_batch.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/logs.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/otlp.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/processor_wrapper.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/quiet_metrics.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/remove_pending.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/tail_sampling.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/wrapper.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/formatter.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/forwarding.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/instrument.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/aiohttp_client.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/aiohttp_server.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/asgi.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/asyncpg.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/aws_lambda.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/celery.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/claude_agent_sdk.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/django.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/dspy.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/executors.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/fastapi.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/flask.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/google_genai.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/httpx.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/litellm.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/litestar.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/mysql.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/openai_agents.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/print.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/psycopg.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/pydantic_ai.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/pymongo.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/pytest.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/redis.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/requests.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/snowflake.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/sqlalchemy.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/sqlite3.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/starlette.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/surrealdb.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/system_metrics.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/wsgi.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/interactive.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/json_encoder.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/json_formatter.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/json_schema.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/json_types.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/logs.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/metrics.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/scrubbing.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/server_response.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/stack_info.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/tracer.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/ulid.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/utils.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/cli.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/db_api.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/exceptions.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/experimental/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/experimental/annotations.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/experimental/api_client.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/experimental/datasets/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/experimental/query_client.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/aiohttp_client.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/flask.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/httpx.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/logging.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/loguru.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/psycopg.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/pydantic.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/redis.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/sqlalchemy.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/structlog.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/integrations/wsgi.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/propagate.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/py.typed +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/query_client.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/sampling/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/sampling/_tail_sampling.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/types.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/__init__.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/_handlebars.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/abstract.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/composition.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/config.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/local.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/remote.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/template_validation.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/variables/variable.pyi +0 -0
- {logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/version.pyi +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: logfire-api
|
|
3
|
-
Version: 6.0.
|
|
3
|
+
Version: 6.0.0b4
|
|
4
4
|
Summary: Shim for the Logfire SDK which does nothing unless Logfire is installed
|
|
5
5
|
Author-email: Pydantic Team <engineering@pydantic.dev>, Samuel Colvin <samuel@pydantic.dev>, Hasan Ramezani <hasan@pydantic.dev>, Adrian Garcia Badaracco <adrian@pydantic.dev>, David Montague <david@pydantic.dev>, Marcelo Trylesinski <marcelo@pydantic.dev>, David Hewitt <david.hewitt@pydantic.dev>, Alex Hall <alex@pydantic.dev>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -153,6 +153,8 @@ except ImportError:
|
|
|
153
153
|
|
|
154
154
|
def instrument_pydantic_ai(self, *args, **kwargs) -> None: ...
|
|
155
155
|
|
|
156
|
+
def instrument_monty(self, *args, **kwargs) -> None: ...
|
|
157
|
+
|
|
156
158
|
def instrument_pymongo(self, *args, **kwargs) -> None: ...
|
|
157
159
|
|
|
158
160
|
def instrument_sqlalchemy(self, *args, **kwargs) -> None: ...
|
|
@@ -244,6 +246,7 @@ except ImportError:
|
|
|
244
246
|
instrument_wsgi = DEFAULT_LOGFIRE_INSTANCE.instrument_wsgi
|
|
245
247
|
instrument_pydantic = DEFAULT_LOGFIRE_INSTANCE.instrument_pydantic
|
|
246
248
|
instrument_pydantic_ai = DEFAULT_LOGFIRE_INSTANCE.instrument_pydantic_ai
|
|
249
|
+
instrument_monty = DEFAULT_LOGFIRE_INSTANCE.instrument_monty
|
|
247
250
|
instrument_fastapi = DEFAULT_LOGFIRE_INSTANCE.instrument_fastapi
|
|
248
251
|
instrument_openai = DEFAULT_LOGFIRE_INSTANCE.instrument_openai
|
|
249
252
|
instrument_openai_agents = DEFAULT_LOGFIRE_INSTANCE.instrument_openai_agents
|
|
@@ -16,7 +16,7 @@ from logfire.propagate import attach_context as attach_context, get_context as g
|
|
|
16
16
|
from logfire.sampling import SamplingOptions as SamplingOptions
|
|
17
17
|
from typing import Any
|
|
18
18
|
|
|
19
|
-
__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_dspy', 'instrument_print', 'instrument_asyncpg', 'instrument_httpx', 'instrument_celery', 'instrument_requests', 'instrument_psycopg', 'instrument_django', 'instrument_flask', 'instrument_starlette', 'instrument_litestar', 'instrument_aiohttp_client', 'instrument_aiohttp_server', 'instrument_sqlalchemy', 'instrument_sqlite3', 'instrument_aws_lambda', 'instrument_redis', 'instrument_pymongo', 'instrument_mysql', 'instrument_surrealdb', 'instrument_snowflake', 'instrument_system_metrics', 'instrument_mcp', 'instrument_claude_agent_sdk', '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', 'VariablesOptions', 'LocalVariablesOptions', 'variables', 'var', 'template_var', 'variables_get', 'variables_push', 'variables_push_types', 'variables_validate', 'variables_push_config', 'variables_pull_config', 'variables_build_config', 'logfire_info', 'get_baggage', 'set_baggage', 'get_context', 'attach_context', 'url_from_eval', 'forward_export_request', 'forward_export_request_starlette']
|
|
19
|
+
__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_monty', 'instrument_fastapi', 'instrument_openai', 'instrument_openai_agents', 'instrument_anthropic', 'instrument_google_genai', 'instrument_litellm', 'instrument_dspy', 'instrument_print', 'instrument_asyncpg', 'instrument_httpx', 'instrument_celery', 'instrument_requests', 'instrument_psycopg', 'instrument_django', 'instrument_flask', 'instrument_starlette', 'instrument_litestar', 'instrument_aiohttp_client', 'instrument_aiohttp_server', 'instrument_sqlalchemy', 'instrument_sqlite3', 'instrument_aws_lambda', 'instrument_redis', 'instrument_pymongo', 'instrument_mysql', 'instrument_surrealdb', 'instrument_snowflake', 'instrument_system_metrics', 'instrument_mcp', 'instrument_claude_agent_sdk', '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', 'VariablesOptions', 'LocalVariablesOptions', 'variables', 'var', 'template_var', 'variables_get', 'variables_push', 'variables_push_types', 'variables_validate', 'variables_push_config', 'variables_pull_config', 'variables_build_config', 'logfire_info', 'get_baggage', 'set_baggage', 'get_context', 'attach_context', 'url_from_eval', 'forward_export_request', 'forward_export_request_starlette']
|
|
20
20
|
|
|
21
21
|
DEFAULT_LOGFIRE_INSTANCE = Logfire()
|
|
22
22
|
span = DEFAULT_LOGFIRE_INSTANCE.span
|
|
@@ -26,6 +26,7 @@ log_slow_async_callbacks = DEFAULT_LOGFIRE_INSTANCE.log_slow_async_callbacks
|
|
|
26
26
|
install_auto_tracing = DEFAULT_LOGFIRE_INSTANCE.install_auto_tracing
|
|
27
27
|
instrument_pydantic = DEFAULT_LOGFIRE_INSTANCE.instrument_pydantic
|
|
28
28
|
instrument_pydantic_ai = DEFAULT_LOGFIRE_INSTANCE.instrument_pydantic_ai
|
|
29
|
+
instrument_monty = DEFAULT_LOGFIRE_INSTANCE.instrument_monty
|
|
29
30
|
instrument_asgi = DEFAULT_LOGFIRE_INSTANCE.instrument_asgi
|
|
30
31
|
instrument_wsgi = DEFAULT_LOGFIRE_INSTANCE.instrument_wsgi
|
|
31
32
|
instrument_fastapi = DEFAULT_LOGFIRE_INSTANCE.instrument_fastapi
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from logfire import LevelName as LevelName, Logfire as Logfire
|
|
2
2
|
from logfire._internal.utils import handle_internal_errors as handle_internal_errors
|
|
3
3
|
from logfire.propagate import attach_context as attach_context, get_context as get_context
|
|
4
|
-
from mcp.shared.session import ReceiveRequestT as ReceiveRequestT
|
|
5
4
|
from mcp.types import ClientRequest as ClientRequest, ClientResult as ClientResult, ServerRequest as ServerRequest, ServerResult as ServerResult
|
|
6
5
|
|
|
7
6
|
def instrument_mcp(logfire_instance: Logfire, propagate_otel_context: bool): ...
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from collections.abc import Sequence
|
|
3
|
+
from logfire import Logfire as Logfire
|
|
4
|
+
from logfire._internal.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, ATTRIBUTES_SAMPLE_RATE_KEY as ATTRIBUTES_SAMPLE_RATE_KEY, ATTRIBUTES_TAGS_KEY as ATTRIBUTES_TAGS_KEY, DISABLE_CONSOLE_KEY as DISABLE_CONSOLE_KEY
|
|
5
|
+
from logfire._internal.formatter import logfire_format as logfire_format
|
|
6
|
+
from logfire.version import VERSION as VERSION
|
|
7
|
+
from opentelemetry._logs import LogRecord, Logger
|
|
8
|
+
from opentelemetry.context import Context
|
|
9
|
+
from opentelemetry.trace import Link as Link, Span, SpanKind, Tracer
|
|
10
|
+
from opentelemetry.util import types as otel_types
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
def instrument_monty(logfire_instance: Logfire) -> None:
|
|
14
|
+
"""Install process-wide Monty instrumentation using Logfire's OpenTelemetry components."""
|
|
15
|
+
|
|
16
|
+
class LogfireMontyTracer(Tracer):
|
|
17
|
+
"""Standard OTel tracer adding settings from a specific Logfire instance."""
|
|
18
|
+
logfire: Incomplete
|
|
19
|
+
def __init__(self, logfire_instance: Logfire) -> None: ...
|
|
20
|
+
def start_span(self, name: str, context: Context | None = None, kind: SpanKind = ..., attributes: otel_types.Attributes = None, links: Sequence[Link] | None = None, start_time: int | None = None, record_exception: bool = True, set_status_on_exception: bool = True) -> Span: ...
|
|
21
|
+
start_as_current_span: Incomplete
|
|
22
|
+
|
|
23
|
+
class LogfireMontyLogger(Logger):
|
|
24
|
+
"""Standard OTel logger adding settings from a specific Logfire instance."""
|
|
25
|
+
logger: Incomplete
|
|
26
|
+
logfire: Incomplete
|
|
27
|
+
def __init__(self, logger: Logger, logfire_instance: Logfire) -> None: ...
|
|
28
|
+
def emit(self, record: LogRecord | None = None, **kwargs: Any) -> None: ...
|
|
@@ -462,10 +462,16 @@ class Logfire:
|
|
|
462
462
|
Instruments both the client and server side. If possible, calling this in both the client and server
|
|
463
463
|
processes is recommended for nice distributed traces.
|
|
464
464
|
|
|
465
|
+
This is only needed with mcp 1.x. Version 2 of the SDK (which fastmcp 4 depends on) emits
|
|
466
|
+
OpenTelemetry spans and propagates the trace context via `_meta` by itself, so with it
|
|
467
|
+
`logfire.configure()` is all that's needed. Calling this method there does nothing
|
|
468
|
+
except emit a `UserWarning` saying so.
|
|
469
|
+
|
|
465
470
|
Args:
|
|
466
471
|
propagate_otel_context: Whether to enable propagation of the OpenTelemetry context
|
|
467
472
|
for distributed tracing.
|
|
468
473
|
Set to False to prevent setting extra fields like `traceparent` on the metadata of requests.
|
|
474
|
+
Ignored with mcp 2, which always propagates the context.
|
|
469
475
|
"""
|
|
470
476
|
def instrument_claude_agent_sdk(self) -> AbstractContextManager[None]:
|
|
471
477
|
"""Instrument the [Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview).
|
|
@@ -504,6 +510,16 @@ class Logfire:
|
|
|
504
510
|
def instrument_pydantic_ai(self, obj: pydantic_ai.Agent | None = None, /, *, include_binary_content: bool | None = None, include_content: bool | None = None, version: Literal[1, 2, 3, 4, 5] | None = None, event_mode: Literal['attributes', 'logs'] | None = None, **kwargs: Any) -> None: ...
|
|
505
511
|
@overload
|
|
506
512
|
def instrument_pydantic_ai(self, obj: pydantic_ai.models.Model, /, *, include_binary_content: bool | None = None, include_content: bool | None = None, version: Literal[1, 2, 3, 4, 5] | None = None, event_mode: Literal['attributes', 'logs'] | None = None, **kwargs: Any) -> pydantic_ai.models.Model: ...
|
|
513
|
+
def instrument_monty(self) -> None:
|
|
514
|
+
"""Instrument Pydantic Monty.
|
|
515
|
+
|
|
516
|
+
Call this once after [`configure()`][logfire.configure] and before creating a Monty pool.
|
|
517
|
+
The first call selects the Logfire instance and its settings for the whole process;
|
|
518
|
+
subsequent calls do not replace them.
|
|
519
|
+
|
|
520
|
+
It records Monty sessions, executed code, inputs, outputs, external calls,
|
|
521
|
+
exceptions, printed text, and pool metrics. Recorded values are subject to Logfire's configured scrubbing.
|
|
522
|
+
"""
|
|
507
523
|
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]:
|
|
508
524
|
"""Instrument a FastAPI app so that spans and logs are automatically created for each request.
|
|
509
525
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "logfire-api"
|
|
7
|
-
version = "6.0.
|
|
7
|
+
version = "6.0.0b4"
|
|
8
8
|
description = "Shim for the Logfire SDK which does nothing unless Logfire is installed"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Pydantic Team", email = "engineering@pydantic.dev" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/auto_trace/import_hook.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/auto_trace/rewrite_ast.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/dynamic_batch.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/processor_wrapper.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/quiet_metrics.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/remove_pending.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/exporters/tail_sampling.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/aiohttp_client.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/aiohttp_server.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/aws_lambda.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/claude_agent_sdk.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/executors.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/google_genai.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/openai_agents.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/pydantic_ai.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/snowflake.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/sqlalchemy.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/starlette.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/surrealdb.pyi
RENAMED
|
File without changes
|
{logfire_api-6.0.0b2 → logfire_api-6.0.0b4}/logfire_api/_internal/integrations/system_metrics.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|