Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
| "DEFAULT", "telemetry_enabled" | ||
| ) | ||
| except Exception: | ||
| pass |
There was a problem hiding this comment.
Bug: Environment variable telemetry override is completely broken
The environment variable SCRAPEGRAPHAI_TELEMETRY_ENABLED check is broken. The code checks if the variable is set (os.environ.get(...) is not None) but then reads from config_obj instead of using the actual environment variable value. The original code first assigned the env var value into config_obj["DEFAULT"]["telemetry_enabled"] = env_value before reading it back, but this assignment was removed. Now setting SCRAPEGRAPHAI_TELEMETRY_ENABLED=false won't actually disable telemetry since the env var value is never used.
| ) | ||
|
|
||
| return wrapped_fn | ||
| log_event("function_usage", {"function_name": call_fn.__name__}) |
There was a problem hiding this comment.
Bug: Removed error handling exposes race condition in decorator
The capture_function_usage decorator removed the try/except block that previously wrapped the log_event call. Since send_event_json raises RuntimeError when telemetry is disabled, and there's a race condition where g_telemetry_enabled could be set to False (via disable_telemetry()) between the is_telemetry_enabled() check and the send_event_json call, any exception will now propagate up from the finally block. This could unexpectedly affect the decorated function's behavior when the original code silently caught these errors.
|
🎉 This PR is included in version 1.65.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Note
Telemetry now sends events to a proxy endpoint without an API key, with simplified config handling and updated payload/headers.
PROXY_URL(https://scrapegraph-proxy.onrender.com/capture/).Authorizationheader; send via proxy with JSON andUser-Agentonly.log_eventsendsevent,distinct_id, and mergedproperties(noapi_key).telemetry_versionto"0.0.4-proxy".SCRAPEGRAPHAI_TELEMETRY_ENABLEDenv var.log_graph_executionand decoratorcapture_function_usage; remove verbose comments/docstrings.Written by Cursor Bugbot for commit e230856. This will update automatically on new commits. Configure here.