Skip to content

Commit

Permalink
Replace user_id with server_id in telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
sabaimran committed Oct 22, 2024
1 parent db959a5 commit 8920409
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/khoj/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async def authenticate(self, request: HTTPConnection):
request=request,
telemetry_type="api",
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}")
else:
Expand Down
4 changes: 2 additions & 2 deletions src/khoj/routers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def login_magic_link(request: Request, form: MagicLinkForm):
request=request,
telemetry_type="api",
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}")

Expand Down Expand Up @@ -175,7 +175,7 @@ async def auth(request: Request):
request=request,
telemetry_type="api",
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}")
return RedirectResponse(url=next_url, status_code=HTTP_302_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion src/khoj/routers/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def subscribe(request: Request):
request=request,
telemetry_type="api",
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}")

Expand Down

0 comments on commit 8920409

Please sign in to comment.