Replace user_id with server_id in telemetry

This commit is contained in:
sabaimran 2024-10-21 20:47:52 -07:00
parent db959a504d
commit 892040972f
3 changed files with 4 additions and 4 deletions

View file

@ -172,7 +172,7 @@ class UserAuthenticationBackend(AuthenticationBackend):
request=request, request=request,
telemetry_type="api", telemetry_type="api",
api="create_user", api="create_user",
metadata={"user_id": str(user.uuid)}, metadata={"server_id": str(user.uuid)},
) )
logger.log(logging.INFO, f"🥳 New User Created: {user.uuid}") logger.log(logging.INFO, f"🥳 New User Created: {user.uuid}")
else: else:

View file

@ -90,7 +90,7 @@ async def login_magic_link(request: Request, form: MagicLinkForm):
request=request, request=request,
telemetry_type="api", telemetry_type="api",
api="create_user", api="create_user",
metadata={"user_id": str(user.uuid)}, metadata={"server_id": str(user.uuid)},
) )
logger.log(logging.INFO, f"🥳 New User Created: {user.uuid}") logger.log(logging.INFO, f"🥳 New User Created: {user.uuid}")
@ -175,7 +175,7 @@ async def auth(request: Request):
request=request, request=request,
telemetry_type="api", telemetry_type="api",
api="create_user", api="create_user",
metadata={"user_id": str(khoj_user.uuid)}, metadata={"server_id": str(khoj_user.uuid)},
) )
logger.log(logging.INFO, f"🥳 New User Created: {khoj_user.uuid}") logger.log(logging.INFO, f"🥳 New User Created: {khoj_user.uuid}")
return RedirectResponse(url=next_url, status_code=HTTP_302_FOUND) return RedirectResponse(url=next_url, status_code=HTTP_302_FOUND)

View file

@ -82,7 +82,7 @@ async def subscribe(request: Request):
request=request, request=request,
telemetry_type="api", telemetry_type="api",
api="create_user", api="create_user",
metadata={"user_id": str(user.user.uuid)}, metadata={"server_id": str(user.user.uuid)},
) )
logger.log(logging.INFO, f"🥳 New User Created: {user.user.uuid}") logger.log(logging.INFO, f"🥳 New User Created: {user.user.uuid}")