-
Notifications
You must be signed in to change notification settings - Fork 391
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
Add event logging support #679
Conversation
cdd3b1b
to
56479a2
Compare
@minrk if I set handler to logging.StreamHandler(), I get this error:
Looks like traitlets is trying to do a deep copy maybe? I'm not entirely sure why it's doing that! Any thoughts? |
traitlets does a deep copy of the config object. What are you passing to the config? |
- Define & emit events in a unified way with EventLog class - Events can be sent to a sink via logging handlers - Events are JSON formatted, with a 'capsule' that contains useful metadata - Defaults to not doing anything at all unless a handler is configured - Adds 'launch' events that are emitted when a launch is successful. - Schemas are used to make sure we are only capturing the information we really need, and nothing more.
traitlets does a deep copy of config, so you can not pass unpicklable Instance objects through it. Most handlers are unpicklable
This installs binderhub and its dependencies into environment. Also runs npm install and webpack, so we don't have to run it manually. Doing this since travis can't find the jsonlogger package otherwise.
Trying to fix the following error from CI: > traitlets.traitlets.TraitError: No default value found for handlers_maker trait
4683890
to
046e3a7
Compare
The test failures now seem unrelated? |
Tests and docs added! |
As a design question: will each event type be added as a method on EventLogger, or will there be direct calls to |
Avoids evaluation overhead on object instantiation
This ensures we have a timezone marker
2649a4d
to
03831ba
Compare
@minrk I think to begin with we'll add methods to EventLogger, but I want to add schema validation + registration to this soon. Once we do that, we can just have emit. The methods are there just to enforce a schema until then. This will also allow us to make this more generic later on. |
pip install . doesn't seem to run these commands from setup.py
This PR aims to address parts of jupyterhub/mybinder.org-deploy#97
Our goal is to have an analytics pipeline that:
developers can see easily & exactly what is being
collected.
the event streams & developers who are adding the
event emitting code.
This PR introduces an EventLog class. We'll iterate on
the design here, but eventually it should be spun out into
its own little library that can be integrated into other
parts of Jupyter.
For mybinder.org, we can sink these events into
Stackdriver with https://cloud.google.com/logging/docs/setup/python.
This should give us an easy sink that we don't have to maintain,
and an easy way to export to files / real-time query. This is
much easier than maintaining something like logstash or fluent-bit.
A lot of this work is inspired by the (IMO very well designed)
Wikimedia Event Logging
system. I think it provides a good mix of analytics, performance,
privacy, transparency, and ease of use for analysis