feat(login): added support for otel push-based logs, metrics, and traces (#11429)

This commit is contained in:
Mridang Agarwalla
2026-03-04 15:58:56 +05:30
committed by GitHub
parent 685be24dfe
commit 3f3413a230
41 changed files with 4182 additions and 350 deletions
+5 -2
View File
@@ -1,5 +1,6 @@
"use server";
import { createLogger } from "@/lib/logger";
import {
createPasskeyRegistrationLink,
getLoginSettings,
@@ -27,6 +28,8 @@ import { updateOrCreateSession } from "./session";
import { completeFlowOrGetUrl } from "../client";
import { createSessionAndUpdateCookie } from "./cookie";
const logger = createLogger("passkeys");
type VerifyPasskeyCommand = {
passkeyId: string;
passkeyName?: string;
@@ -103,7 +106,7 @@ export async function registerPasskeyLink(
// check if a verification was done earlier
const hasValidUserVerificationCheck = await checkUserVerification(currentUserId);
console.log("hasValidUserVerificationCheck", hasValidUserVerificationCheck);
logger.info("hasValidUserVerificationCheck", { hasValidUserVerificationCheck });
if (!hasValidUserVerificationCheck) {
return { error: "User Verification Check has to be done" };
}
@@ -295,7 +298,7 @@ export async function sendPasskey(command: SendPasskeyCommand) {
try {
userResponse = await getUserByID({ serviceConfig, userId });
} catch (error) {
console.error("Error fetching user by ID:", error);
logger.error("Error fetching user by ID:", { error });
return { error: t("verify.errors.couldNotGetUser") };
}