AI Slop Code RIsk Monitor

pydantic/logfire

AI observability platform for production LLM and agent systems.

19.3 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for pydantic/logfire, a Python project with 4,511 GitHub stars. SynthScan examined 174,541 lines of code across 673 source files, recording 2871 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 19.3 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.3
Adjusted Signal
19.3
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
4.5K
Stars
Python
Language
174.5K
Lines of Code
673
Files
2.9K
Pattern Hits
2026-10-12
Scan Date
0.17
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 40.6/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 2077 finding(s).

Hallucinated Dependency & Supply Chain Risk 10.5/100 · LOW

Are imports declared and package/API names verified? 355 finding(s).

Agent Over-Engineering Ratio 51.9/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 2289 finding(s).

PR Review Velocity Impact 67.6/100 · HIGH

Which changes need focused human review? 2871 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 116MEDIUM 241LOW 2514

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 2871 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers1845 hits · 1392 pts
SeverityFileLineSnippetContext
LOWtests/test_secret_scrubbing.py41def test_optimized_default_patterns_match_naive_pattern():CODE
LOWtests/test_secret_scrubbing.py73def test_optimized_default_patterns_preserve_extra_pattern_order(extra_pattern: str, value: str, expected_match: str):CODE
LOWtests/test_secret_scrubbing.py87def test_default_pattern_start_chars_cover_each_pattern():CODE
LOWtests/test_secret_scrubbing.py189def test_scrub_log_event_attribute(logs_exporter: TestLogExporter):CODE
LOWtests/test_secret_scrubbing.py562def test_fstring_magic_scrubbing(exporter: TestExporter):CODE
LOWtests/test_secret_scrubbing.py651def test_default_patterns_match_docs():CODE
LOWtests/test_secret_scrubbing.py681def test_logfire_token_prefix_scrubbing(exporter: TestExporter):CODE
LOWtests/test_slow_async_callbacks.py13def test_slow_async_callbacks(exporter: TestExporter) -> None:CODE
LOWtests/test_query_client.py53def test_infers_base_url_from_token(CODE
LOWtests/test_query_client.py61def test_infers_base_url_from_unknown_token_region(CODE
LOWtests/test_query_client.py94def test_query_json_rows_read_sync():CODE
LOWtests/test_query_client.py150def test_query_arrow_read_sync():STRING
LOWtests/test_query_client.py178async def test_query_json_rows_read_async():STRING
LOWtests/test_query_client.py220async def test_query_csv_read_async():STRING
LOWtests/test_query_client.py239async def test_query_arrow_read_async():STRING
LOWtests/test_query_client.py321def test_query_body_params_sync():STRING
LOWtests/test_query_client.py337def test_query_methods_share_docstring():CODE
LOWtests/test_query_client.py353def test_query_method_signatures(client_class: type[AsyncLogfireQueryClient | LogfireQueryClient]):CODE
LOWtests/test_query_client.py366def test_query_json_rows_methods_share_returns_docstring():CODE
LOW⚡tests/test_internal_forwarding.py230def test_forwarding_path_config_timeout_defaults(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOW⚡tests/test_internal_forwarding.py238def test_forwarding_path_config_timeout_generic_fallback(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOW⚡tests/test_internal_forwarding.py246def test_forwarding_path_config_timeout_signal_specific_override(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_internal_forwarding.py47def test_parse_forwarding_content_type(content_type: str, expected: ForwardingContentType | None) -> None:CODE
LOWtests/test_internal_forwarding.py58def test_normalize_forwarding_path_valid(path: str, expected: str) -> None:CODE
LOWtests/test_internal_forwarding.py71def test_normalize_forwarding_path_rejections(path: str) -> None:CODE
LOWtests/test_internal_forwarding.py79def test_build_forwarding_request_valid_protobuf() -> None:CODE
LOWtests/test_internal_forwarding.py103def test_build_forwarding_request_valid_json_with_parameters() -> None:CODE
LOWtests/test_internal_forwarding.py120def test_build_forwarding_request_oversized_body() -> None:CODE
LOWtests/test_internal_forwarding.py143def test_build_forwarding_request_unsupported_content_type(headers: dict[str, str], content: bytes) -> None:CODE
LOWtests/test_internal_forwarding.py151def test_build_forwarding_request_invalid_path() -> None:CODE
LOWtests/test_internal_forwarding.py162def test_build_success_response_protobuf() -> None:CODE
LOWtests/test_internal_forwarding.py177def test_build_success_response_json() -> None:CODE
LOWtests/test_internal_forwarding.py192def test_build_partial_success_response_json() -> None:CODE
LOWtests/test_internal_forwarding.py212def test_build_partial_success_response_protobuf() -> None:CODE
LOWtests/test_internal_forwarding.py266def test_forwarding_pipeline_enqueue_accepts_and_accounts_bytes() -> None:CODE
LOWtests/test_internal_forwarding.py312def test_forwarding_pipeline_enqueue_rejects_at_item_limit() -> None:CODE
LOWtests/test_internal_forwarding.py326def test_forwarding_pipeline_at_fork_reinit_clears_inherited_queue_and_worker() -> None:CODE
LOWtests/test_internal_forwarding.py374def test_forwarding_pipeline_force_flush_success_waits_for_active_send() -> None:CODE
LOWtests/test_internal_forwarding.py393def test_forwarding_pipeline_shutdown_closes_admission_and_idle_session() -> None:CODE
LOWtests/test_internal_forwarding.py428def test_forwarding_pipeline_shutdown_drains_queued_work() -> None:CODE
LOWtests/test_internal_forwarding.py451def test_forwarding_pipeline_shutdown_timeout_drops_queued_work_after_active_send() -> None:CODE
LOWtests/test_internal_forwarding.py470def test_forwarding_pipeline_send_fans_out_to_tokens(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_internal_forwarding.py526def test_forwarding_pipeline_worker_continues_after_unexpected_send_failure() -> None:CODE
LOWtests/test_internal_forwarding.py542def test_forwarding_manager_destinations_create_pipeline_and_group_tokens(CODE
LOWtests/test_internal_forwarding.py580def test_forwarding_manager_after_fork_callback_is_weak(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_internal_forwarding.py620def test_forwarding_manager_submit_reinitializes_after_pid_change(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_internal_forwarding.py660def test_forwarding_manager_submit_success_enqueues_per_backend_url() -> None:CODE
LOWtests/test_internal_forwarding.py682def test_forwarding_manager_submit_partial_success_for_mixed_backend_outcomes() -> None:CODE
LOWtests/test_internal_forwarding.py707def test_forwarding_manager_submit_after_close_returns_partial_success_without_enqueue() -> None:CODE
LOWtests/test_internal_forwarding.py739def test_forwarding_manager_force_flush_uses_remaining_budget(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_internal_forwarding.py753def test_forwarding_manager_force_flush_returns_false_for_pipeline_timeout() -> None:CODE
LOWtests/test_internal_forwarding.py776def test_forwarding_manager_shutdown_uses_remaining_budget(CODE
LOWtests/test_internal_forwarding.py794def test_forwarding_manager_shutdown_returns_false_for_pipeline_timeout() -> None:CODE
LOWtests/test_build_offline_skill_prompt.py40def test_mandatory_references_are_never_dropped() -> None:CODE
LOWtests/test_build_offline_skill_prompt.py58def test_full_build_has_no_dead_reference_links() -> None:CODE
LOWtests/test_build_offline_skill_prompt.py82def test_reference_links_inside_appendix_resolve_to_inlined_anchors() -> None:CODE
LOWtests/test_build_offline_skill_prompt.py105def test_reference_link_fragments_are_qualified_by_their_file() -> None:CODE
LOWtests/test_build_offline_skill_prompt.py119def test_reference_heading_aliases_do_not_rewrite_code_fences() -> None:CODE
LOWtests/test_build_offline_skill_prompt.py128def test_build_rewrites_public_links_only_for_inlined_skills() -> None:CODE
LOW⚡tests/test_build_offline_skill_prompt.py139def test_auth_link_rewrite_preserves_the_complete_fragment() -> None:CODE
1785 more matches not shown…
Decorative Section Separators202 hits · 665 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_variable_composition.py496# =============================================================================COMMENT
MEDIUM⚡tests/test_variable_composition.py498# =============================================================================COMMENT
MEDIUM⚡tests/test_variable_composition.py713# =============================================================================COMMENT
MEDIUM⚡tests/test_variable_composition.py715# =============================================================================COMMENT
MEDIUMtests/test_variable_composition.py34# =============================================================================COMMENT
MEDIUMtests/test_variable_composition.py36# =============================================================================COMMENT
MEDIUM⚡tests/test_template_validation.py103# =============================================================================COMMENT
MEDIUM⚡tests/test_template_validation.py105# =============================================================================COMMENT
MEDIUM⚡tests/test_template_validation.py496# =============================================================================COMMENT
MEDIUM⚡tests/test_template_validation.py498# =============================================================================COMMENT
MEDIUMtests/test_template_validation.py19# =============================================================================COMMENT
MEDIUMtests/test_template_validation.py21# =============================================================================COMMENT
MEDIUMtests/test_template_validation.py359# =============================================================================COMMENT
MEDIUMtests/test_template_validation.py361# =============================================================================COMMENT
MEDIUM⚡tests/test_datasets_client.py582# =============================================================================COMMENT
MEDIUM⚡tests/test_datasets_client.py584# =============================================================================COMMENT
MEDIUM⚡tests/test_datasets_client.py1496# =============================================================================COMMENT
MEDIUM⚡tests/test_datasets_client.py1498# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py161# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py163# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py488# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py490# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py501# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py503# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py1071# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py1073# =============================================================================COMMENT
MEDIUM⚡tests/test_db_api.py86# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py88# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py97# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py99# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py123# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py125# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py225# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py227# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py313# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py315# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py443# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py445# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py518# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py520# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py605# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py607# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py625# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py627# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py668# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_db_api.py670# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py17# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py19# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py164# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py166# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py490# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py492# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py535# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py537# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py556# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py558# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py572# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py574# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py585# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_db_api.py587# ---------------------------------------------------------------------------COMMENT
142 more matches not shown…
Empty Error Handlers56 hits · 280 pts
SeverityFileLineSnippetContext
HIGHtests/conftest.py58except (ImportError, UserWarning, DeprecationWarning):CODE
HIGHtests/conftest.py77except ImportError:CODE
HIGHtests/test_configure.py2944except AttributeError:CODE
HIGHtests/test_logfire_api.py45except ImportError:CODE
HIGHtests/test_logfire_api.py76except Exception:CODE
HIGHtests/test_logfire_api.py323except AttributeError: # pragma: no cover # TODO figure this outCODE
HIGHtests/test_logfire_api.py336except ImportError:CODE
HIGHtests/test_cli.py94except SystemExit:CODE
HIGHtests/test_cli.py2914except PermissionError:CODE
HIGHtests/test_variables.py829except ValueError:CODE
HIGHtests/test_pydantic_plugin.py47except ImportError:CODE
HIGHtests/otel_integrations/fake_claude.py240except json.JSONDecodeError:CODE
HIGHtests/otel_integrations/fake_claude.py223except json.JSONDecodeError:CODE
HIGHtests/otel_integrations/fake_claude.py46except subprocess.TimeoutExpired:CODE
HIGHtests/otel_integrations/fake_claude.py175except json.JSONDecodeError:CODE
HIGH.github/workflows/scripts/minimal_install_smoke.py14except metadata.PackageNotFoundError:CODE
HIGHlogfire-sdk/logfire/_internal/stack_info.py60except ValueError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/config.py1847except: # noqa # weird errors can happen during shutdown, ignore them *all* with a bare exceptCODE
HIGHlogfire-sdk/logfire/_internal/config.py2446except Exception:CODE
HIGHlogfire-sdk/logfire/_internal/config.py1135except Exception:CODE
HIGHlogfire-sdk/logfire/_internal/config.py2270except EOFError:CODE
HIGHlogfire-sdk/logfire/_internal/forwarding.py205except Exception:CODE
HIGHlogfire-sdk/logfire/_internal/json_encoder.py300except Exception: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/json_encoder.py295except Exception: # currently redundant, but future-proofCODE
HIGHlogfire-sdk/logfire/_internal/json_encoder.py283except KeyError:CODE
HIGHlogfire-sdk/logfire/_internal/utils.py289except AttributeError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/utils.py249except FileExistsError:CODE
HIGHlogfire-sdk/logfire/_internal/utils.py333except Exception: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/config_params.py231except LogfireConfigError:CODE
HIGHlogfire-sdk/logfire/_internal/async_.py54except Exception:CODE
HIGHlogfire-sdk/logfire/_internal/auto_trace/import_hook.py60except Exception:CODE
HIGH…e-sdk/logfire/_internal/exporters/processor_wrapper.py622except Exception: # pragma: no coverCODE
HIGH…e-sdk/logfire/_internal/exporters/processor_wrapper.py216except Exception: # pragma: no coverCODE
HIGH…e-sdk/logfire/_internal/exporters/processor_wrapper.py248except Exception: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/exporters/otlp.py109except ImportError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/exporters/otlp.py116except ImportError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/exporters/test.py169except JSONDecodeError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/cli/auth.py117except webbrowser.Error:CODE
HIGHlogfire-sdk/logfire/_internal/cli/run.py556except importlib.metadata.PackageNotFoundError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/cli/__init__.py284except FileNotFoundError:CODE
HIGH…ire-sdk/logfire/_internal/integrations/google_genai.py35except Exception: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/integrations/pytest.py29except ImportError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/integrations/pytest.py351except ValueError: # pragma: no coverCODE
HIGH…re-sdk/logfire/_internal/integrations/openai_agents.py158except Exception: # pragma: no coverCODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py545except Exception:CODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py580except AssertionError:CODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py570except AssertionError:CODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py692except Exception:CODE
HIGH…e/_internal/integrations/llm_providers/llm_provider.py239except Exception: # pragma: no coverCODE
HIGH…/logfire/_internal/integrations/llm_providers/usage.py43except Exception:CODE
HIGH…/logfire/_internal/integrations/llm_providers/usage.py79except Exception:CODE
HIGH…/logfire/_internal/integrations/llm_providers/usage.py77except Exception:CODE
HIGHlogfire-sdk/logfire/variables/abstract.py687except Exception: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/variables/template_validation.py151except RecursionError:CODE
HIGHlogfire-sdk/logfire/variables/remote.py359except (json.JSONDecodeError, TypeError):CODE
HIGHlogfire-sdk/logfire/variables/variable.py173except Exception:CODE
Unused Imports279 hits · 244 pts
SeverityFileLineSnippetContext
LOWtests/test_secret_scrubbing.py1CODE
LOWtests/test_query_client.py1CODE
LOWtests/test_internal_forwarding.py1CODE
LOWtests/test_llm_provider.py3CODE
LOWtests/conftest.py2CODE
LOWtests/conftest.py11CODE
LOWtests/test_server_response.py1CODE
LOWtests/test_console_exporter.py2CODE
LOWtests/test_metrics.py1CODE
LOWtests/test_stdlib_logging.py1CODE
LOWtests/test_auth.py1CODE
LOWtests/test_source_code_extraction.py1CODE
LOWtests/test_variable_composition.py5CODE
LOWtests/test_loguru.py1CODE
LOWtests/test_template_validation.py5CODE
LOWtests/test_logfire.py1CODE
LOWtests/test_http_transport.py1CODE
LOWtests/test_url_from_eval.py1CODE
LOWtests/test_datasets_client.py5CODE
LOWtests/test_docs_serve.py1CODE
LOWtests/test_forwarding.py1CODE
LOWtests/test_configure.py1CODE
LOWtests/utils.py1CODE
LOWtests/test_db_api.py3CODE
LOWtests/test_push_variables.py4CODE
LOWtests/test_logfire_api.py1CODE
LOWtests/test_otel_logs.py1CODE
LOWtests/test_json_args.py1CODE
LOWtests/test_variable_templates.py5CODE
LOWtests/test_client.py1CODE
LOWtests/test_tail_sampling.py1CODE
LOWtests/test_query_client_errors.py7CODE
LOWtests/test_cli.py1CODE
LOWtests/test_sampling.py1CODE
LOWtests/test_variables.py4CODE
LOWtests/test_pydantic_plugin.py1CODE
LOWtests/exporters/test_retry_fewer_spans.py1CODE
LOWtests/exporters/test_dynamic_batch_span_processor.py1CODE
LOWtests/import_used_for_tests/open_span_at_shutdown.py1CODE
LOWtests/otel_integrations/test_claude_agent_sdk.py15CODE
LOWtests/otel_integrations/test_anthropic.py1CODE
LOWtests/otel_integrations/test_redis.py1CODE
LOWtests/otel_integrations/test_openai.py1CODE
LOWtests/otel_integrations/conftest.py1CODE
LOWtests/otel_integrations/test_snowflake.py1CODE
LOWtests/otel_integrations/test_faststream.py1CODE
LOWtests/otel_integrations/test_sqlalchemy.py1CODE
LOWtests/otel_integrations/test_pymongo.py1CODE
LOWtests/otel_integrations/fake_claude.py21CODE
LOWtests/otel_integrations/test_fastapi.py1CODE
LOWtests/otel_integrations/test_asgi.py1CODE
LOWtests/otel_integrations/test_mysql.py1CODE
LOWtests/otel_integrations/test_aiohttp_client.py1CODE
LOWtests/otel_integrations/test_dspy.py1CODE
LOWtests/otel_integrations/test_requests.py1CODE
LOWtests/otel_integrations/test_litestar.py1CODE
LOWtests/otel_integrations/test_starlette.py1CODE
LOWtests/otel_integrations/test_httpx.py1CODE
LOWtests/otel_integrations/test_wsgi.py1CODE
LOWtests/otel_integrations/test_pytest_plugin.py7CODE
219 more matches not shown…
Docstring Block Structure32 hits · 160 pts
SeverityFileLineSnippetContext
HIGHlogfire-sdk/logfire/_internal/config.py1876Check if a credentials file exists and if so load it. Args: creds_dir: Path to the credentials direSTRING
HIGHlogfire-sdk/logfire/_internal/config.py1955Configure one of the user projects to be used by Logfire. It configures the project if organization/project_namSTRING
HIGHlogfire-sdk/logfire/_internal/config.py2063Create a new project and configure it to be used by Logfire. It creates the project under the organization if bSTRING
HIGHlogfire-sdk/logfire/_internal/config.py2227Create a new project or use an existing project on logfire.dev requesting the given project name. Args: STRING
HIGHlogfire-sdk/logfire/_internal/exporters/test.py52The exported spans as a list of dicts. Args: fixed_line_number: The line number to use for all spanSTRING
HIGHlogfire-sdk/logfire/experimental/api_client.py709Update an existing dataset. Args: id_or_name: The dataset ID (UUID) or name. name: New STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py766List all cases in a dataset. Args: dataset_id_or_name: The dataset ID (UUID) or name. RetuSTRING
HIGHlogfire-sdk/logfire/experimental/api_client.py781Get a specific case from a dataset. Args: dataset_id_or_name: The dataset ID (UUID) or name. STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py805Publish a local `pydantic_evals.Dataset` to the hosted datasets API. This is the high-level "push my dataset toSTRING
HIGHlogfire-sdk/logfire/experimental/api_client.py912Add cases to a dataset. Accepts either pydantic-evals Case objects or plain dicts. By default, uses upSTRING
HIGHlogfire-sdk/logfire/experimental/api_client.py969Update an existing case. Args: dataset_id_or_name: The dataset ID (UUID) or name. case_STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py1053Get a dataset by ID or name. The return type depends on the arguments provided: - **No type arguments*STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py1247Async version of `LogfireAPIClient.push_dataset`. Args: dataset: The local `pydantic_evals.Dataset`STRING
HIGHlogfire-sdk/logfire/variables/abstract.py160Convert template `inputs` to a context dict for Handlebars rendering. Accepts whatever the variable's declared `inpSTRING
HIGHlogfire-sdk/logfire/variables/abstract.py1133Retrieve the serialized value for a variable. Args: variable_name: The name of the variable to resoSTRING
HIGHlogfire-sdk/logfire/variables/abstract.py1252Create a new variable configuration. Args: config: The configuration for the new variable. STRING
HIGHlogfire-sdk/logfire/variables/abstract.py1274Update an existing variable configuration. Args: name: The name of the variable to update. STRING
HIGHlogfire-sdk/logfire/variables/abstract.py1974Return None for all variable lookups. Args: variable_name: The name of the variable to resolve (ignSTRING
HIGHlogfire-sdk/logfire/variables/config.py352Evaluate rollout rules and return the selected label name. The resolution process: 1. Evaluate overrideSTRING
HIGHlogfire-sdk/logfire/variables/config.py391Resolve the serialized value for this variable. Resolution order: 1. If explicit label requested, look STRING
HIGHlogfire-sdk/logfire/variables/config.py507Evaluate a managed variable configuration and resolve the selected value. Args: name: The name of tSTRING
HIGHlogfire-sdk/logfire/variables/config.py635Check if all conditions match the provided attributes. Args: conditions: List of conditions to evaluate. STRING
HIGHlogfire-sdk/logfire/variables/remote.py540Resolve a variable's serialized value from the remote configuration. Args: variable_name: The name STRING
HIGHlogfire-sdk/logfire/variables/remote.py636Create a new variable configuration via the remote API. Args: config: The configuration for the newSTRING
HIGHlogfire-sdk/logfire/variables/remote.py665Update an existing variable configuration via the remote API. Args: name: The name of the variable STRING
HIGHlogfire-sdk/logfire/variables/remote.py843Create or update a variable type via the remote API. If a type with the given name exists, it will be updated. STRING
HIGHlogfire-sdk/logfire/variables/local.py39Resolve a variable's serialized value from the local configuration. Args: variable_name: The name oSTRING
HIGHlogfire-sdk/logfire/variables/local.py83Create a new variable configuration. Args: config: The configuration for the new variable. STRING
HIGHlogfire-sdk/logfire/variables/local.py102Update an existing variable configuration. Args: name: The name of the variable to update. STRING
HIGHlogfire-sdk/logfire/variables/variable.py952Resolve the variable and return full details including label, version, and any errors. Args: targetSTRING
HIGHlogfire-sdk/logfire/variables/variable.py1044Resolve the variable, render templates with the given inputs, and return the result. The resolution pipeline isSTRING
HIGHlogfire-sdk/logfire/variables/composition.py123Expand `@{var}@` references in a serialized variable value. Uses the Handlebars engine so `@{}@` supports the full STRING
Excessive Try-Catch Wrapping138 hits · 142 pts
SeverityFileLineSnippetContext
LOWtests/test_secret_scrubbing.py293 except Exception as e:CODE
LOWtests/test_url_from_eval.py7except Exception:CODE
LOWtests/test_datasets_client.py22except Exception:CODE
LOWtests/test_logfire_api.py76 except Exception:CODE
MEDIUMtests/test_canonicalize_exception.py184def test_cyclic_exception_cause():CODE
MEDIUMtests/test_canonicalize_exception.py214def test_cyclic_exception_group():CODE
MEDIUMtests/test_canonicalize_exception.py248def test_canonicalize_no_traceback():CODE
LOW⚡tests/test_canonicalize_exception.py28 except Exception as e:CODE
LOW⚡tests/test_canonicalize_exception.py33 except Exception as e:CODE
LOW⚡tests/test_canonicalize_exception.py38 except Exception:CODE
LOW⚡tests/test_canonicalize_exception.py42 except Exception:CODE
LOW⚡tests/test_canonicalize_exception.py45 except Exception as e4:CODE
LOW⚡tests/test_canonicalize_exception.py188 except Exception as e:STRING
LOW⚡tests/test_canonicalize_exception.py190 except Exception as e2:STRING
LOWtests/test_canonicalize_exception.py85 except Exception as e6:STRING
LOWtests/test_canonicalize_exception.py151 except Exception as e:STRING
LOWtests/test_canonicalize_exception.py220 except Exception as e:STRING
LOWtests/test_canonicalize_exception.py251 except Exception as e:STRING
LOWtests/test_canonicalize_exception.py277 except Exception as e:STRING
LOWtests/test_canonicalize_exception.py292 except Exception as e:STRING
LOWtests/test_canonicalize_exception.py307 except Exception as e:STRING
LOW…ternal_error_handling/internal_logfire_code_example.py27 except Exception:CODE
MEDIUM…ternal_error_handling/internal_logfire_code_example.py24def using_try_except():CODE
LOWtests/otel_integrations/fake_claude.py204 except Exception:CODE
LOWtests/otel_integrations/test_pydantic_ai_mcp.py37except Exception:CODE
LOWtests/otel_integrations/test_pydantic_ai.py15except Exception:CODE
LOWtests/otel_integrations/test_llm_usage_attributes.py20except Exception:CODE
LOWdocs/guides/onboarding-checklist/add-metrics.md55except Exception:CODE
LOWdocs/guides/onboarding-checklist/add-metrics.md192 except Exception: # Replace with the exception your client raises.CODE
LOWdocs/reference/advanced/generators.md151except Exception:CODE
LOWdocs/reference/advanced/generators.md239except Exception:CODE
LOWlogfire-sdk/logfire/_internal/formatter.py205 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/formatter.py212 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/formatter.py223 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/formatter.py269 except Exception:CODE
LOW⚡logfire-sdk/logfire/_internal/config.py1709 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py1135 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py1237 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py1726 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/config.py1733 except Exception as e: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/config.py1928 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py2396 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/config.py2446 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/forwarding.py189 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/forwarding.py205 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/json_schema.py153 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py295 except Exception: # currently redundant, but future-proofCODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py300 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py312 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py329 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/utils.py69except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py93 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py102 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py320 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py333 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py385 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py502 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/utils.py542 except Exception: # pragma: no coverCODE
MEDIUMlogfire-sdk/logfire/_internal/utils.py314def log_internal_error():CODE
LOWlogfire-sdk/logfire/_internal/ast_utils.py262 except Exception: # probably SyntaxError, but ast.parse can raise other exceptions tooCODE
78 more matches not shown…
Structural Annotation Overuse52 hits · 84 pts
SeverityFileLineSnippetContext
LOWdocs/cookbook/evaluate-an-agent.md42## Step 1: Build the agentCOMMENT
LOWdocs/cookbook/evaluate-an-agent.md75## Step 2: Instrument it and see the traceCOMMENT
LOWdocs/cookbook/evaluate-an-agent.md121## Step 3: Is it any good? Score it with an evalCOMMENT
LOWdocs/cookbook/evaluate-an-agent.md226## Step 4: Catch a regressionCOMMENT
LOWdocs/cookbook/evaluate-an-agent.md265## Step 5: Send the uncertain cases to a humanCOMMENT
LOWdocs/how-to-guides/sso-setup.md43## Step 1: Find the Redirect URI in LogfireCOMMENT
LOWdocs/how-to-guides/sso-setup.md52## Step 2: Create an App Registration in Azure Entra IDCOMMENT
LOWdocs/how-to-guides/sso-setup.md63## Step 3: Create a Client SecretCOMMENT
LOWdocs/how-to-guides/sso-setup.md71## Step 4: Collect Required Values from AzureCOMMENT
LOWdocs/how-to-guides/sso-setup.md83## Step 5: Configure the OIDC Provider in LogfireCOMMENT
LOWdocs/how-to-guides/sso-setup.md96## Step 6: Connect Entra IDCOMMENT
LOWdocs/how-to-guides/sso-setup.md104## Step 7: Test the SSO LoginCOMMENT
LOWdocs/how-to-guides/sso-setup.md121## Step 8: Invite Team MembersCOMMENT
LOWdocs/reference/self-hosted/bucket-migration.md33## Step 1: Replicate & Sync Bucket DataCOMMENT
LOWdocs/reference/self-hosted/bucket-migration.md66## Step 2: Scale Down Writer WorkloadsCOMMENT
LOWdocs/reference/self-hosted/bucket-migration.md138## Step 3: Deploy Updated Configuration & Scale UpCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md25## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md32## Step 2: Understand the RepoCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md50## Step 3: Fetch the Right Skill(s)COMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md70## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md76## Step 2: Detect Language and FrameworksCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md88## Step 3: Install and InstrumentCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md204## Step 4: Set Service Metadata and MetricsCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md246## Step 5: VerifyCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md358## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md365## Step 2: Identify What to MonitorCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md377## Step 3: Configure the CollectorCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md392## Step 4: VerifyCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md421## Step 1: Check for an Existing Braintrust Suite FirstCOMMENT
LOW⚡…re-sdk/logfire/.agents/skills/logfire-setup-offline.md441## Step 2: Authenticate When the Run Needs LogfireCOMMENT
LOW⚡…re-sdk/logfire/.agents/skills/logfire-setup-offline.md448## Step 3: Detect What to EvaluateCOMMENT
LOW⚡…re-sdk/logfire/.agents/skills/logfire-setup-offline.md455## Step 4: Define the Dataset and Run ItCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md565## Step 5: VerifyCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md14## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md20## Step 2: Detect Language and FrameworksCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md32## Step 3: Install and InstrumentCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md148## Step 4: Set Service Metadata and MetricsCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md190## Step 5: VerifyCOMMENT
LOW…fire-sdk/logfire/.agents/skills/logfire-evals/SKILL.md14## Step 1: Check for an Existing Braintrust Suite FirstCOMMENT
LOW⚡…fire-sdk/logfire/.agents/skills/logfire-evals/SKILL.md34## Step 2: Authenticate When the Run Needs LogfireCOMMENT
LOW⚡…fire-sdk/logfire/.agents/skills/logfire-evals/SKILL.md41## Step 3: Detect What to EvaluateCOMMENT
LOW⚡…fire-sdk/logfire/.agents/skills/logfire-evals/SKILL.md48## Step 4: Define the Dataset and Run ItCOMMENT
LOW…fire-sdk/logfire/.agents/skills/logfire-evals/SKILL.md158## Step 5: VerifyCOMMENT
LOW…fire-sdk/logfire/.agents/skills/logfire-setup/SKILL.md12## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…fire-sdk/logfire/.agents/skills/logfire-setup/SKILL.md19## Step 2: Understand the RepoCOMMENT
LOW…fire-sdk/logfire/.agents/skills/logfire-setup/SKILL.md37## Step 3: Fetch the Right Skill(s)COMMENT
LOW…logfire/.agents/skills/logfire-infrastructure/SKILL.md14## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…logfire/.agents/skills/logfire-infrastructure/SKILL.md21## Step 2: Identify What to MonitorCOMMENT
LOW…logfire/.agents/skills/logfire-infrastructure/SKILL.md33## Step 3: Configure the CollectorCOMMENT
LOW…logfire/.agents/skills/logfire-infrastructure/SKILL.md48## Step 4: VerifyCOMMENT
LOW⚡logfire-sdk/logfire/variables/config.py370 # Step 1: Determine the rollout and overrides to useCOMMENT
LOW⚡logfire-sdk/logfire/variables/config.py374 # Step 2: Find the first matching override, or use the base rolloutCOMMENT
Magic Placeholder Names15 hits · 78 pts
SeverityFileLineSnippetContext
HIGHdocs/evaluate/evals-in-code.md162 with LogfireAPIClient(api_key='your-api-key') as client:CODE
HIGHdocs/evaluate/datasets-sdk.md29client = LogfireAPIClient(api_key='your-api-key')CODE
HIGHdocs/evaluate/datasets-sdk.md35with LogfireAPIClient(api_key='your-api-key') as client:CODE
HIGHdocs/evaluate/datasets-sdk.md46 api_key='your-api-key',CODE
HIGHdocs/evaluate/datasets-sdk.md56async with AsyncLogfireAPIClient(api_key='your-api-key') as client:CODE
HIGHdocs/evaluate/datasets-sdk.md110with LogfireAPIClient(api_key='your-api-key') as client:CODE
HIGHdocs/how-to-guides/client-side-feature-flags.md42const LOGFIRE_API_KEY = 'your-api-key' // project:read_external_variables scopeCODE
HIGHdocs/how-to-guides/client-side-feature-flags.md217 headers_factory=lambda: {'Authorization': 'Bearer YOUR_API_KEY'},CODE
HIGHdocs/how-to-guides/client-side-feature-flags.md233 headers={'Authorization': 'Bearer YOUR_API_KEY'},CODE
HIGH⚡docs/reference/advanced/use-api-keys.md110 -H "Authorization: Bearer YOUR_API_KEY"CODE
HIGH⚡docs/reference/advanced/use-api-keys.md117 -H "Authorization: Bearer YOUR_API_KEY"CODE
HIGH⚡docs/reference/advanced/use-api-keys.md120Replace `YOUR_API_KEY` with your actual API key.CODE
HIGHdocs/reference/advanced/managed-variables/external.md62 headers={'Authorization': 'Bearer YOUR_API_KEY'},CODE
HIGHlogfire-sdk/logfire/experimental/api_client.py33 with LogfireAPIClient(api_key='your-api-key') as client:STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py566 with LogfireAPIClient(api_key='your-api-key') as client:STRING
Deep Nesting87 hits · 74 pts
SeverityFileLineSnippetContext
LOWtests/test_sampling.py102CODE
LOWtests/test_sampling.py129CODE
LOWtests/test_sampling.py162CODE
LOWtests/test_variables.py1782CODE
LOWtests/test_variables.py3393CODE
LOWtests/test_variables.py3441CODE
LOWtests/test_variables.py3487CODE
LOWtests/test_variables.py3521CODE
LOWtests/test_variables.py4718CODE
LOWtests/test_baggage.py124CODE
LOWtests/otel_integrations/test_anthropic.py637CODE
LOWtests/otel_integrations/test_openai.py41CODE
LOWtests/otel_integrations/fake_claude.py34CODE
LOWtests/otel_integrations/fake_claude.py72CODE
LOWtests/otel_integrations/test_openai_agents.py54CODE
LOWscripts/build_offline_skill_prompt.py111CODE
LOW.github/workflows/scripts/upgrade_install_smoke.py75CODE
LOWlogfire-sdk/logfire/query_client.py213CODE
LOWlogfire-sdk/logfire/_internal/json_formatter.py69CODE
LOWlogfire-sdk/logfire/_internal/formatter.py61CODE
LOWlogfire-sdk/logfire/_internal/formatter.py152CODE
LOWlogfire-sdk/logfire/_internal/config.py1155CODE
LOWlogfire-sdk/logfire/_internal/config.py1697CODE
LOWlogfire-sdk/logfire/_internal/config.py1947CODE
LOWlogfire-sdk/logfire/_internal/config.py2055CODE
LOWlogfire-sdk/logfire/_internal/config.py1278CODE
LOWlogfire-sdk/logfire/_internal/forwarding.py192CODE
LOWlogfire-sdk/logfire/_internal/json_schema.py99CODE
LOWlogfire-sdk/logfire/_internal/json_schema.py317CODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py246CODE
LOWlogfire-sdk/logfire/_internal/utils.py481CODE
LOWlogfire-sdk/logfire/_internal/scrubbing.py311CODE
LOWlogfire-sdk/logfire/_internal/db_statement_summary.py50CODE
LOWlogfire-sdk/logfire/_internal/instrument.py52CODE
LOWlogfire-sdk/logfire/_internal/instrument.py65CODE
LOWlogfire-sdk/logfire/_internal/main.py3450CODE
LOWlogfire-sdk/logfire/_internal/main.py724CODE
LOWlogfire-sdk/logfire/_internal/auto_trace/__init__.py16CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py89CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py174CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py310CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py390CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py478CODE
LOWlogfire-sdk/logfire/_internal/exporters/otlp.py308CODE
LOWlogfire-sdk/logfire/_internal/exporters/otlp.py354CODE
LOWlogfire-sdk/logfire/_internal/exporters/otlp.py437CODE
LOW…fire-sdk/logfire/_internal/exporters/remove_pending.py15CODE
LOWlogfire-sdk/logfire/_internal/cli/auth.py32CODE
LOWlogfire-sdk/logfire/_internal/cli/__init__.py66CODE
LOW…e-sdk/logfire/_internal/integrations/aiohttp_client.py113CODE
LOWlogfire-sdk/logfire/_internal/integrations/fastapi.py196CODE
LOWlogfire-sdk/logfire/_internal/integrations/psycopg.py28CODE
LOWlogfire-sdk/logfire/_internal/integrations/pytest.py432CODE
LOWlogfire-sdk/logfire/_internal/integrations/snowflake.py27CODE
LOW…sdk/logfire/_internal/integrations/claude_agent_sdk.py82CODE
LOW…sdk/logfire/_internal/integrations/claude_agent_sdk.py287CODE
LOW…sdk/logfire/_internal/integrations/claude_agent_sdk.py339CODE
LOW…re-sdk/logfire/_internal/integrations/openai_agents.py364CODE
LOW…re-sdk/logfire/_internal/integrations/openai_agents.py78CODE
LOW…re-sdk/logfire/_internal/integrations/openai_agents.py143CODE
27 more matches not shown…
Self-Referential Comments28 hits · 62 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_query_client.py13# This file is intended to be updated by the Logfire developers, with the development platform running locally.COMMENT
MEDIUMtests/test_metrics.py648 # Create a view that only keeps 'important' attribute for our custom counterCOMMENT
MEDIUMtests/test_variable_composition.py1049 # Create a variable config with a non-string variableCOMMENT
MEDIUMtests/test_tail_sampling.py634 # Create a span that doesn't trigger sampling — immediate processor gets on_start,COMMENT
MEDIUMtests/test_variables.py1729 # Create a logfire instanceCOMMENT
MEDIUMtests/test_variables.py1760 # Create a logfire instance and start the providerCOMMENT
MEDIUMtests/test_variables.py4006 # Create a new var to ensure there are changes (so push proceeds)COMMENT
MEDIUMtests/test_variables.py4341 # Create a real trace context using the logfire instanceCOMMENT
MEDIUMtests/test_variables.py4358 # Create a config that will report "not on server"COMMENT
MEDIUMtests/test_variables.py4372 # Create a config where variant validation will produce a multi-line errorCOMMENT
MEDIUMtests/test_variables.py4392 # Create a variable with a complex type that will generate multi-line errorsCOMMENT
MEDIUMtests/test_variables.py5201 # Create a type-like object without __module__COMMENT
MEDIUMtests/exporters/test_otlp_session.py576 # Create a bunch of failed exports.COMMENT
MEDIUMtests/otel_integrations/test_dspy.py132 # Define a simple signatureSTRING
MEDIUMtests/otel_integrations/test_dspy.py139 # Create a predictorCOMMENT
MEDIUMtests/otel_integrations/test_pytest_plugin.py68 # Create a conftest that captures spans to a JSON fileCOMMENT
MEDIUM⚡tests/otel_integrations/test_pytest_plugin.py1339 # Create a child span and verify it's properly nestedSTRING
MEDIUMtests/otel_integrations/test_pytest_plugin.py1185 # Create a child span and verify it's properly nestedSTRING
MEDIUMlogfire-sdk/logfire/propagate.py1"""This module provides a thin wrapper around the OpenTelemetry propagate API to allowSTRING
MEDIUMlogfire-sdk/logfire/_internal/config.py2118 # Creating a project is a side effect, so this is never assumed --COMMENT
MEDIUMlogfire-sdk/logfire/_internal/utils.py354 # This function is always called from log_internal_error, so skip that frame.COMMENT
MEDIUMlogfire-sdk/logfire/_internal/tracer.py342 # Create a no-op span with the same SpanContext as the current span.COMMENT
MEDIUMlogfire-sdk/logfire/_internal/cli/run.py437 # Create a final rule for the bottom sectionCOMMENT
MEDIUMlogfire-sdk/logfire/_internal/cli/run.py457 # Create a panel containing the content with a rounded box borderCOMMENT
MEDIUMlogfire-sdk/logfire/_internal/integrations/asgi.py81 # Create a no-op span with the same SpanContext as the current span.COMMENT
MEDIUMlogfire-sdk/logfire/_internal/integrations/pytest.py145 # Create a scoped logfire instance for pytest spansCOMMENT
MEDIUMlogfire-sdk/logfire/integrations/pydantic.py338 """This method is called every time a new `SchemaValidator` is created.STRING
MEDIUMlogfire-sdk/logfire/integrations/structlog.py12# This file is currently imported eagerly from __init__.py, so it shouldn't import structlog directlyCOMMENT
Modern Structural Boilerplate36 hits · 38 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_configure.py1397def _update_resource(self, resource: Resource) -> None:CODE
LOW⚡tests/test_configure.py1404def _update_resource(self, resource: Resource) -> None:CODE
LOW⚡tests/test_configure.py1409def _update_resource(self, resource: Resource) -> None:CODE
LOWtests/otel_integrations/test_anthropic.py1389 def set_attribute(self, key: str, value: Any) -> None:CODE
LOWtests/otel_integrations/test_anthropic.py1392 def set_attributes(self, attributes: dict[str, Any]) -> None:CODE
LOWrelease/versioning.py33def update_project_version(pyproject_file: str | Path, new_version: str) -> None:CODE
LOWrelease/versioning.py40def update_meta_version(pyproject_file: str | Path, new_version: str) -> None:CODE
LOWrelease/prepare.py63def update_history(new_version: str, notes: str) -> None:CODE
LOWlogfire-sdk/logfire/query_client.py30__all__ = [CODE
LOWlogfire-sdk/logfire/query_client.py256def _set_problem_attributes(error: _ProblemDetailsMixin, response: Response, problem: dict[str, Any] | None) -> None:CODE
LOWlogfire-sdk/logfire/testing.py22__all__ = [CODE
LOWlogfire-sdk/logfire/_internal/metrics.py65 def set_meter_provider(self, meter_provider: MeterProvider) -> None:CODE
LOWlogfire-sdk/logfire/_internal/metrics.py95 def set_meter(self, meter_provider: MeterProvider) -> None:CODE
LOWlogfire-sdk/logfire/_internal/logs.py49 def set_min_level(self, min_level: int) -> None:CODE
LOWlogfire-sdk/logfire/_internal/logs.py62 def set_provider(self, logger_provider: LoggerProvider) -> None:CODE
LOWlogfire-sdk/logfire/_internal/logs.py126 def set_logger(self, provider: LoggerProvider) -> None:CODE
LOWlogfire-sdk/logfire/_internal/interactive.py43def set_non_interactive(value: bool) -> None:CODE
LOWlogfire-sdk/logfire/_internal/main.py3310 def set_attribute(self, key: str, value: Any) -> None:CODE
LOWlogfire-sdk/logfire/_internal/main.py3323 def set_attributes(self, attributes: dict[str, Any]) -> None:CODE
LOWlogfire-sdk/logfire/_internal/main.py3372 def _set_attribute(self, key: str, value: Any) -> None:CODE
LOWlogfire-sdk/logfire/_internal/main.py3475def set_user_attributes_on_raw_span(span: Span, attributes: dict[str, Any]) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py67 def set_provider(self, provider: SDKTracerProvider) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py174 def set_attributes(self, attributes: Mapping[str, otel_types.AttributeValue]) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py177 def set_attribute(self, key: str, value: otel_types.AttributeValue) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py191 def update_name(self, name: str) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py286 def set_tracer(self, tracer: Tracer) -> None:CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py89def _set_error_level_and_status(span: ReadableSpanDict) -> None:CODE
LOWlogfire-sdk/logfire/_internal/cli/__init__.py47logger = logging.getLogger(__name__)CODE
LOW…e-sdk/logfire/_internal/integrations/aiohttp_client.py149 def _set_complex_span_attributes(self, attributes: dict[str, Any]) -> None:CODE
LOW⚡…sdk/logfire/_internal/integrations/claude_agent_sdk.py68def _set_state(state: _ConversationState) -> None:CODE
LOW…re-sdk/logfire/_internal/integrations/openai_agents.py334 def set_error(self, error: SpanError) -> None:CODE
LOWlogfire-sdk/logfire/sampling/__init__.py5__all__ = [CODE
LOWlogfire-sdk/logfire/integrations/pydantic.py254 def _set_span_attributes(self, span: LogfireSpan, *, status: str, success: bool, **attributes: Any) -> None:CODE
LOW⚡logfire-sdk/logfire/integrations/pydantic.py406def set_pydantic_plugin_config(plugin_config: PydanticPlugin | None) -> None:CODE
LOWlogfire-sdk/logfire/variables/__init__.py54__all__ = [CODE
LOWlogfire-api/logfire_api/__init__.py88 def set_attribute(self, key: str, value: Any) -> None: ... # pragma: no coverCODE
Cross-File Repetition7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHdocs/integrations/llms/langgraph.md0look up the current status and owner of an incident by id.STRING
HIGHdocs/integrations/llms/autogen.md0look up the current status and owner of an incident by id.STRING
HIGHdocs/integrations/llms/crewai.md0look up the current status and owner of an incident by id.STRING
HIGHlogfire-sdk/logfire/_internal/integrations/starlette.py0instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for STRING
HIGHlogfire-sdk/logfire/_internal/integrations/flask.py0instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for STRING
HIGHlogfire-sdk/logfire/_internal/integrations/asgi.py0instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for STRING
HIGHlogfire-sdk/logfire/_internal/integrations/wsgi.py0instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for STRING
Fake / Example Data55 hits · 34 pts
SeverityFileLineSnippetContext
LOWtests/test_configure.py1962 # we check that fake_token is valid now when we configure the projectCOMMENT
LOW⚡tests/test_configure.py2554 with patch.dict(os.environ, {'LOGFIRE_TOKEN': 'fake_token'}), requests_mock.Mocker() as request_mocker:CODE
LOW⚡tests/test_configure.py2562 assert request_mocker.request_history[0].headers['Authorization'] == 'fake_token'CODE
LOW⚡tests/test_configure.py2579 with patch.dict(os.environ, {'LOGFIRE_TOKEN': 'fake_token'}), requests_mock.Mocker() as request_mocker:CODE
LOW⚡tests/test_configure.py2586 assert logfire.DEFAULT_LOGFIRE_INSTANCE.config.token == 'fake_token'CODE
LOW⚡tests/test_configure.py2590 assert request_mocker.request_history[0].headers['Authorization'] == 'fake_token'CODE
LOWtests/test_configure.py1695 'token': 'fake_token',CODE
LOWtests/test_configure.py1755 'token': 'fake_token',CODE
LOWtests/test_configure.py1817 'token': 'fake_token',CODE
LOWtests/test_configure.py1942 'token': 'fake_token',CODE
LOWtests/test_configure.py1965 assert request_mocker.request_history[-1].headers['Authorization'] == 'fake_token'CODE
LOWtests/test_configure.py2052 'token': 'fake_token',CODE
LOWtests/test_configure.py2113 'token': 'fake_token',CODE
LOWtests/test_configure.py2179 'token': 'fake_token',CODE
LOWtests/test_configure.py2237 'token': 'fake_token',CODE
LOWtests/test_configure.py2292 'token': 'fake_token',CODE
LOWtests/test_db_api.py74 read_token='fake-token',CODE
LOWtests/test_json_args.py464 NameEmail(name='John Doe', email='john.doe@mail.com'),CODE
LOWtests/test_variable_templates.py210 resolved = var.get(Inputs(user_name='Alice', company='Acme Corp'))CODE
LOWtests/test_cli.py643token = "fake_token"CODE
LOWtests/test_cli.py1321 json={'token': 'fake_token', 'expiration': 'fake_exp'},CODE
LOWtests/test_cli.py1374 dict(text='{"token": "fake_token", "expiration": "fake_exp"}'),CODE
LOWtests/test_cli.py1466 dict(text='{"token": "fake_token", "expiration": "fake_exp"}'),CODE
LOWtests/test_cli.py1630 'token': 'fake_token',CODE
LOWtests/test_cli.py1676 'token': 'fake_token',CODE
LOWtests/test_cli.py1724 'token': 'fake_token',CODE
LOWtests/test_cli.py1770 'token': 'fake_token',CODE
LOWtests/test_cli.py1819 'token': 'fake_token',CODE
LOWtests/test_cli.py1922 'token': 'fake_token',CODE
LOWtests/test_cli.py1966 'token': 'fake_token',CODE
LOWtests/test_cli.py2014 'token': 'fake_token',CODE
LOWtests/test_cli.py2067 'token': 'fake_token',CODE
LOWtests/test_cli.py2105 'token': 'fake_token',CODE
LOWtests/test_cli.py2215 json={'token': 'fake_token'},CODE
LOWtests/test_cli.py2221 assert output == snapshot('fake_token\n')CODE
LOWtests/test_cli.py3310 'token': 'fake_token',CODE
LOWtests/test_cli.py3356 'token': 'fake_token',CODE
LOWtests/test_cli.py3415 'token': 'fake_token',CODE
LOWtests/test_cli.py3478 'token': 'fake_token',CODE
LOWtests/test_cli.py3521 'token': 'fake_token',CODE
LOWtests/test_cli.py3582 'token': 'fake_token',CODE
LOWtests/test_cli.py3646 'token': 'fake_token',CODE
LOWtests/test_cli.py3763 'token': 'fake_token',CODE
LOWtests/test_cli.py6449 json={'token': 'fake_token'},CODE
LOW⚡tests/test_cli.py691 text='{"token": "fake_token", "expiration": "fake_exp"}',STRING
LOW⚡tests/test_cli.py699 assert 'fake_token' in auth_file.read_text()STRING
LOW⚡tests/test_cli.py758 text='{"token": "fake_token", "expiration": "fake_exp"}',STRING
LOW⚡tests/test_cli.py763 assert 'fake_token' in auth_file.read_text()STRING
LOW⚡tests/test_cli.py847 text='{"token": "fake_token", "expiration": "fake_exp"}',STRING
LOW⚡tests/test_cli.py854 assert 'fake_token' in auth_file.read_text()STRING
LOWtests/test_cli.py634 dict(text='{"token": "fake_token", "expiration": "fake_exp"}'),STRING
LOWtests/test_cli.py1476token = "fake_token"STRING
LOWtests/test_cli.py6653 'env = { "LOGFIRE_READ_TOKEN" = "fake_token" }\n'STRING
LOW⚡tests/test_variables.py127 assert condition.matches({'email': 'user@example.com'}) is TrueCODE
LOWdocs/integrations/llms/instructor.md50#> name='John Doe' age=30COMMENT
Cross-Language Confusion6 hits · 32 pts
SeverityFileLineSnippetContext
HIGH⚡tests/test_template_validation.py72 result = extract_template_strings('{"text": "{{name}}", "count": 42, "active": true, "nothing": null}')CODE
HIGH⚡tests/test_template_validation.py77 result = extract_template_strings('["{{a}}", 42, true, null, "{{b}}"]')CODE
HIGHtests/test_configure.py2262 exact prompt a real user copying `logfire auth && python -c '...configure()'` out ofSTRING
HIGHtests/test_json_args.py807 '{"x":1,"y":2,"z":null}',CODE
HIGHtests/test_json_args.py828 '{"x":1,"y":2,"z":{"x":1,"y":2,"z":null}}',CODE
HIGHtests/test_json_args.py1109 'complex_list': '[1,2,{"a":{"b":{"c":["d"]}}},{"b":[2]},true,false,null,"a","b",[1,2]]',CODE
Over-Commented Block10 hits · 10 pts
SeverityFileLineSnippetContext
LOWpyproject.toml241 # See test_filter_warnings in test_testing.pyCOMMENT
LOWpyproject.toml281source = ["logfire-sdk/logfire", "logfire-api"]COMMENT
LOWtests/test_query_client.py21# ```pythonCOMMENT
LOWdocs/how-to-guides/alternative-clients.md141 .http()COMMENT
LOWlogfire-sdk/logfire/_internal/cli/auth.py101 # into an EOFError traceback for every such caller.COMMENT
LOWlogfire-sdk/logfire/_internal/cli/__init__.py601 # does not guarantee matching HOST (self-hosted, or a different region), and the queryCOMMENT
LOWlogfire-sdk/logfire/_internal/cli/__init__.py741 # `client.base_url` is the host the CREATE request actually used -- resolvedCOMMENT
LOWlogfire-sdk/logfire/integrations/logging.py141 # so `name` should be treated as a keyword argument, i.e. its own attribute.COMMENT
LOWlogfire-sdk/logfire/variables/remote.py401 # the full 60-second base interval -- which would push the effective interval toCOMMENT
LOWlogfire-sdk/logfire/variables/composition.py261 )COMMENT
Redundant / Tautological Comments6 hits · 9 pts
SeverityFileLineSnippetContext
LOWtests/test_tail_sampling.py25 # Set duration to None to not include spans with a long duration.COMMENT
LOWtests/test_tail_sampling.py214 # Set level to None to not include spans merely based on a high level.COMMENT
LOWlogfire-sdk/logfire/_internal/formatter.py288 # Check if the expression contains await before attempting to compileCOMMENT
LOWlogfire-sdk/logfire/variables/abstract.py900 # Check if description differs (for warning purposes)COMMENT
LOWlogfire-sdk/logfire/variables/remote.py356 # Set flag to force refresh and wake up the workerCOMMENT
LOWlogfire-sdk/logfire/variables/remote.py393 # Check if SSE event requested a forced refreshCOMMENT
AI Slop Vocabulary4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_utils.py58 # - They should look seamless, with each frame pointing to the next one.COMMENT
LOWlogfire-sdk/logfire/_internal/formatter.py274 # Formatting failed, so just use the original format string as the message.COMMENT
LOW⚡…e-sdk/logfire/_internal/exporters/processor_wrapper.py459 # If the input messages are a prefix of the output messages, we can just use the output messagesCOMMENT
LOWlogfire-sdk/logfire/sampling/_tail_sampling.py205 # Most processors just set attributes, which is safe before the sampling decision.COMMENT
Modern AI Meta-Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/otel_integrations/test_openai_agents.py1046 # The model call runs concurrently with input guardrails. Depending on when it isCOMMENT
MEDIUMdocs/evaluate/overview.md16## The scaffold: dataset → task → evaluators → results → experimentCOMMENT
MEDIUMdocs/reference/advanced/gateway/protect-data.md211. Open [**AI Engineering → Gateway → Guardrails → Protections**](https://logfire.pydantic.dev/-/redirect/default-org/-/CODE
Verbosity Indicators2 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡logfire-sdk/logfire/variables/config.py370 # Step 1: Determine the rollout and overrides to useCOMMENT
LOW⚡logfire-sdk/logfire/variables/config.py374 # Step 2: Find the first matching override, or use the base rolloutCOMMENT
AI Structural Patterns5 hits · 3 pts
SeverityFileLineSnippetContext
LOWlogfire-sdk/logfire/_internal/config.py520CODE
LOWlogfire-sdk/logfire/_internal/config.py941CODE
LOWlogfire-sdk/logfire/_internal/main.py1622CODE
LOWlogfire-sdk/logfire/_internal/main.py1637CODE
LOW…logfire/_internal/integrations/llm_providers/openai.py517CODE
Overly Generic Function Names3 hits · 1 pts
SeverityFileLineSnippetContext
LOWlogfire-sdk/logfire/_internal/main.py637 def my_function(a: int):STRING
LOWlogfire-sdk/logfire/_internal/main.py667 def my_function(a: int):STRING
LOWlogfire-sdk/logfire/_internal/main.py692 def my_function(a: int):STRING