AI Slop Code Risk Monitor

pydantic/logfire

SlopCodeMonitor badge for pydantic/logfire Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

AI observability platform for production LLM and agent systems.

19.4 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for pydantic/logfire, a Python project with 4,528 GitHub stars. SynthScan examined 183,547 lines of code across 700 source files, recording 3077 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 19.4 (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.4
Adjusted Signal
19.4
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
4.5K
Stars
Python
Language
183.5K
Lines of Code
700
Files
3.1K
Pattern Hits
2026-10-31
Scan Date
0.17
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 41.4/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 10.5/100 · LOW

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

Agent Over-Engineering Ratio 52.4/100 · HIGH

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

PR Review Velocity Impact 67.8/100 · HIGH

Which changes need focused human review? 3077 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 121MEDIUM 242LOW 2714

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 3077 distinct pattern matches across 22 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 Identifiers2012 hits · 1524 pts
SeverityFileLineSnippetContext
LOWtests/test_secret_scrubbing.py46def test_optimized_default_patterns_match_naive_pattern():CODE
LOWtests/test_secret_scrubbing.py78def test_optimized_default_patterns_preserve_extra_pattern_order(extra_pattern: str, value: str, expected_match: str):CODE
LOWtests/test_secret_scrubbing.py92def test_default_pattern_start_chars_cover_each_pattern():CODE
LOWtests/test_secret_scrubbing.py201def test_scrub_log_event_attribute(logs_exporter: TestLogExporter):CODE
LOWtests/test_secret_scrubbing.py311def test_scrub_json_that_cannot_be_parsed(monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_secret_scrubbing.py325def test_scrub_json_that_cannot_be_written_back(monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_secret_scrubbing.py618def test_fstring_magic_scrubbing(exporter: TestExporter):CODE
LOWtests/test_secret_scrubbing.py707def test_default_patterns_match_docs():CODE
LOWtests/test_secret_scrubbing.py737def test_logfire_token_prefix_scrubbing(exporter: TestExporter):CODE
LOWtests/test_secret_scrubbing.py786def test_oauth_token_names_scrubbed(exporter: TestExporter):CODE
LOWtests/test_secret_scrubbing.py826def test_passphrase_and_signing_keys_scrubbed(exporter: TestExporter):CODE
LOWtests/test_secret_scrubbing.py849def test_aws_security_tokens_scrubbed(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.py44def test_mandatory_references_are_never_dropped() -> None:CODE
LOWtests/test_build_offline_skill_prompt.py62def test_appendix_headings_use_posix_paths() -> None:CODE
1952 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.py1555# =============================================================================COMMENT
MEDIUM⚡tests/test_datasets_client.py1557# =============================================================================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.py1100# =============================================================================COMMENT
MEDIUMtests/test_datasets_client.py1102# =============================================================================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 Handlers61 hits · 305 pts
SeverityFileLineSnippetContext
HIGHtests/conftest.py58except (ImportError, UserWarning, DeprecationWarning):CODE
HIGHtests/conftest.py77except ImportError:CODE
HIGHtests/test_configure.py2978except 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.py100except SystemExit:CODE
HIGHtests/test_cli.py3132except PermissionError:CODE
HIGHtests/test_variables.py831except ValueError:CODE
HIGHtests/test_pydantic_plugin.py47except ImportError:CODE
HIGHtests/otel_collector/conftest.py114except BrokenPipeError:CODE
HIGHtests/otel_collector/faults.py124except OSError:CODE
HIGHtests/otel_collector/faults.py260except OSError:CODE
HIGHtests/otel_collector/faults.py149except OSError: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
HIGH.github/workflows/scripts/meta_package_smoke.py14except metadata.PackageNotFoundError:CODE
HIGHlogfire-sdk/logfire/_internal/stack_info.py60except ValueError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/config.py1862except: # noqa # weird errors can happen during shutdown, ignore them *all* with a bare exceptCODE
HIGHlogfire-sdk/logfire/_internal/config.py2461except Exception:CODE
HIGHlogfire-sdk/logfire/_internal/config.py1149except Exception:CODE
HIGHlogfire-sdk/logfire/_internal/config.py2285except EOFError:CODE
HIGHlogfire-sdk/logfire/_internal/forwarding.py205except Exception:CODE
HIGHlogfire-sdk/logfire/_internal/json_encoder.py298except Exception: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/json_encoder.py293except Exception: # currently redundant, but future-proofCODE
HIGHlogfire-sdk/logfire/_internal/json_encoder.py281except KeyError:CODE
HIGHlogfire-sdk/logfire/_internal/utils.py314except AttributeError: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/utils.py274except FileExistsError:CODE
HIGHlogfire-sdk/logfire/_internal/utils.py358except Exception: # pragma: no coverCODE
HIGHlogfire-sdk/logfire/_internal/config_params.py236except 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.py630except Exception: # pragma: no coverCODE
HIGH…e-sdk/logfire/_internal/exporters/processor_wrapper.py219except Exception: # pragma: no coverCODE
HIGH…e-sdk/logfire/_internal/exporters/processor_wrapper.py251except 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.py119except webbrowser.Error:CODE
HIGHlogfire-sdk/logfire/_internal/cli/run.py562except 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.py160except Exception: # pragma: no coverCODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py639except Exception:CODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py674except AssertionError:CODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py664except AssertionError:CODE
HIGH…logfire/_internal/integrations/llm_providers/openai.py805except Exception:CODE
HIGH…e/_internal/integrations/llm_providers/llm_provider.py238except Exception: # pragma: no coverCODE
HIGH…/logfire/_internal/integrations/llm_providers/usage.py50except Exception:CODE
HIGH…/logfire/_internal/integrations/llm_providers/usage.py86except Exception:CODE
HIGH…/logfire/_internal/integrations/llm_providers/usage.py84except 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
1 more matches not shown…
Unused Imports291 hits · 254 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_agent_sandboxes.py1CODE
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_otel_collector_harness.py1CODE
LOWtests/test_otel_collector_faults.py1CODE
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_collector/conftest.py1CODE
LOWtests/otel_collector/test_resilience.py1CODE
LOWtests/otel_collector/scenario.py1CODE
LOWtests/otel_collector/faults.py1CODE
LOWtests/otel_collector/test_conformance.py1CODE
LOWtests/otel_integrations/test_claude_agent_sdk.py15CODE
LOWtests/otel_integrations/test_anthropic.py1CODE
LOWtests/otel_integrations/test_anthropic.py2432CODE
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
231 more matches not shown…
Docstring Block Structure32 hits · 160 pts
SeverityFileLineSnippetContext
HIGHlogfire-sdk/logfire/_internal/config.py1891Check if a credentials file exists and if so load it. Args: creds_dir: Path to the credentials direSTRING
HIGHlogfire-sdk/logfire/_internal/config.py1970Configure one of the user projects to be used by Logfire. It configures the project if organization/project_namSTRING
HIGHlogfire-sdk/logfire/_internal/config.py2078Create 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.py2242Create 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.py711Update an existing dataset. Args: id_or_name: The dataset ID (UUID) or name. name: New STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py768List all cases in a dataset. Args: dataset_id_or_name: The dataset ID (UUID) or name. RetuSTRING
HIGHlogfire-sdk/logfire/experimental/api_client.py783Get a specific case from a dataset. Args: dataset_id_or_name: The dataset ID (UUID) or name. STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py807Publish 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.py914Add cases to a dataset. Accepts either pydantic-evals Case objects or plain dicts. By default, uses upSTRING
HIGHlogfire-sdk/logfire/experimental/api_client.py971Update an existing case. Args: dataset_id_or_name: The dataset ID (UUID) or name. case_STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py1055Get a dataset by ID or name. The return type depends on the arguments provided: - **No type arguments*STRING
HIGHlogfire-sdk/logfire/experimental/api_client.py1249Async 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.py956Resolve the variable and return full details including label, version, and any errors. Args: targetSTRING
HIGHlogfire-sdk/logfire/variables/variable.py1048Resolve 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 Wrapping142 hits · 146 pts
SeverityFileLineSnippetContext
LOWtests/test_secret_scrubbing.py349 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.py212 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/formatter.py219 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/formatter.py230 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/formatter.py282 except Exception:CODE
LOW⚡logfire-sdk/logfire/_internal/config.py1724 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py1149 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py1252 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py1741 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/config.py1748 except Exception as e: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/config.py1943 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/config.py2411 except Exception as exc:CODE
LOWlogfire-sdk/logfire/_internal/config.py2461 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.py293 except Exception: # currently redundant, but future-proofCODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py298 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py310 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py327 except Exception:CODE
MEDIUMlogfire-sdk/logfire/_internal/utils.py339def log_internal_error():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.py115 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/utils.py127 except Exception:CODE
LOWlogfire-sdk/logfire/_internal/utils.py345 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py358 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py410 except Exception: # pragma: no coverCODE
LOWlogfire-sdk/logfire/_internal/utils.py527 except Exception:CODE
82 more matches not shown…
Structural Annotation Overuse57 hits · 92 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/integrations/llms/claude-platform.md40## Step 1: Add Logfire in the Claude ConsoleCOMMENT
LOWdocs/integrations/llms/claude-platform.md75## Step 2: Link Claude's spans to your appCOMMENT
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/ff-database-migration.md51## Step 1: Stop the FusionFire WorkloadsCOMMENT
LOWdocs/reference/self-hosted/ff-database-migration.md153## Step 2: Copy the DatabaseCOMMENT
LOWdocs/reference/self-hosted/ff-database-migration.md203## Step 3: Deploy Updated Configuration and Scale UpCOMMENT
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.md33## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md46## Step 2: Understand the RepoCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md66## Step 3: Fetch the Right Skill(s)COMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md95## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md101## Step 2: Detect Language and FrameworksCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md113## Step 3: Install and InstrumentCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md229## Step 4: Set Service Metadata and MetricsCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md271## Step 5: VerifyCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md383## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md390## Step 2: Identify What to MonitorCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md402## Step 3: Configure the CollectorCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md417## Step 4: VerifyCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md446## Step 1: Check for an Existing Braintrust Suite FirstCOMMENT
LOW⚡…re-sdk/logfire/.agents/skills/logfire-setup-offline.md466## Step 2: Authenticate When the Run Needs LogfireCOMMENT
LOW⚡…re-sdk/logfire/.agents/skills/logfire-setup-offline.md473## Step 3: Detect What to EvaluateCOMMENT
LOW⚡…re-sdk/logfire/.agents/skills/logfire-setup-offline.md480## Step 4: Define the Dataset and Run ItCOMMENT
LOW…re-sdk/logfire/.agents/skills/logfire-setup-offline.md590## Step 5: VerifyCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md20## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md26## Step 2: Detect Language and FrameworksCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md38## Step 3: Install and InstrumentCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md154## Step 4: Set Service Metadata and MetricsCOMMENT
LOW…ogfire/.agents/skills/logfire-instrumentation/SKILL.md196## 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.md18## Step 1: Authenticate and Select the Exact ProjectCOMMENT
LOW…fire-sdk/logfire/.agents/skills/logfire-setup/SKILL.md31## Step 2: Understand the RepoCOMMENT
LOW…fire-sdk/logfire/.agents/skills/logfire-setup/SKILL.md51## 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 · 88 pts
SeverityFileLineSnippetContext
HIGHdocs/evaluate/evals-in-code.md162 with LogfireAPIClient(api_key='your-api-key') as client:CODE
HIGH⚡docs/evaluate/datasets-sdk.md34client = LogfireAPIClient(api_key='your-api-key')CODE
HIGH⚡docs/evaluate/datasets-sdk.md40with LogfireAPIClient(api_key='your-api-key') as client:CODE
HIGH⚡docs/evaluate/datasets-sdk.md48 api_key='your-api-key',CODE
HIGH⚡docs/evaluate/datasets-sdk.md58async with AsyncLogfireAPIClient(api_key='your-api-key') as client:CODE
HIGHdocs/evaluate/datasets-sdk.md112with 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.md114 -H "Authorization: Bearer YOUR_API_KEY"CODE
HIGH⚡docs/reference/advanced/use-api-keys.md121 -H "Authorization: Bearer YOUR_API_KEY"CODE
HIGH⚡docs/reference/advanced/use-api-keys.md124Replace `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.py568 with LogfireAPIClient(api_key='your-api-key') as client:STRING
Deep Nesting97 hits · 82 pts
SeverityFileLineSnippetContext
LOWtests/test_configure.py3515CODE
LOWtests/test_sampling.py102CODE
LOWtests/test_sampling.py129CODE
LOWtests/test_sampling.py162CODE
LOWtests/test_variables.py1784CODE
LOWtests/test_variables.py3395CODE
LOWtests/test_variables.py3443CODE
LOWtests/test_variables.py3489CODE
LOWtests/test_variables.py3523CODE
LOWtests/test_variables.py4720CODE
LOWtests/test_baggage.py124CODE
LOWtests/otel_collector/conftest.py206CODE
LOWtests/otel_collector/conftest.py248CODE
LOWtests/otel_collector/conftest.py45CODE
LOWtests/otel_collector/test_resilience.py135CODE
LOWtests/otel_integrations/test_anthropic.py664CODE
LOWtests/otel_integrations/test_openai.py41CODE
LOWtests/otel_integrations/test_sqlalchemy.py594CODE
LOWtests/otel_integrations/fake_claude.py34CODE
LOWtests/otel_integrations/fake_claude.py72CODE
LOWtests/otel_integrations/test_litestar.py325CODE
LOWtests/otel_integrations/test_openai_agents.py55CODE
LOWscripts/build_offline_skill_prompt.py111CODE
LOW.github/workflows/scripts/upgrade_install_smoke.py76CODE
LOWlogfire-sdk/logfire/query_client.py213CODE
LOWlogfire-sdk/logfire/_internal/json_formatter.py71CODE
LOWlogfire-sdk/logfire/_internal/formatter.py61CODE
LOWlogfire-sdk/logfire/_internal/formatter.py152CODE
LOWlogfire-sdk/logfire/_internal/config.py1169CODE
LOWlogfire-sdk/logfire/_internal/config.py1712CODE
LOWlogfire-sdk/logfire/_internal/config.py1962CODE
LOWlogfire-sdk/logfire/_internal/config.py2070CODE
LOWlogfire-sdk/logfire/_internal/config.py1293CODE
LOWlogfire-sdk/logfire/_internal/forwarding.py192CODE
LOWlogfire-sdk/logfire/_internal/json_schema.py99CODE
LOWlogfire-sdk/logfire/_internal/json_schema.py321CODE
LOWlogfire-sdk/logfire/_internal/json_encoder.py244CODE
LOWlogfire-sdk/logfire/_internal/utils.py506CODE
LOWlogfire-sdk/logfire/_internal/scrubbing.py316CODE
LOWlogfire-sdk/logfire/_internal/db_statement_summary.py55CODE
LOWlogfire-sdk/logfire/_internal/db_statement_summary.py130CODE
LOWlogfire-sdk/logfire/_internal/instrument.py52CODE
LOWlogfire-sdk/logfire/_internal/instrument.py65CODE
LOWlogfire-sdk/logfire/_internal/main.py3549CODE
LOWlogfire-sdk/logfire/_internal/main.py735CODE
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.py177CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py317CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py397CODE
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py485CODE
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.py281CODE
LOWlogfire-sdk/logfire/_internal/integrations/psycopg.py28CODE
37 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.py1731 # Create a logfire instanceCOMMENT
MEDIUMtests/test_variables.py1762 # Create a logfire instance and start the providerCOMMENT
MEDIUMtests/test_variables.py4008 # Create a new var to ensure there are changes (so push proceeds)COMMENT
MEDIUMtests/test_variables.py4343 # Create a real trace context using the logfire instanceCOMMENT
MEDIUMtests/test_variables.py4360 # Create a config that will report "not on server"COMMENT
MEDIUMtests/test_variables.py4374 # Create a config where variant validation will produce a multi-line errorCOMMENT
MEDIUMtests/test_variables.py4394 # Create a variable with a complex type that will generate multi-line errorsCOMMENT
MEDIUMtests/test_variables.py5203 # Create a type-like object without __module__COMMENT
MEDIUMtests/exporters/test_otlp_session.py607 # 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.py2133 # Creating a project is a side effect, so this is never assumed --COMMENT
MEDIUMlogfire-sdk/logfire/_internal/utils.py379 # This function is always called from log_internal_error, so skip that frame.COMMENT
MEDIUMlogfire-sdk/logfire/_internal/tracer.py362 # Create a no-op span with the same SpanContext as the current span.COMMENT
MEDIUMlogfire-sdk/logfire/_internal/cli/run.py443 # Create a final rule for the bottom sectionCOMMENT
MEDIUMlogfire-sdk/logfire/_internal/cli/run.py463 # 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 Boilerplate39 hits · 42 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_configure.py1410def _update_resource(self, resource: Resource) -> None:CODE
LOW⚡tests/test_configure.py1417def _update_resource(self, resource: Resource) -> None:CODE
LOW⚡tests/test_configure.py1422def _update_resource(self, resource: Resource) -> None:CODE
LOWtests/otel_collector/faults.py175 def set_upstream(self, upstream_endpoint: str) -> None:CODE
LOWtests/otel_collector/faults.py283 def set_upstream(self, upstream_endpoint: str) -> None:CODE
LOWtests/otel_integrations/test_anthropic.py1421 def set_attribute(self, key: str, value: Any) -> None:CODE
LOWtests/otel_integrations/test_anthropic.py1424 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.py3409 def set_attribute(self, key: str, value: Any) -> None:CODE
LOWlogfire-sdk/logfire/_internal/main.py3422 def set_attributes(self, attributes: dict[str, Any]) -> None:CODE
LOWlogfire-sdk/logfire/_internal/main.py3471 def _set_attribute(self, key: str, value: Any) -> None:CODE
LOWlogfire-sdk/logfire/_internal/main.py3574def set_user_attributes_on_raw_span(span: Span, attributes: dict[str, Any]) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py73 def set_provider(self, provider: SDKTracerProvider) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py183 def set_attributes(self, attributes: Mapping[str, otel_types.AttributeValue]) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py186 def set_attribute(self, key: str, value: otel_types.AttributeValue) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py200 def update_name(self, name: str) -> None:CODE
LOWlogfire-sdk/logfire/_internal/tracer.py295 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.py70def _set_state(state: _ConversationState) -> None:CODE
LOW…sdk/logfire/_internal/integrations/claude_agent_sdk.py575 def set_finish_reason(self, stop_reason: str | None) -> None:CODE
LOW…re-sdk/logfire/_internal/integrations/openai_agents.py336 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.py1975 # we check that fake_token is valid now when we configure the projectCOMMENT
LOW⚡tests/test_configure.py2567 with patch.dict(os.environ, {'LOGFIRE_TOKEN': 'fake_token'}), requests_mock.Mocker() as request_mocker:CODE
LOW⚡tests/test_configure.py2575 assert request_mocker.request_history[0].headers['Authorization'] == 'fake_token'CODE
LOW⚡tests/test_configure.py2592 with patch.dict(os.environ, {'LOGFIRE_TOKEN': 'fake_token'}), requests_mock.Mocker() as request_mocker:CODE
LOW⚡tests/test_configure.py2599 assert logfire.DEFAULT_LOGFIRE_INSTANCE.config.token == 'fake_token'CODE
LOW⚡tests/test_configure.py2603 assert request_mocker.request_history[0].headers['Authorization'] == 'fake_token'CODE
LOWtests/test_configure.py1708 'token': 'fake_token',CODE
LOWtests/test_configure.py1768 'token': 'fake_token',CODE
LOWtests/test_configure.py1830 'token': 'fake_token',CODE
LOWtests/test_configure.py1955 'token': 'fake_token',CODE
LOWtests/test_configure.py1978 assert request_mocker.request_history[-1].headers['Authorization'] == 'fake_token'CODE
LOWtests/test_configure.py2065 'token': 'fake_token',CODE
LOWtests/test_configure.py2126 'token': 'fake_token',CODE
LOWtests/test_configure.py2192 'token': 'fake_token',CODE
LOWtests/test_configure.py2250 'token': 'fake_token',CODE
LOWtests/test_configure.py2305 'token': 'fake_token',CODE
LOWtests/test_db_api.py74 read_token='fake-token',CODE
LOWtests/test_json_args.py470 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.py793token = "fake_token"CODE
LOWtests/test_cli.py1471 json={'token': 'fake_token', 'expiration': 'fake_exp'},CODE
LOWtests/test_cli.py1524 dict(text='{"token": "fake_token", "expiration": "fake_exp"}'),CODE
LOWtests/test_cli.py1684 dict(text='{"token": "fake_token", "expiration": "fake_exp"}'),CODE
LOWtests/test_cli.py1848 'token': 'fake_token',CODE
LOWtests/test_cli.py1894 'token': 'fake_token',CODE
LOWtests/test_cli.py1942 'token': 'fake_token',CODE
LOWtests/test_cli.py1988 'token': 'fake_token',CODE
LOWtests/test_cli.py2037 'token': 'fake_token',CODE
LOWtests/test_cli.py2140 'token': 'fake_token',CODE
LOWtests/test_cli.py2184 'token': 'fake_token',CODE
LOWtests/test_cli.py2232 'token': 'fake_token',CODE
LOWtests/test_cli.py2285 'token': 'fake_token',CODE
LOWtests/test_cli.py2323 'token': 'fake_token',CODE
LOWtests/test_cli.py2433 json={'token': 'fake_token'},CODE
LOWtests/test_cli.py2439 assert output == snapshot('fake_token\n')CODE
LOWtests/test_cli.py3558 'token': 'fake_token',CODE
LOWtests/test_cli.py3604 'token': 'fake_token',CODE
LOWtests/test_cli.py3663 'token': 'fake_token',CODE
LOWtests/test_cli.py3726 'token': 'fake_token',CODE
LOWtests/test_cli.py3769 'token': 'fake_token',CODE
LOWtests/test_cli.py3830 'token': 'fake_token',CODE
LOWtests/test_cli.py3894 'token': 'fake_token',CODE
LOWtests/test_cli.py4011 'token': 'fake_token',CODE
LOWtests/test_cli.py6993 json={'token': 'fake_token'},CODE
LOW⚡tests/test_cli.py841 text='{"token": "fake_token", "expiration": "fake_exp"}',STRING
LOW⚡tests/test_cli.py849 assert 'fake_token' in auth_file.read_text()STRING
LOW⚡tests/test_cli.py908 text='{"token": "fake_token", "expiration": "fake_exp"}',STRING
LOW⚡tests/test_cli.py913 assert 'fake_token' in auth_file.read_text()STRING
LOW⚡tests/test_cli.py997 text='{"token": "fake_token", "expiration": "fake_exp"}',STRING
LOW⚡tests/test_cli.py1004 assert 'fake_token' in auth_file.read_text()STRING
LOWtests/test_cli.py784 dict(text='{"token": "fake_token", "expiration": "fake_exp"}'),STRING
LOWtests/test_cli.py1694token = "fake_token"STRING
LOWtests/test_cli.py7197 'env = { "LOGFIRE_READ_TOKEN" = "fake_token" }\n'STRING
LOW⚡tests/test_variables.py129 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.py2275 exact prompt a real user copying `logfire auth && python -c '...configure()'` out ofSTRING
HIGHtests/test_json_args.py827 '{"x":1,"y":2,"z":null}',CODE
HIGHtests/test_json_args.py848 '{"x":1,"y":2,"z":{"x":1,"y":2,"z":null}}',CODE
HIGHtests/test_json_args.py1263 'complex_list': '[1,2,{"a":{"b":{"c":["d"]}}},{"b":[2]},true,false,null,"a","b",[1,2]]',CODE
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.py301 # 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
Over-Commented Block9 hits · 8 pts
SeverityFileLineSnippetContext
LOWpyproject.toml261 # aiohttp web.Application is deprecated and used by OTelCOMMENT
LOWtests/test_query_client.py21# ```pythonCOMMENT
LOWdocs/how-to-guides/alternative-clients.md141 .http()COMMENT
LOW…e-sdk/logfire/_internal/exporters/processor_wrapper.py281 # 2. We have a query string, either parsed from the URL or from `url.query`COMMENT
LOWlogfire-sdk/logfire/_internal/cli/auth.py101 # there is no one to press the key -- CI, a container, a coding agent -- there is noCOMMENT
LOWlogfire-sdk/logfire/_internal/cli/__init__.py601COMMENT
LOWlogfire-sdk/logfire/integrations/logging.py141 # Whether it should be treated as one positional argument or a mapping of keyword argumentsCOMMENT
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
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.py287 # Formatting failed, so just use the original format string as the message.COMMENT
LOW⚡…e-sdk/logfire/_internal/exporters/processor_wrapper.py466 # 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.py1053 # 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.py533CODE
LOWlogfire-sdk/logfire/_internal/config.py955CODE
LOWlogfire-sdk/logfire/_internal/main.py1241CODE
LOWlogfire-sdk/logfire/_internal/main.py1720CODE
LOWlogfire-sdk/logfire/_internal/main.py1735CODE
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_llm_provider.py223CODE
Overly Generic Function Names3 hits · 1 pts
SeverityFileLineSnippetContext
LOWlogfire-sdk/logfire/_internal/main.py648 def my_function(a: int):STRING
LOWlogfire-sdk/logfire/_internal/main.py678 def my_function(a: int):STRING
LOWlogfire-sdk/logfire/_internal/main.py703 def my_function(a: int):STRING