telemetry icon indicating copy to clipboard operation
telemetry copied to clipboard

Installing the extension

Open tonyfast opened this issue 5 years ago • 3 comments

I was trying to install the labextension locally and it seems like the package.json is out of date or incomplete. Maybe the javascript part of the extension can be tested on circle, too.

tonyfast avatar Aug 05 '19 13:08 tonyfast

Yeah, the JS side of this package hasn't been developed (yet). Right now, this is just a Python library. It's coming soon though! 😃

Zsailer avatar Aug 05 '19 16:08 Zsailer

Cool. What is the minimal thing I need to do start logging events?

tonyfast avatar Aug 05 '19 16:08 tonyfast

Here are instructions to getting telemetry working with jupyter/notebook.

  1. Clone and install this repo.
  2. Fetch this branch of notebook.
  3. Add this configuration to your jupyter_notebook_config.py (or however you store/load your config).
     import logging
    
     # List where you want your events to go.
     eventlog_filepath = 'events.log'
     c.EventLog.handlers = [
         logging.FileHandler(eventlog_filepath)
     ]
    
     # List which events get logged.
     c.EventLog.allowed_schemas = [
        'eventlogging.jupyter.org/notebook/contentsmanager-actions'
     ]
    
  4. Start jupyter notebook and navigate directories/open+close ntoebooks.

The current implementation logs events from the contents service (we still need to develope schemas for other services).

I'll work on the README today to give examples on how to integrate this library with other tools.

Zsailer avatar Aug 05 '19 18:08 Zsailer