microsoft / jupyter-Kqlmagic

Extension (Magic) to Jupyter notebook and Jupyter lab, that enable notebook experience working with Kusto, ApplicationInsights, and LogAnalytics data.
Other
85 stars 31 forks source link

should document the options for KQLMAGIC_NOTEBOOK_APP and what it means #84

Open ForrestTrepte opened 2 years ago

ForrestTrepte commented 2 years ago

The quickstart says KQLMAGIC_NOTEBOOK_APP - set the notebook application (default jupyternotebook).

It would be helpful to document:

  1. What are the allowed options for this setting? (jupyternotebook, visualstudiocode, ipython, jupyterlab, ...?)
  2. What is the meaning of this setting? How should I know which value to choose? What does it do? (You should set this to match the application user interface in which you are running Jupyter? Otherwise the authentication step may fail?)
mbnshtck commented 2 years ago

this configurable option allows to inform Kqlmagic what front end type is used. If it is set to auto (this is the default), Kqlmagic tries to detect the what front end type is used. It is very rare that Kqlmagic fails to detect the front end type that is used. So it is mainly used for debug, or when kqlmagic fails to detect. you can find the allowed options, by executing : %kql --config browse the output to --notebook_app, property Choices contains the allowed values

ForrestTrepte commented 2 years ago

Thanks for the info, @mbnshtck! I must have had one of those rare cases where Kqlmagic failed to detect that I was running in vscode and it was unable to pop up the browser window in order to authenticate.

ForrestTrepte commented 2 years ago

I suspect there may still be an issue here. When other users read the quickstart it mentions KQLMAGIC_NOTEBOOK_APP, but how would they figure out how to use it?

Is the --config option documented or is this something where everybody knows that when working with Magic extensions you can use --config to find out options that correspond to environment variables? (Perhaps I didn't know that because this is the first Magic extension I have used.)

mbnshtck commented 2 years ago

Well, as is the case with many Open Source project, the documentation is not always available, and it takes some exploration to use it. You are welcome, to contribute to the project, whether code, test, or documentation.

Regarding the case Kqlmagic failed to detect that you are running from vscode, If you can reproduce it, after you load Kqlmagic, please execute %kql --bugreport browse the ouput, and obfuscate any secrets if any exist and send me the output to michabin@microsoft.com I would like to troubleshoot this case.

To get help information about the environment variable, please execute: %kql --help "env"

ForrestTrepte commented 2 years ago

I have opened PR #86 with a suggested docs contribution and I sent you my bugreport data. Thanks for your help, @mbnshtck!