diff --git a/.cspell.json b/.cspell.json index 0fce5ba238d..a553f692980 100644 --- a/.cspell.json +++ b/.cspell.json @@ -786,7 +786,10 @@ "checkpointer", "langchain", "langgraph", - "Vitest" + "Vitest", + "signoz", + "sanitised", + "serialises" ], "flagWords": [], "patterns": [ diff --git a/apps/api/package.json b/apps/api/package.json index 4ba721d8a8b..7c4a6fef49b 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -99,7 +99,7 @@ "json-schema-faker": "^0.5.6", "json-schema-to-ts": "^3.0.0", "jsonwebtoken": "9.0.3", - "liquidjs": "^10.20.0", + "liquidjs": "^10.25.0", "lodash": "^4.17.15", "lru-cache": "^11.2.4", "nanoid": "^3.1.20", diff --git a/apps/api/src/config/env.validators.ts b/apps/api/src/config/env.validators.ts index f8221f191da..7304a2610ef 100644 --- a/apps/api/src/config/env.validators.ts +++ b/apps/api/src/config/env.validators.ts @@ -54,6 +54,8 @@ export const envValidators = { WORKER_DEFAULT_CONCURRENCY: num({ default: undefined }), WORKER_DEFAULT_LOCK_DURATION: num({ default: undefined }), ENABLE_OTEL: bool({ default: false }), + ENABLE_OTEL_LOGS: bool({ default: false }), + OTEL_PROMETHEUS_PORT: num({ default: 9464 }), NOTIFICATION_RETENTION_DAYS: num({ default: DEFAULT_NOTIFICATION_RETENTION_DAYS }), API_ROOT_URL: url(), NOVU_INVITE_TEAM_MEMBER_NUDGE_TRIGGER_IDENTIFIER: str({ default: undefined }), diff --git a/apps/api/src/instrument.ts b/apps/api/src/instrument.ts index a486693b9a3..9907b606ad9 100644 --- a/apps/api/src/instrument.ts +++ b/apps/api/src/instrument.ts @@ -1,9 +1,21 @@ import './config/env.config'; +// Import from the tracing subpath, NOT the main barrel. The barrel loads +// @novu/application-generic which transitively pulls in pino/mongoose/ioredis. +// TypeScript hoists all imports — if pino loads before startOtel() registers +// instrumentations, PinoInstrumentation cannot patch the already-bound references. +// Importing only otel-init keeps those modules out of require.cache until after +// the SDK's require()-hooks are in place. +import { startOtel } from '@novu/application-generic/build/main/tracing/otel-init'; +import { name, version } from '../package.json'; + +startOtel(name, version); + +// biome-ignore lint: must execute after startOtel() so New Relic layers on top require('newrelic'); -import { init } from '@sentry/nestjs'; -import { version } from '../package.json'; +// biome-ignore lint: lazy require so @sentry/nestjs loads after OTEL instrumentations are installed +const { init } = require('@sentry/nestjs'); if (process.env.SENTRY_DSN) { init({ diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 0e75488215a..a285b6691e3 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -109,7 +109,7 @@ "json-schema": "^0.4.0", "json5": "^2.2.3", "launchdarkly-react-client-sdk": "^3.9.0", - "liquidjs": "^10.20.0", + "liquidjs": "^10.25.0", "lodash.debounce": "^4.0.8", "lodash.isequal": "^4.5.0", "lodash.merge": "^4.6.2", diff --git a/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx b/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx index 1e0241ba384..b7f83466676 100644 --- a/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx +++ b/apps/dashboard/src/components/workflow-editor/add-step-menu.tsx @@ -1,8 +1,6 @@ -import { FeatureFlagsKeysEnum } from '@novu/shared'; import { PopoverPortal } from '@radix-ui/react-popover'; import React, { ReactNode, useState } from 'react'; import { RiAddLine } from 'react-icons/ri'; -import { useFeatureFlag } from '@/hooks/use-feature-flag'; import { STEP_TYPE_TO_COLOR } from '@/utils/color'; import { StepTypeEnum } from '@/utils/enums'; import { cn } from '@/utils/ui'; @@ -82,8 +80,6 @@ export const AddStepMenu = ({ onMenuItemClick: (stepType: StepTypeEnum) => void; }) => { const [isPopoverOpen, setIsPopoverOpen] = useState(false); - const isThrottleStepEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_THROTTLE_STEP_ENABLED); - const handleMenuItemClick = (stepType: StepTypeEnum) => { onMenuItemClick(stepType); setIsPopoverOpen(false); @@ -148,11 +144,9 @@ export const AddStepMenu = ({ handleMenuItemClick(StepTypeEnum.DIGEST)}> Digest - {isThrottleStepEnabled && ( - handleMenuItemClick(StepTypeEnum.THROTTLE)}> - Throttle - - )} + handleMenuItemClick(StepTypeEnum.THROTTLE)}> + Throttle + diff --git a/apps/dashboard/src/utils/better-auth/components/sign-in.tsx b/apps/dashboard/src/utils/better-auth/components/sign-in.tsx index b015a8c37cb..8c63aa6c47b 100644 --- a/apps/dashboard/src/utils/better-auth/components/sign-in.tsx +++ b/apps/dashboard/src/utils/better-auth/components/sign-in.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useId, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { Button } from '@/components/primitives/button'; import { Input } from '@/components/primitives/input'; @@ -8,6 +8,8 @@ import { authClient } from '../client'; export function SignIn() { const navigate = useNavigate(); + const emailId = useId(); + const passwordId = useId(); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(null); @@ -82,12 +84,12 @@ export function SignIn() {

Sign In

-
-