Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier way to enable fallback reporting? #216

Open
hadley opened this issue Jul 25, 2024 · 1 comment
Open

Easier way to enable fallback reporting? #216

hadley opened this issue Jul 25, 2024 · 1 comment
Milestone

Comments

@hadley
Copy link
Member

hadley commented Jul 25, 2024

It would be nice to be able to do something like duckdb::fallback_reporting(TRUE). I think that could write a file to tools::R_user_dir("duckplyr", "cache")/DUCKPLYR_FALLBACK_LOG_DIR that has lower precedence than the environment variables.

I think requiring the user to edit their ~/.Renviron is too big of a barrier to data collection, and it would be nice to reduce:

The duckplyr package is configured to fall back to dplyr when it encounters an incompatibility. Fallback events can be collected and
uploaded for analysis to guide future development. By default, no data will be collected or uploaded.
ℹ Fallback logging is not controlled and therefore disabled. Enable it with [Sys.setenv(DUCKPLYR_FALLBACK_COLLECT = 1)](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#), disable it with
  [Sys.setenv(DUCKPLYR_FALLBACK_COLLECT = 0)](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#).
ℹ Fallback uploading is not controlled and therefore disabled. Enable it with [Sys.setenv(DUCKPLYR_FALLBACK_AUTOUPLOAD = 1)](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#), disable it
  with [Sys.setenv(DUCKPLYR_FALLBACK_AUTOUPLOAD = 0)](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#).
ℹ See [duckplyr::fallback](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#) for details.

to something like:

duckplyr falls back to dplyr when it encounters an incompatibility. 
We would like to find out about these events so we can make duckplyr better.
i Use `duckdb::fallback_upload()` to upload this report
i Use `duckdb::fallback_reporting(TRUE)` to automatically upload future reports

I'm not sure why we're not logging by default, since that seems like a very low risk activity?

@hadley hadley added this to the 1.0.0 milestone Sep 25, 2024
@krlmlr
Copy link
Member

krlmlr commented Oct 16, 2024

DoD:

  • User-friendly way to enable and disable log collection and fallback reporting in a fail-safe manner
  • Consider opting out of logging
  • Friendlier startup message
  • Update in README and documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants