Skip to content

Commit

Permalink
SwanSpawner: Add metric to monitor the usage of each interface
Browse files Browse the repository at this point in the history
Add log metric to check the number of users that start a session with
the classic and jupyterlab interfaces.
  • Loading branch information
PMax5 authored and etejedor committed Jul 4, 2024
1 parent da35389 commit f62d99e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions SwanSpawner/swanspawner/swanspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ def get_env(self):
SWAN_USE_JUPYTERLAB = 'true'
))

user_interface = 'lab'
else:
user_interface = 'classic'

self.log_metric(
self.user.name,
self.this_host,
'ui',
user_interface
)

# Append path of user packages installed on CERNBox to PYTHONPATH
if self.user_options[self.use_local_packages_field] == 'checked':
env.update(dict(
Expand Down

0 comments on commit f62d99e

Please sign in to comment.