Skip to content
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

[Telemetry] Add eventlog endpoint for collecting client-side events #501

Closed
wants to merge 52 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
344bb57
Add initial eventlog hook
yuvipanda Jul 7, 2019
a0f40ea
Install jupyter_telemetry from source
yuvipanda Jul 7, 2019
96bf2f0
Set up an eventlog API endpoint
yuvipanda Jul 7, 2019
06b91e0
Use different naming convention & add test for it
yuvipanda Jul 7, 2019
716ff1b
Don't use f-strings
yuvipanda Jul 7, 2019
8e122fc
Derive JSON Schema files from YAML files
yuvipanda Jul 9, 2019
f9a0dfb
Keep event schemas in YAML
yuvipanda Jul 9, 2019
c7428e8
Depend on the jupyter_telemetry package
yuvipanda Jul 9, 2019
9437e88
read schemas from new utils function
Zsailer Oct 1, 2019
6e3c80c
Add fix for tables in RTD theme sphinx docs.
Zsailer Oct 1, 2019
4035fd5
add event schema auto-documentation to jupyter notebook docs
Zsailer Oct 1, 2019
23d50a3
format paths in recorded events
Zsailer Oct 1, 2019
3c94970
add documentation for eventlog endpoint
Zsailer Oct 1, 2019
e76c91b
return exception as 400 error in eventlog endpoint
Zsailer Oct 1, 2019
2ce7c54
normalize path in emitted event
Zsailer Oct 1, 2019
5794d31
initial tests
Zsailer May 19, 2020
7c9d3d5
add initial telemetry docs
Zsailer May 19, 2020
ef8573d
fix jupyter_telemetry dependency
Zsailer May 19, 2020
ea9e352
point telemetry at correct dev branch
Zsailer May 19, 2020
b06f7d6
add tests for eventlog
kiendang Oct 20, 2020
4d7fc23
Merge branch 'master' into jupyter_telemetry
kiendang Dec 17, 2020
7302396
Use correct fixture names
kiendang Dec 17, 2020
2c79b1a
Merge branch 'master' into jupyter_telemetry
kiendang Mar 9, 2021
0ac16dc
Fix import
kiendang Mar 10, 2021
7c81b23
Remove redundant call
kiendang Mar 18, 2021
b8ca484
Update telemetry
kiendang Mar 20, 2021
ac452cd
Add note about security
kiendang Mar 22, 2021
70f9275
Register client telemetry schemas using entry_points
kiendang Mar 31, 2021
7f50c85
Add working telemetry commit for testing
kiendang Apr 6, 2021
99439b6
Use backported importlib_metadata
kiendang Apr 6, 2021
cdc92e9
Merge remote-tracking branch 'upstream/master' into jupyter_telemetry
kiendang Apr 6, 2021
8e69ab0
Ignore errors while registering client events
kiendang Apr 23, 2021
e2db0ad
Add client eventlog to list services
kiendang Apr 23, 2021
66accdc
Add tests for client telemetry events
kiendang Apr 23, 2021
4dcd258
Add client telemetry eventlog tests to CI
kiendang Apr 23, 2021
87dca57
Merge branch 'master' into jupyter_telemetry
kiendang Apr 23, 2021
9fd2a5f
Clean up
kiendang Apr 23, 2021
f692488
Fix eventlog test
kiendang Apr 23, 2021
21117a6
Use standard lib instead of backport when possible
kiendang Apr 24, 2021
1936503
Fix docs
kiendang Apr 25, 2021
e099ccc
Merge branch 'master' into jupyter_telemetry
kiendang Apr 25, 2021
bc94f13
Fix docs
kiendang Apr 25, 2021
bfbdd17
Refine example
kiendang Apr 25, 2021
0974231
Use same interface for registering file and file object
kiendang Apr 25, 2021
035eb6e
Fix client test ci
kiendang Apr 25, 2021
8179c47
Remove redundant check
kiendang Apr 26, 2021
c307a8d
Add docs on registering client events
kiendang Apr 26, 2021
e206188
Remove unrelated doc change
kiendang Apr 26, 2021
cce5c71
Add .yml extension
kiendang May 3, 2021
19214e8
No longer use pathlib .suffix to check file extension
kiendang May 3, 2021
c67401d
Doc change notebook server to jupyter server
kiendang May 3, 2021
e15dd9b
Merge remote-tracking branch 'upstream/master' into telemetry_client
kiendang May 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Doc change notebook server to jupyter server
kiendang committed May 3, 2021
commit c67401d43e49dafd2951c3236ce244099357fb7e
6 changes: 3 additions & 3 deletions docs/source/operators/telemetry.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Eventlogging and Telemetry
==========================

The Notebook Server can be configured to record structured events from a running server using Jupyter's `Telemetry System`_. The types of events that the Notebook Server emits are defined by `JSON schemas`_ listed below_ emitted as JSON data, defined and validated by the JSON schemas listed below.
Jupyter Server can be configured to record structured events from a running server using Jupyter's `Telemetry System`_. The types of events that Jupyter Server emits are defined by `JSON schemas`_ listed below_ emitted as JSON data, defined and validated by the JSON schemas listed below.


.. _logging: https://docs.python.org/3/library/logging.html
.. _`Telemetry System`: https://github.com/jupyter/telemetry
.. _`JSON schemas`: https://json-schema.org/

.. warning::
Do NOT rely on this feature for security or auditing purposes. Neither `server <#emitting-server-events>`_ nor `client <#eventlog-endpoint>`_ events are protected against meddling. For server events, those who have access to the environment can change the server code to emit whatever they want. The same goes for client events where nothing prevents users from sending spurious data to the `eventlog` endpoint.
Do NOT rely on this feature for security or auditing purposes. Neither `server <#emitting-server-events>`_ nor `client <#the-eventlog-endpoint>`_ events are protected against meddling. For server events, those who have access to the environment can change the server code to emit whatever they want. The same goes for client events where nothing prevents users from sending spurious data to the `eventlog` endpoint.

Emitting server events
----------------------
@@ -48,7 +48,7 @@ Server event schemas
The ``eventlog`` endpoint
-------------------------

The Notebook Server provides a public REST endpoint for external applications to validate and log events
Jupyter Server provides a public REST endpoint for external applications to validate and log events
through the Server's Event Log.

To log events, send a `POST` request to the `/api/eventlog` endpoint. The body of the request should be a