AI observability platform for production LLM and agent systems.
This report presents the forensic synthetic code analysis of pydantic/logfire, a Python project with 4,416 GitHub stars. SynthScan v2.0 examined 157,232 lines of code across 610 source files, recording 2469 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 17.5 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 2469 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/_internal/metrics.py | 131 | def create_observable_counter( | CODE |
| LOW | logfire/_internal/metrics.py | 170 | def create_observable_up_down_counter( | CODE |
| LOW | logfire/_internal/formatter.py | 246 | def logfire_format_with_magic( | CODE |
| LOW | logfire/_internal/formatter.py | 374 | def heuristic_call_node_filter(self, node: ast.Call) -> bool: | CODE |
| LOW | logfire/_internal/formatter.py | 378 | def warn_inspect_arguments_middle(self): | CODE |
| LOW | logfire/_internal/stack_info.py | 71 | def get_stack_info_from_frame(frame: FrameType) -> StackInfo: | CODE |
| LOW | logfire/_internal/stack_info.py | 90 | def get_user_frame_and_stacklevel() -> tuple[FrameType | None, int]: | CODE |
| LOW⚡ | logfire/_internal/config.py | 1734 | def _initialize_credentials_from_token(self, token: str) -> LogfireCredentials | None: | CODE |
| LOW⚡ | logfire/_internal/config.py | 1739 | def _ensure_flush_after_aws_lambda(self): | CODE |
| LOW⚡ | logfire/_internal/config.py | 1746 | def wrap_client_post_invocation_method(client_method: Any): # pragma: no cover | CODE |
| LOW | logfire/_internal/config.py | 963 | def _register_at_fork_resource_updates( | CODE |
| LOW | logfire/_internal/config.py | 1694 | def _lazy_init_variable_provider(self) -> VariableProvider: | CODE |
| LOW | logfire/_internal/config.py | 2327 | def common_resource_attributes() -> dict[str, Any]: | CODE |
| LOW | logfire/_internal/forwarding.py | 209 | def _wait_for_queue_empty_locked(self, deadline: float) -> bool: | CODE |
| LOW | logfire/_internal/forwarding.py | 236 | def _close_session_if_idle_locked(self) -> None: | CODE |
| LOW | logfire/_internal/forwarding.py | 333 | def _reset_after_fork_if_needed(self) -> None: | CODE |
| LOW | logfire/_internal/forwarding.py | 361 | def _build_forwarding_request_headers(headers: Mapping[str, str], *, content_type: str) -> Mapping[str, str]: | CODE |
| LOW | logfire/_internal/forwarding.py | 374 | def parse_forwarding_content_type(content_type: str) -> ForwardingContentType | None: | CODE |
| LOW | logfire/_internal/forwarding.py | 390 | def _normalize_forwarding_path(path: str) -> ForwardingPath | ForwardingErrorResponse: | CODE |
| LOW | logfire/_internal/forwarding.py | 447 | def build_partial_success_response( | CODE |
| LOW | logfire/_internal/json_schema.py | 169 | def attributes_json_schema_properties(attributes: dict[str, Any]) -> JsonSchemaProperties: | CODE |
| LOW | logfire/_internal/json_schema.py | 317 | def _pydantic_root_model_schema(obj: Any, seen: set[int]) -> JsonDict: | CODE |
| LOW | logfire/_internal/json_encoder.py | 63 | def _pandas_data_frame_encoder(o: Any, seen: set[int]) -> JsonValue: | CODE |
| LOW | logfire/_internal/utils.py | 264 | def is_instrumentation_suppressed() -> bool: | CODE |
| LOW⚡ | logfire/_internal/utils.py | 385 | def maybe_capture_server_headers(capture: bool): | CODE |
| LOW⚡ | logfire/_internal/utils.py | 391 | def is_asgi_send_receive_span_name(name: str) -> bool: | CODE |
| LOW⚡ | logfire/_internal/utils.py | 395 | def _default_ms_timestamp_generator() -> int: | CODE |
| LOW | logfire/_internal/utils.py | 441 | def canonicalize_exception_traceback(exc: BaseException, seen: set[int] | None = None) -> str: | CODE |
| LOW | logfire/_internal/ast_utils.py | 123 | def logfire_method_arg_values(self, qualname: str, lineno: int) -> tuple[str, dict[str, otel_types.AttributeValue]]: | CODE |
| LOW | logfire/_internal/ast_utils.py | 209 | def heuristic_call_node_filter(self, node: ast.Call) -> bool: | CODE |
| LOW | logfire/_internal/ast_utils.py | 213 | def warn_inspect_arguments_middle(self) -> str: | CODE |
| LOW | logfire/_internal/async_.py | 78 | def stack_info_from_coroutine(coro: CoroutineType[Any, Any, Any]) -> StackInfo: | CODE |
| LOW | logfire/_internal/server_response.py | 23 | def install_logfire_response_hook( | CODE |
| LOW | logfire/_internal/db_statement_summary.py | 10 | def message_from_db_statement(attributes: Mapping[str, Any], message: str | None, span_name: str) -> str | None: | CODE |
| LOW | logfire/_internal/main.py | 294 | def _instrument_span_with_args( | CODE |
| LOW | logfire/_internal/main.py | 996 | def _warn_if_not_initialized_for_instrumentation(self): | CODE |
| LOW | logfire/_internal/main.py | 1030 | def instrument_claude_agent_sdk(self) -> AbstractContextManager[None]: | CODE |
| LOW | logfire/_internal/main.py | 1970 | def instrument_aiohttp_client( | CODE |
| LOW | logfire/_internal/main.py | 2001 | def instrument_aiohttp_server(self, **kwargs: Any) -> None: | CODE |
| LOW | logfire/_internal/main.py | 2199 | def instrument_system_metrics( | CODE |
| LOW | logfire/_internal/main.py | 2430 | def metric_up_down_counter_callback( | CODE |
| LOW | logfire/_internal/main.py | 3068 | async def forward_export_request_starlette( | CODE |
| LOW | logfire/_internal/main.py | 3381 | def set_user_attributes_on_raw_span(span: Span, attributes: dict[str, Any]) -> None: | CODE |
| LOW | logfire/_internal/tracer.py | 416 | def get_sample_rate_from_attributes(attributes: otel_types.Attributes) -> float | None: | CODE |
| LOW | logfire/_internal/tracer.py | 493 | def _patched_format_exception(*args: Any, **kwargs: Any): | CODE |
| LOW | logfire/_internal/auto_trace/__init__.py | 65 | def modules_func_from_sequence(modules: Sequence[str]) -> Callable[[AutoTraceModule], bool]: | CODE |
| LOW⚡ | logfire/_internal/exporters/processor_wrapper.py | 467 | def _transform_langchain_message(old_message: dict[str, Any]) -> dict[str, Any]: | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 89 | def _set_error_level_and_status(span: ReadableSpanDict) -> None: | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 115 | def _tweak_sqlalchemy_connect_spans(span: ReadableSpanDict) -> None: | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 131 | def _tweak_asgi_send_receive_spans(span: ReadableSpanDict) -> None: | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 162 | def _is_asgi_send_receive_span(name: str, instrumentation_scope: InstrumentationScope | None) -> bool: | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 338 | def _transform_langchain_span(span: ReadableSpanDict): | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 379 | def _transform_langsmith_span_attributes( | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 535 | def _default_gen_ai_response_model(span: ReadableSpanDict): | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 544 | def _transform_google_genai_span(span: ReadableSpanDict): | CODE |
| LOW | logfire/_internal/exporters/otlp.py | 122 | def raise_for_retryable_status(response: requests.Response): | CODE |
| LOW | logfire/_internal/exporters/test.py | 94 | def build_instrumentation_scope(span: ReadableSpan) -> dict[str, Any]: | CODE |
| LOW | logfire/_internal/cli/run.py | 208 | def find_recommended_instrumentations_to_install( | CODE |
| LOW | logfire/_internal/cli/run.py | 273 | def instrumented_packages_text( | CODE |
| LOW | logfire/_internal/cli/run.py | 445 | def _installed_target_packages(otel_pkg: str, import_name: str, installed_pkgs: set[str]) -> tuple[str, ...]: | CODE |
| 1496 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | logfire/db_api.py | 37 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/db_api.py | 39 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/db_api.py | 45 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/db_api.py | 47 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/db_api.py | 78 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/db_api.py | 80 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/db_api.py | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/db_api.py | 88 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/db_api.py | 127 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/db_api.py | 129 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/db_api.py | 181 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/db_api.py | 183 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/db_api.py | 338 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/db_api.py | 340 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/_internal/integrations/claude_agent_sdk.py | 53 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/_internal/integrations/claude_agent_sdk.py | 60 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/_internal/integrations/claude_agent_sdk.py | 77 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/_internal/integrations/claude_agent_sdk.py | 79 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/_internal/integrations/claude_agent_sdk.py | 164 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | logfire/_internal/integrations/claude_agent_sdk.py | 166 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/_internal/integrations/claude_agent_sdk.py | 282 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/_internal/integrations/claude_agent_sdk.py | 284 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | logfire/variables/composition.py | 310 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | logfire/variables/composition.py | 312 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | tests/test_variable_composition.py | 496 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_variable_composition.py | 498 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_variable_composition.py | 713 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_variable_composition.py | 715 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_variable_composition.py | 34 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_variable_composition.py | 36 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_template_validation.py | 103 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_template_validation.py | 105 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_template_validation.py | 496 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_template_validation.py | 498 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_template_validation.py | 19 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_template_validation.py | 21 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_template_validation.py | 359 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_template_validation.py | 361 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_datasets_client.py | 596 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_datasets_client.py | 598 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_datasets_client.py | 1456 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_datasets_client.py | 1458 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 161 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 163 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 502 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 504 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 515 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 517 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 1045 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_datasets_client.py | 1047 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 88 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 97 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 99 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 123 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 125 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 222 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 224 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 310 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_db_api.py | 312 | # --------------------------------------------------------------------------- | COMMENT |
| 142 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/db_api.py | 18 | CODE | |
| LOW | logfire/__init__.py | 3 | CODE | |
| LOW | logfire/__init__.py | 7 | CODE | |
| LOW | logfire/__init__.py | 7 | CODE | |
| LOW | logfire/__init__.py | 8 | CODE | |
| LOW | logfire/__init__.py | 10 | CODE | |
| LOW | logfire/__init__.py | 11 | CODE | |
| LOW | logfire/__init__.py | 12 | CODE | |
| LOW | logfire/__init__.py | 13 | CODE | |
| LOW | logfire/__init__.py | 13 | CODE | |
| LOW | logfire/__init__.py | 14 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 15 | CODE | |
| LOW | logfire/__init__.py | 25 | CODE | |
| LOW | logfire/__init__.py | 26 | CODE | |
| LOW | logfire/__init__.py | 27 | CODE | |
| LOW | logfire/__init__.py | 27 | CODE | |
| LOW | logfire/__init__.py | 28 | CODE | |
| LOW | logfire/__init__.py | 29 | CODE | |
| LOW | logfire/__init__.py | 30 | CODE | |
| LOW | logfire/__init__.py | 31 | CODE | |
| LOW | logfire/types.py | 1 | CODE | |
| LOW | logfire/cli.py | 1 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/query_client.py | 2 | CODE | |
| LOW | logfire/testing.py | 3 | CODE | |
| LOW | logfire/testing.py | 20 | CODE | |
| LOW | logfire/propagate.py | 13 | CODE | |
| LOW | logfire/_internal/json_formatter.py | 1 | CODE | |
| LOW | logfire/_internal/auth.py | 1 | CODE | |
| LOW | logfire/_internal/metrics.py | 1 | CODE | |
| LOW | logfire/_internal/formatter.py | 1 | CODE | |
| LOW | logfire/_internal/stack_info.py | 1 | CODE | |
| LOW | logfire/_internal/config.py | 1 | CODE | |
| LOW | logfire/_internal/json_types.py | 1 | CODE | |
| LOW | logfire/_internal/forwarding.py | 1 | CODE | |
| LOW | logfire/_internal/client.py | 1 | CODE | |
| LOW | logfire/_internal/constants.py | 1 | CODE | |
| LOW | logfire/_internal/json_schema.py | 15 | CODE | |
| LOW | logfire/_internal/json_encoder.py | 1 | CODE | |
| LOW | logfire/_internal/utils.py | 1 | CODE | |
| LOW | logfire/_internal/logs.py | 1 | CODE | |
| LOW | logfire/_internal/ast_utils.py | 1 | CODE | |
| LOW | logfire/_internal/config_params.py | 1 | CODE | |
| LOW | logfire/_internal/async_.py | 1 | CODE | |
| 221 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | logfire/_internal/config.py | 1918 | Check if a credentials file exists and if so load it. Args: creds_dir: Path to the credentials dire | STRING |
| HIGH | logfire/_internal/config.py | 1997 | Configure one of the user projects to be used by Logfire. It configures the project if organization/project_nam | STRING |
| HIGH | logfire/_internal/config.py | 2092 | Create a new project and configure it to be used by Logfire. It creates the project under the organization if b | STRING |
| HIGH | logfire/_internal/config.py | 2176 | Create a new project or use an existing project on logfire.dev requesting the given project name. Args: | STRING |
| HIGH | logfire/_internal/exporters/test.py | 52 | The exported spans as a list of dicts. Args: fixed_line_number: The line number to use for all span | STRING |
| HIGH | logfire/experimental/api_client.py | 687 | Update an existing dataset. Args: id_or_name: The dataset ID (UUID) or name. name: New | STRING |
| HIGH | logfire/experimental/api_client.py | 744 | List all cases in a dataset. Args: dataset_id_or_name: The dataset ID (UUID) or name. Retu | STRING |
| HIGH | logfire/experimental/api_client.py | 759 | Get a specific case from a dataset. Args: dataset_id_or_name: The dataset ID (UUID) or name. | STRING |
| HIGH | logfire/experimental/api_client.py | 783 | Publish a local `pydantic_evals.Dataset` to the hosted datasets API. This is the high-level "push my dataset to | STRING |
| HIGH | logfire/experimental/api_client.py | 890 | Add cases to a dataset. Accepts either pydantic-evals Case objects or plain dicts. By default, uses up | STRING |
| HIGH | logfire/experimental/api_client.py | 947 | Update an existing case. Args: dataset_id_or_name: The dataset ID (UUID) or name. case_ | STRING |
| HIGH | logfire/experimental/api_client.py | 1031 | Get a dataset by ID or name. The return type depends on the arguments provided: - **No type arguments* | STRING |
| HIGH | logfire/experimental/api_client.py | 1225 | Async version of `LogfireAPIClient.push_dataset`. Args: dataset: The local `pydantic_evals.Dataset` | STRING |
| HIGH | logfire/variables/abstract.py | 160 | Convert template `inputs` to a context dict for Handlebars rendering. Accepts whatever the variable's declared `inp | STRING |
| HIGH | logfire/variables/abstract.py | 1133 | Retrieve the serialized value for a variable. Args: variable_name: The name of the variable to reso | STRING |
| HIGH | logfire/variables/abstract.py | 1252 | Create a new variable configuration. Args: config: The configuration for the new variable. | STRING |
| HIGH | logfire/variables/abstract.py | 1274 | Update an existing variable configuration. Args: name: The name of the variable to update. | STRING |
| HIGH | logfire/variables/abstract.py | 1976 | Return None for all variable lookups. Args: variable_name: The name of the variable to resolve (ign | STRING |
| HIGH | logfire/variables/config.py | 352 | Evaluate rollout rules and return the selected label name. The resolution process: 1. Evaluate override | STRING |
| HIGH | logfire/variables/config.py | 391 | Resolve the serialized value for this variable. Resolution order: 1. If explicit label requested, look | STRING |
| HIGH | logfire/variables/config.py | 507 | Evaluate a managed variable configuration and resolve the selected value. Args: name: The name of t | STRING |
| HIGH | logfire/variables/config.py | 635 | Check if all conditions match the provided attributes. Args: conditions: List of conditions to evaluate. | STRING |
| HIGH | logfire/variables/remote.py | 527 | Resolve a variable's serialized value from the remote configuration. Args: variable_name: The name | STRING |
| HIGH | logfire/variables/remote.py | 623 | Create a new variable configuration via the remote API. Args: config: The configuration for the new | STRING |
| HIGH | logfire/variables/remote.py | 652 | Update an existing variable configuration via the remote API. Args: name: The name of the variable | STRING |
| HIGH | logfire/variables/remote.py | 830 | Create or update a variable type via the remote API. If a type with the given name exists, it will be updated. | STRING |
| HIGH | logfire/variables/local.py | 39 | Resolve a variable's serialized value from the local configuration. Args: variable_name: The name o | STRING |
| HIGH | logfire/variables/local.py | 83 | Create a new variable configuration. Args: config: The configuration for the new variable. | STRING |
| HIGH | logfire/variables/local.py | 102 | Update an existing variable configuration. Args: name: The name of the variable to update. | STRING |
| HIGH | logfire/variables/variable.py | 952 | Resolve the variable and return full details including label, version, and any errors. Args: target | STRING |
| HIGH | logfire/variables/variable.py | 1044 | Resolve the variable, render templates with the given inputs, and return the result. The resolution pipeline is | STRING |
| HIGH | logfire/variables/composition.py | 123 | Expand `@{var}@` references in a serialized variable value. Uses the Handlebars engine so `@{}@` supports the full | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/_internal/formatter.py | 205 | except Exception as exc: | CODE |
| LOW | logfire/_internal/formatter.py | 212 | except Exception as exc: | CODE |
| LOW | logfire/_internal/formatter.py | 223 | except Exception as exc: | CODE |
| LOW | logfire/_internal/formatter.py | 269 | except Exception: | CODE |
| LOW⚡ | logfire/_internal/config.py | 1751 | except Exception: | CODE |
| LOW | logfire/_internal/config.py | 1208 | except Exception: | CODE |
| LOW | logfire/_internal/config.py | 1309 | except Exception: | CODE |
| LOW | logfire/_internal/config.py | 1768 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/config.py | 1775 | except Exception as e: # pragma: no cover | CODE |
| LOW | logfire/_internal/config.py | 1970 | except Exception: | CODE |
| LOW | logfire/_internal/config.py | 2311 | except Exception as exc: | CODE |
| LOW | logfire/_internal/forwarding.py | 177 | except Exception: | CODE |
| LOW | logfire/_internal/forwarding.py | 193 | except Exception: | CODE |
| LOW | logfire/_internal/json_schema.py | 153 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/json_encoder.py | 295 | except Exception: # currently redundant, but future-proof | CODE |
| LOW | logfire/_internal/json_encoder.py | 300 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/json_encoder.py | 312 | except Exception: | CODE |
| LOW | logfire/_internal/json_encoder.py | 329 | except Exception: | CODE |
| LOW | logfire/_internal/utils.py | 69 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/utils.py | 93 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/utils.py | 102 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/utils.py | 291 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/utils.py | 304 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/utils.py | 356 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/utils.py | 462 | except Exception: | CODE |
| LOW | logfire/_internal/utils.py | 502 | except Exception: # pragma: no cover | CODE |
| MEDIUM | logfire/_internal/utils.py | 285 | def log_internal_error(): | CODE |
| LOW | logfire/_internal/ast_utils.py | 262 | except Exception: # probably SyntaxError, but ast.parse can raise other exceptions too | CODE |
| LOW | logfire/_internal/config_params.py | 324 | except Exception as exc: | CODE |
| LOW | logfire/_internal/async_.py | 50 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/async_.py | 54 | except Exception: | CODE |
| LOW | logfire/_internal/collect_system_info.py | 19 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/collect_system_info.py | 25 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/instrument.py | 240 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/main.py | 278 | except Exception: | CODE |
| LOW | logfire/_internal/main.py | 290 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/main.py | 310 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/main.py | 2230 | except Exception: | STRING |
| LOW | logfire/_internal/tracer.py | 496 | except Exception as exc: | CODE |
| LOW | logfire/_internal/auto_trace/__init__.py | 40 | except Exception: | CODE |
| LOW | logfire/_internal/auto_trace/import_hook.py | 48 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/auto_trace/import_hook.py | 60 | except Exception: | CODE |
| LOW | logfire/_internal/auto_trace/import_hook.py | 68 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/auto_trace/import_hook.py | 79 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/auto_trace/import_hook.py | 99 | except Exception: # pragma: no cover | CODE |
| LOW⚡ | logfire/_internal/exporters/processor_wrapper.py | 452 | except Exception: | CODE |
| LOW⚡ | logfire/_internal/exporters/processor_wrapper.py | 459 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 212 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 234 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 437 | except Exception: | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 593 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 606 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/exporters/otlp.py | 195 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/exporters/otlp.py | 212 | except Exception as e: # pragma: no cover | CODE |
| LOW | logfire/_internal/exporters/otlp.py | 263 | except Exception: # pragma: no cover | CODE |
| LOW | logfire/_internal/cli/run.py | 197 | except Exception: | CODE |
| LOW | logfire/_internal/cli/gateway_auth.py | 223 | except Exception: | CODE |
| LOW⚡ | logfire/_internal/cli/gateway_auth.py | 275 | except Exception: | CODE |
| LOW⚡ | logfire/_internal/cli/gateway_auth.py | 280 | except Exception: | CODE |
| LOW | logfire/_internal/integrations/fastapi.py | 192 | except Exception as exc: | CODE |
| 78 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | logfire/experimental/api_client.py | 33 | with LogfireAPIClient(api_key='your-api-key') as client: | STRING |
| HIGH | logfire/experimental/api_client.py | 544 | with LogfireAPIClient(api_key='your-api-key') as client: | STRING |
| HIGH | docs/evaluate/evals-in-code.md | 162 | with LogfireAPIClient(api_key='your-api-key') as client: | CODE |
| HIGH | docs/evaluate/datasets-sdk.md | 29 | client = LogfireAPIClient(api_key='your-api-key') | CODE |
| HIGH | docs/evaluate/datasets-sdk.md | 35 | with LogfireAPIClient(api_key='your-api-key') as client: | CODE |
| HIGH | docs/evaluate/datasets-sdk.md | 46 | api_key='your-api-key', | CODE |
| HIGH | docs/evaluate/datasets-sdk.md | 56 | async with AsyncLogfireAPIClient(api_key='your-api-key') as client: | CODE |
| HIGH | docs/evaluate/datasets-sdk.md | 110 | with LogfireAPIClient(api_key='your-api-key') as client: | CODE |
| HIGH | docs/how-to-guides/client-side-feature-flags.md | 42 | const LOGFIRE_API_KEY = 'your-api-key' // project:read_external_variables scope | CODE |
| HIGH | docs/how-to-guides/client-side-feature-flags.md | 217 | headers_factory=lambda: {'Authorization': 'Bearer YOUR_API_KEY'}, | CODE |
| HIGH | docs/how-to-guides/client-side-feature-flags.md | 233 | headers={'Authorization': 'Bearer YOUR_API_KEY'}, | CODE |
| HIGH⚡ | docs/reference/advanced/use-api-keys.md | 101 | -H "Authorization: Bearer YOUR_API_KEY" | CODE |
| HIGH⚡ | docs/reference/advanced/use-api-keys.md | 108 | -H "Authorization: Bearer YOUR_API_KEY" | CODE |
| HIGH⚡ | docs/reference/advanced/use-api-keys.md | 111 | Replace `YOUR_API_KEY` with your actual API key. | CODE |
| HIGH | docs/reference/advanced/managed-variables/external.md | 62 | headers={'Authorization': 'Bearer YOUR_API_KEY'}, | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/_internal/json_formatter.py | 69 | CODE | |
| LOW | logfire/_internal/formatter.py | 61 | CODE | |
| LOW | logfire/_internal/formatter.py | 152 | CODE | |
| LOW | logfire/_internal/config.py | 1228 | CODE | |
| LOW | logfire/_internal/config.py | 1739 | CODE | |
| LOW | logfire/_internal/config.py | 1989 | CODE | |
| LOW | logfire/_internal/config.py | 2084 | CODE | |
| LOW | logfire/_internal/config.py | 1350 | CODE | |
| LOW | logfire/_internal/forwarding.py | 180 | CODE | |
| LOW | logfire/_internal/json_schema.py | 99 | CODE | |
| LOW | logfire/_internal/json_schema.py | 317 | CODE | |
| LOW | logfire/_internal/json_encoder.py | 246 | CODE | |
| LOW | logfire/_internal/utils.py | 441 | CODE | |
| LOW | logfire/_internal/scrubbing.py | 305 | CODE | |
| LOW | logfire/_internal/db_statement_summary.py | 50 | CODE | |
| LOW | logfire/_internal/instrument.py | 52 | CODE | |
| LOW | logfire/_internal/instrument.py | 65 | CODE | |
| LOW | logfire/_internal/main.py | 3357 | CODE | |
| LOW | logfire/_internal/main.py | 722 | CODE | |
| LOW | logfire/_internal/auto_trace/__init__.py | 16 | CODE | |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 89 | CODE | |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 174 | CODE | |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 299 | CODE | |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 379 | CODE | |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 467 | CODE | |
| LOW | logfire/_internal/exporters/otlp.py | 176 | CODE | |
| LOW | logfire/_internal/exporters/otlp.py | 222 | CODE | |
| LOW | logfire/_internal/exporters/remove_pending.py | 15 | CODE | |
| LOW | logfire/_internal/cli/__init__.py | 58 | CODE | |
| LOW | logfire/_internal/integrations/aiohttp_client.py | 113 | CODE | |
| LOW | logfire/_internal/integrations/fastapi.py | 196 | CODE | |
| LOW | logfire/_internal/integrations/psycopg.py | 28 | CODE | |
| LOW | logfire/_internal/integrations/pytest.py | 432 | CODE | |
| LOW | logfire/_internal/integrations/claude_agent_sdk.py | 82 | CODE | |
| LOW | logfire/_internal/integrations/claude_agent_sdk.py | 287 | CODE | |
| LOW | logfire/_internal/integrations/claude_agent_sdk.py | 339 | CODE | |
| LOW | logfire/_internal/integrations/openai_agents.py | 358 | CODE | |
| LOW | logfire/_internal/integrations/openai_agents.py | 74 | CODE | |
| LOW | logfire/_internal/integrations/openai_agents.py | 138 | CODE | |
| LOW | logfire/_internal/integrations/llm_providers/openai.py | 113 | CODE | |
| LOW | logfire/_internal/integrations/llm_providers/openai.py | 205 | CODE | |
| LOW | logfire/_internal/integrations/llm_providers/openai.py | 279 | CODE | |
| LOW | logfire/_internal/integrations/llm_providers/openai.py | 332 | CODE | |
| LOW | logfire/_internal/integrations/llm_providers/openai.py | 610 | CODE | |
| LOW | logfire/_internal/integrations/llm_providers/openai.py | 741 | CODE | |
| LOW | …fire/_internal/integrations/llm_providers/anthropic.py | 89 | CODE | |
| LOW | …fire/_internal/integrations/llm_providers/anthropic.py | 143 | CODE | |
| LOW | …fire/_internal/integrations/llm_providers/anthropic.py | 234 | CODE | |
| LOW | …fire/_internal/integrations/llm_providers/anthropic.py | 322 | CODE | |
| LOW | …e/_internal/integrations/llm_providers/llm_provider.py | 24 | CODE | |
| LOW | …e/_internal/integrations/llm_providers/llm_provider.py | 88 | CODE | |
| LOW | logfire/sampling/_tail_sampling.py | 178 | CODE | |
| LOW | logfire/sampling/_tail_sampling.py | 213 | CODE | |
| LOW | logfire/integrations/pydantic.py | 257 | CODE | |
| LOW | logfire/integrations/loguru.py | 32 | CODE | |
| LOW | logfire/variables/abstract.py | 708 | CODE | |
| LOW | logfire/variables/abstract.py | 961 | CODE | |
| LOW | logfire/variables/abstract.py | 403 | CODE | |
| LOW | logfire/variables/abstract.py | 1775 | CODE | |
| LOW | logfire/variables/config.py | 545 | CODE | |
| 20 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | logfire/propagate.py | 1 | """This module provides a thin wrapper around the OpenTelemetry propagate API to allow | STRING |
| MEDIUM | logfire/_internal/utils.py | 325 | # This function is always called from log_internal_error, so skip that frame. | COMMENT |
| MEDIUM | logfire/_internal/tracer.py | 329 | # Create a no-op span with the same SpanContext as the current span. | COMMENT |
| MEDIUM | logfire/_internal/cli/run.py | 371 | # Create a final rule for the bottom section | COMMENT |
| MEDIUM | logfire/_internal/cli/run.py | 391 | # Create a panel containing the content with a rounded box border | COMMENT |
| MEDIUM | logfire/_internal/integrations/asgi.py | 81 | # Create a no-op span with the same SpanContext as the current span. | COMMENT |
| MEDIUM | logfire/_internal/integrations/pytest.py | 145 | # Create a scoped logfire instance for pytest spans | COMMENT |
| MEDIUM | logfire/integrations/pydantic.py | 324 | """This method is called every time a new `SchemaValidator` is created. | STRING |
| MEDIUM | logfire/integrations/structlog.py | 12 | # This file is currently imported eagerly from __init__.py, so it shouldn't import structlog directly | COMMENT |
| MEDIUM | tests/test_query_client.py | 12 | # This file is intended to be updated by the Logfire developers, with the development platform running locally. | COMMENT |
| MEDIUM | tests/test_metrics.py | 564 | # Create a view that only keeps 'important' attribute for our custom counter | COMMENT |
| MEDIUM | tests/test_variable_composition.py | 1049 | # Create a variable config with a non-string variable | COMMENT |
| MEDIUM | tests/test_tail_sampling.py | 654 | # Create a span that doesn't trigger sampling — immediate processor gets on_start, | COMMENT |
| MEDIUM | tests/test_variables.py | 1729 | # Create a logfire instance | COMMENT |
| MEDIUM | tests/test_variables.py | 1760 | # Create a logfire instance and start the provider | COMMENT |
| MEDIUM | tests/test_variables.py | 4006 | # Create a new var to ensure there are changes (so push proceeds) | COMMENT |
| MEDIUM | tests/test_variables.py | 4341 | # Create a real trace context using the logfire instance | COMMENT |
| MEDIUM | tests/test_variables.py | 4358 | # Create a config that will report "not on server" | COMMENT |
| MEDIUM | tests/test_variables.py | 4372 | # Create a config where variant validation will produce a multi-line error | COMMENT |
| MEDIUM | tests/test_variables.py | 4392 | # Create a variable with a complex type that will generate multi-line errors | COMMENT |
| MEDIUM | tests/test_variables.py | 5201 | # Create a type-like object without __module__ | COMMENT |
| MEDIUM | tests/exporters/test_otlp_session.py | 104 | # Create a bunch of failed exports. | COMMENT |
| MEDIUM | tests/otel_integrations/test_dspy.py | 131 | # Define a simple signature | STRING |
| MEDIUM | tests/otel_integrations/test_dspy.py | 138 | # Create a predictor | COMMENT |
| MEDIUM | tests/otel_integrations/test_pytest_plugin.py | 68 | # Create a conftest that captures spans to a JSON file | COMMENT |
| MEDIUM⚡ | tests/otel_integrations/test_pytest_plugin.py | 1339 | # Create a child span and verify it's properly nested | STRING |
| MEDIUM | tests/otel_integrations/test_pytest_plugin.py | 1185 | # Create a child span and verify it's properly nested | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/.agents/skills/logfire-instrumentation/SKILL.md | 49 | ## Step 1: Detect Language and Frameworks | COMMENT |
| LOW⚡ | logfire/variables/config.py | 370 | # Step 1: Determine the rollout and overrides to use | COMMENT |
| LOW⚡ | logfire/variables/config.py | 374 | # Step 2: Find the first matching override, or use the base rollout | COMMENT |
| LOW | docs/cookbook/evaluate-an-agent.md | 42 | ## Step 1: Build the agent | COMMENT |
| LOW | docs/cookbook/evaluate-an-agent.md | 75 | ## Step 2: Instrument it and see the trace | COMMENT |
| LOW | docs/cookbook/evaluate-an-agent.md | 121 | ## Step 3: Is it any good? Score it with an eval | COMMENT |
| LOW | docs/cookbook/evaluate-an-agent.md | 226 | ## Step 4: Catch a regression | COMMENT |
| LOW | docs/cookbook/evaluate-an-agent.md | 265 | ## Step 5: Send the uncertain cases to a human | COMMENT |
| LOW⚡ | docs/guides/web-ui/metrics-explorer.md | 15 | ### Step 1: Pick a namespace | COMMENT |
| LOW⚡ | docs/guides/web-ui/metrics-explorer.md | 21 | ### Step 2: Pick a metric | COMMENT |
| LOW⚡ | docs/guides/web-ui/metrics-explorer.md | 25 | ### Step 3: Explore the dimensions | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 43 | ## Step 1: Find the Redirect URI in Logfire | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 52 | ## Step 2: Create an App Registration in Azure Entra ID | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 63 | ## Step 3: Create a Client Secret | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 71 | ## Step 4: Collect Required Values from Azure | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 83 | ## Step 5: Configure the OIDC Provider in Logfire | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 96 | ## Step 6: Connect Entra ID | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 104 | ## Step 7: Test the SSO Login | COMMENT |
| LOW | docs/how-to-guides/sso-setup.md | 121 | ## Step 8: Invite Team Members | COMMENT |
| LOW | docs/reference/self-hosted/bucket-migration.md | 33 | ## Step 1: Replicate & Sync Bucket Data | COMMENT |
| LOW | docs/reference/self-hosted/bucket-migration.md | 66 | ## Step 2: Scale Down Writer Workloads | COMMENT |
| LOW | docs/reference/self-hosted/bucket-migration.md | 138 | ## Step 3: Deploy Updated Configuration & Scale Up | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/query_client.py | 16 | __all__ = [ | CODE |
| LOW | logfire/testing.py | 22 | __all__ = [ | CODE |
| LOW | logfire/_internal/metrics.py | 64 | def set_meter_provider(self, meter_provider: MeterProvider) -> None: | CODE |
| LOW | logfire/_internal/metrics.py | 94 | def set_meter(self, meter_provider: MeterProvider) -> None: | CODE |
| LOW | logfire/_internal/logs.py | 47 | def set_min_level(self, min_level: int) -> None: | CODE |
| LOW | logfire/_internal/logs.py | 60 | def set_provider(self, logger_provider: LoggerProvider) -> None: | CODE |
| LOW | logfire/_internal/logs.py | 124 | def set_logger(self, provider: LoggerProvider) -> None: | CODE |
| LOW | logfire/_internal/main.py | 3217 | def set_attribute(self, key: str, value: Any) -> None: | CODE |
| LOW | logfire/_internal/main.py | 3230 | def set_attributes(self, attributes: dict[str, Any]) -> None: | CODE |
| LOW | logfire/_internal/main.py | 3279 | def _set_attribute(self, key: str, value: Any) -> None: | CODE |
| LOW | logfire/_internal/main.py | 3381 | def set_user_attributes_on_raw_span(span: Span, attributes: dict[str, Any]) -> None: | CODE |
| LOW | logfire/_internal/tracer.py | 66 | def set_provider(self, provider: SDKTracerProvider) -> None: | CODE |
| LOW | logfire/_internal/tracer.py | 173 | def set_attributes(self, attributes: Mapping[str, otel_types.AttributeValue]) -> None: | CODE |
| LOW | logfire/_internal/tracer.py | 176 | def set_attribute(self, key: str, value: otel_types.AttributeValue) -> None: | CODE |
| LOW | logfire/_internal/tracer.py | 190 | def update_name(self, name: str) -> None: # pragma: no cover | CODE |
| LOW | logfire/_internal/tracer.py | 273 | def set_tracer(self, tracer: Tracer) -> None: | CODE |
| LOW | logfire/_internal/exporters/processor_wrapper.py | 89 | def _set_error_level_and_status(span: ReadableSpanDict) -> None: | CODE |
| LOW | logfire/_internal/cli/__init__.py | 39 | logger = logging.getLogger(__name__) | CODE |
| LOW | logfire/_internal/integrations/aiohttp_client.py | 149 | def _set_complex_span_attributes(self, attributes: dict[str, Any]) -> None: | CODE |
| LOW⚡ | logfire/_internal/integrations/claude_agent_sdk.py | 68 | def _set_state(state: _ConversationState) -> None: | CODE |
| LOW | logfire/_internal/integrations/openai_agents.py | 328 | def set_error(self, error: SpanError) -> None: | CODE |
| LOW | logfire/sampling/__init__.py | 5 | __all__ = [ | CODE |
| LOW | logfire/integrations/pydantic.py | 246 | def _set_span_attributes(self, span: LogfireSpan, *, status: str, success: bool, **attributes: Any) -> None: | CODE |
| LOW⚡ | logfire/integrations/pydantic.py | 379 | def set_pydantic_plugin_config(plugin_config: PydanticPlugin | None) -> None: | CODE |
| LOW | logfire/variables/__init__.py | 54 | __all__ = [ | CODE |
| LOW⚡ | tests/test_configure.py | 1341 | def _update_resource(self, resource: Resource) -> None: | CODE |
| LOW⚡ | tests/test_configure.py | 1348 | def _update_resource(self, resource: Resource) -> None: | CODE |
| LOW⚡ | tests/test_configure.py | 1355 | def _update_resource(self, resource: Resource) -> None: | CODE |
| LOW | tests/otel_integrations/test_anthropic.py | 1304 | def set_attribute(self, key: str, value: Any) -> None: | CODE |
| LOW | tests/otel_integrations/test_anthropic.py | 1307 | def set_attributes(self, attributes: dict[str, Any]) -> None: | CODE |
| LOW | release/prepare.py | 11 | def update_version(pyproject_file: str, new_version: str) -> None: | CODE |
| LOW | release/prepare.py | 65 | def update_history(new_version: str, notes: str) -> None: | CODE |
| LOW | logfire-api/logfire_api/__init__.py | 88 | def set_attribute(self, key: str, value: Any) -> None: ... # pragma: no cover | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | logfire/_internal/integrations/starlette.py | 0 | instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for | STRING |
| HIGH | logfire/_internal/integrations/flask.py | 0 | instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for | STRING |
| HIGH | logfire/_internal/integrations/asgi.py | 0 | instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for | STRING |
| HIGH | logfire/_internal/integrations/wsgi.py | 0 | instrument `app` so that spans are automatically created for each request. see the `logfire.instrument_wsgi` method for | STRING |
| HIGH | docs/integrations/llms/langgraph.md | 0 | look up the current status and owner of an incident by id. | STRING |
| HIGH | docs/integrations/llms/autogen.md | 0 | look up the current status and owner of an incident by id. | STRING |
| HIGH | docs/integrations/llms/crewai.md | 0 | look up the current status and owner of an incident by id. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/test_template_validation.py | 72 | result = extract_template_strings('{"text": "{{name}}", "count": 42, "active": true, "nothing": null}') | CODE |
| HIGH⚡ | tests/test_template_validation.py | 77 | result = extract_template_strings('["{{a}}", 42, true, null, "{{b}}"]') | CODE |
| HIGH | tests/test_json_args.py | 804 | '{"x":1,"y":2,"z":null}', | CODE |
| HIGH | tests/test_json_args.py | 818 | '{"x":1,"y":2,"z":{"x":1,"y":2,"z":null}}', | CODE |
| HIGH | tests/test_json_args.py | 1062 | 'complex_list': '[1,2,{"a":{"b":{"c":["d"]}}},{"b":[2]},true,false,null,"a","b",[1,2]]', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_configure.py | 1888 | # we check that fake_token is valid now when we configure the project | COMMENT |
| LOW⚡ | tests/test_configure.py | 2153 | with patch.dict(os.environ, {'LOGFIRE_TOKEN': 'fake_token'}), requests_mock.Mocker() as request_mocker: | CODE |
| LOW⚡ | tests/test_configure.py | 2161 | assert request_mocker.request_history[0].headers['Authorization'] == 'fake_token' | CODE |
| LOW⚡ | tests/test_configure.py | 2178 | with patch.dict(os.environ, {'LOGFIRE_TOKEN': 'fake_token'}), requests_mock.Mocker() as request_mocker: | CODE |
| LOW⚡ | tests/test_configure.py | 2185 | assert logfire.DEFAULT_LOGFIRE_INSTANCE.config.token == 'fake_token' | CODE |
| LOW⚡ | tests/test_configure.py | 2189 | assert request_mocker.request_history[0].headers['Authorization'] == 'fake_token' | CODE |
| LOW | tests/test_configure.py | 1642 | 'token': 'fake_token', | CODE |
| LOW | tests/test_configure.py | 1681 | 'token': 'fake_token', | CODE |
| LOW | tests/test_configure.py | 1743 | 'token': 'fake_token', | CODE |
| LOW | tests/test_configure.py | 1868 | 'token': 'fake_token', | CODE |
| LOW | tests/test_configure.py | 1891 | assert request_mocker.request_history[-1].headers['Authorization'] == 'fake_token' | CODE |
| LOW | tests/test_configure.py | 1966 | 'token': 'fake_token', | CODE |
| LOW | tests/test_db_api.py | 74 | read_token='fake-token', | CODE |
| LOW | tests/test_json_args.py | 460 | NameEmail(name='John Doe', email='john.doe@mail.com'), | CODE |
| LOW | tests/test_variable_templates.py | 210 | resolved = var.get(Inputs(user_name='Alice', company='Acme Corp')) | CODE |
| LOW | tests/test_cli.py | 505 | token = "fake_token" | CODE |
| LOW | tests/test_cli.py | 644 | token = "fake_token" | CODE |
| LOW | tests/test_cli.py | 496 | dict(text='{"token": "fake_token", "expiration": "fake_exp"}'), | STRING |
| LOW | tests/test_cli.py | 545 | dict(text='{"token": "fake_token", "expiration": "fake_exp"}'), | STRING |
| LOW | tests/test_cli.py | 634 | dict(text='{"token": "fake_token", "expiration": "fake_exp"}'), | STRING |
| LOW | tests/test_cli.py | 734 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 780 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 828 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 874 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 923 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 979 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1023 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1071 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1124 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1162 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1272 | json={'token': 'fake_token'}, | STRING |
| LOW | tests/test_cli.py | 1278 | assert output == snapshot('fake_token\n') | STRING |
| LOW | tests/test_cli.py | 1328 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1374 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1433 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1496 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1539 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 1657 | 'token': 'fake_token', | STRING |
| LOW | tests/test_cli.py | 4235 | json={'token': 'fake_token'}, | STRING |
| LOW | tests/test_cli.py | 4439 | 'env = { "LOGFIRE_READ_TOKEN" = "fake_token" }\n' | STRING |
| LOW⚡ | tests/test_variables.py | 127 | assert condition.matches({'email': 'user@example.com'}) is True | CODE |
| LOW | docs/integrations/llms/instructor.md | 50 | #> name='John Doe' age=30 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/_internal/formatter.py | 288 | # Check if the expression contains await before attempting to compile | COMMENT |
| LOW | logfire/variables/abstract.py | 900 | # Check if description differs (for warning purposes) | COMMENT |
| LOW | logfire/variables/remote.py | 343 | # Set flag to force refresh and wake up the worker | COMMENT |
| LOW | logfire/variables/remote.py | 380 | # Check if SSE event requested a forced refresh | COMMENT |
| LOW | tests/test_tail_sampling.py | 25 | # Set duration to None to not include spans with a long duration. | COMMENT |
| LOW | tests/test_tail_sampling.py | 214 | # Set level to None to not include spans merely based on a high level. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/_internal/formatter.py | 274 | # Formatting failed, so just use the original format string as the message. | COMMENT |
| LOW⚡ | logfire/_internal/exporters/processor_wrapper.py | 448 | # If the input messages are a prefix of the output messages, we can just use the output messages | COMMENT |
| LOW | logfire/sampling/_tail_sampling.py | 199 | # Most processors just set attributes, which is safe before the sampling decision. | COMMENT |
| MEDIUM | tests/test_utils.py | 58 | # - They should look seamless, with each frame pointing to the next one. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pyproject.toml | 361 | source = ["logfire", "logfire-api"] | COMMENT |
| LOW | logfire/integrations/logging.py | 141 | # so `name` should be treated as a keyword argument, i.e. its own attribute. | COMMENT |
| LOW | logfire/variables/remote.py | 381 | force = self._force_refresh_event.is_set() | COMMENT |
| LOW | logfire/variables/composition.py | 261 | ) | COMMENT |
| LOW | tests/test_query_client.py | 21 | # import logfire | COMMENT |
| LOW | docs/how-to-guides/alternative-clients.md | 141 | .http() | COMMENT |
| LOW | .github/workflows/docs-preview.yml | 1 | name: Docs Preview | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/otel_integrations/test_openai_agents.py | 1022 | # The model call runs concurrently with input guardrails. Depending on when it is | COMMENT |
| MEDIUM | docs/evaluate/overview.md | 16 | ## The scaffold: dataset → task → evaluators → results → experiment | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/_internal/config.py | 489 | CODE | |
| LOW | logfire/_internal/config.py | 1014 | CODE | |
| LOW | logfire/_internal/main.py | 1570 | CODE | |
| LOW | logfire/_internal/main.py | 1585 | CODE | |
| LOW | logfire/_internal/integrations/llm_providers/openai.py | 513 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | logfire/variables/config.py | 370 | # Step 1: Determine the rollout and overrides to use | COMMENT |
| LOW⚡ | logfire/variables/config.py | 374 | # Step 2: Find the first matching override, or use the base rollout | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | logfire/_internal/main.py | 635 | def my_function(a: int): | STRING |
| LOW | logfire/_internal/main.py | 665 | def my_function(a: int): | STRING |
| LOW | logfire/_internal/main.py | 690 | def my_function(a: int): | STRING |