Registry / observability / jupyter-telemetry

jupyter-telemetry

JSON →
library0.1.0pypypi✓ verified 85d ago

Library for emitting telemetry events from Jupyter applications. Provides a configurable event logging system with support for schemas and output sinks. Version 0.1.0 is the latest (stable). Development is relatively slow; no major releases since 2020.

pip install jupyter-telemetry
INSTALL
IMPORT
SIG · JUPYTER-TELEMETRY
J
jupyter-telemetry
observabilitypythonv0.1.0
Install
2.8s avg
Import
341ms
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.356s · 23.5MB
glibc
py 3.103.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)
Debug
Known issues
gotchaEvent schemas must be registered before emitting. If you emit an event for an unregistered schema, the library silently drops the event with no error.
fix
Ensure all event types are registered via log.register_event_schema before calling log.emit.
affects: <=0.1.0
gotchaThe library uses logging under the hood. If you don't configure logging output, events are sent to stderr via a default logging handler. In environments like Jupyter Notebook, this can cause cluttered output.
fix
Configure logging to suppress or redirect: import logging; logging.getLogger('jupyter_telemetry').setLevel(logging.WARNING)
affects: all
deprecatedPython 3.5 and 3.6 are no longer supported upstream. The library's requires_python is >=3.5, but tests may fail on Python 3.9+ due to removed APIs (e.g., collections.abc vs collections).
fix
Use Python 3.7 or 3.8. For newer Python, consider patching or using an alternative.
affects: 0.1.0
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.
fix
Use: 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.
fix
Register 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.
fix
Set 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
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
2
Resources
jupyter-telemetry — pip install jupyter-telemetry · libregistry