Install & Compatibility
Where this runs
tested against v0.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.356s · 23.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.8s · import 0.326s · 24MB
22MB installed
● package 22MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
EventLog
✓ from jupyter_telemetry import EventLog
Import directly from jupyter_telemetry. No common incorrect import identified.
emit
✓ from jupyter_telemetry.eventlog import emit
If you need the emit function explicitly. Usually used via EventLog object.
Basic usage: import EventLog, register a JSON schema, and emit events.
from jupyter_telemetry import EventLog
# Create an EventLog instance
log = EventLog()
# Register a schema (using traitlets-based schema)
from traitlets import Dict, Unicode
class MyEvent:
def __init__(self):
self.schema = {
'type': 'object',
'properties': {
'user': {'type': 'string'},
'action': {'type': 'string'},
'value': {'type': 'integer'}
},
'required': ['user', 'action', 'value']
}
log.register_event_schema('my_event', MyEvent().schema)
# Emit an event
log.emit('my_event', {'user': 'alice', 'action': 'click', 'value': 42})
# Events are logged via the configured output (default: logging.Logger to stderr)
Errors
Common errors & fixes
AttributeError: module 'jupyter_telemetry' has no attribute 'EventLog'
Incorrect import path; attempting to import from the top-level namespace but the module might be missing or installed incorrectly.
fixUse: from jupyter_telemetry import EventLog; or check installation: pip show jupyter-telemetry
KeyError: 'event'
Emitting an event with a schema name that hasn't been registered. The library silently ignores, but if you access the event log later, it may raise KeyError.
fixRegister the event schema before emitting: log.register_event_schema('my_event', schema) No handlers could be found for logger "jupyter_telemetry"
Python's logging module emits this warning if no handlers are configured for the telemetry logger.
fixSet up logging: import logging; logging.basicConfig() or add a handler for 'jupyter_telemetry' logger.
Upgrade
Version history
0.1.0latest on PyPI · released Apr 10, 2020
Audit
Dependencies
traitletsrequiredRequired for configuration and event schema definitions
python-json-loggeroptionalUsed for structured JSON logging output
jsonschemarequiredValidates event data against registered schemas