SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
Chore/user email log event (#9655)
Vishal Sharmae5b99703ac92
diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsxindex 77052d9bfe..754646e6a5 100644--- a/frontend/src/AppRoutes/index.tsx+++ b/frontend/src/AppRoutes/index.tsx@@ -84,9 +84,9 @@ function App(): JSX.Element {email,name: displayName,company_name: orgName,- tenant_id: hostNameParts[0],+ deployment_name: hostNameParts[0],data_region: hostNameParts[1],- tenant_url: hostname,+ deployment_url: hostname,company_domain: domain,source: 'signoz-ui',role,@@ -94,9 +94,9 @@ function App(): JSX.Element {const groupTraits = {name: orgName,- tenant_id: hostNameParts[0],+ deployment_name: hostNameParts[0],data_region: hostNameParts[1],- tenant_url: hostname,+ deployment_url: hostname,company_domain: domain,source: 'signoz-ui',};@@ -111,12 +111,10 @@ function App(): JSX.Element {if (window && window.Appcues) {window.Appcues.identify(id, {name: displayName,-- tenant_id: hostNameParts[0],+ deployment_name: hostNameParts[0],data_region: hostNameParts[1],- tenant_url: hostname,+ deployment_url: hostname,company_domain: domain,-companyName: orgName,email,paidUser: !!trialInfo?.trialConvertedToSubscription,@@ -139,9 +137,9 @@ function App(): JSX.Element {email,name: displayName,orgName,- tenant_id: hostNameParts[0],+ deployment_name: hostNameParts[0],data_region: hostNameParts[1],- tenant_url: hostname,+ deployment_url: hostname,company_domain: domain,source: 'signoz-ui',isPaidUser: !!trialInfo?.trialConvertedToSubscription,@@ -149,9 +147,9 @@ function App(): JSX.Element {posthog?.group('company', orgId, {name: orgName,- tenant_id: hostNameParts[0],+ deployment_name: hostNameParts[0],data_region: hostNameParts[1],- tenant_url: hostname,+ deployment_url: hostname,company_domain: domain,source: 'signoz-ui',isPaidUser: !!trialInfo?.trialConvertedToSubscription,diff --git a/frontend/src/api/common/logEvent.ts b/frontend/src/api/common/logEvent.tsindex e4460ddf1f..b1d0994d34 100644--- a/frontend/src/api/common/logEvent.ts+++ b/frontend/src/api/common/logEvent.ts@@ -1,6 +1,8 @@import { LogEventAxiosInstance as axios } from 'api';+import getLocalStorageApi from 'api/browser/localstorage/get';import { ErrorResponseHandler } from 'api/ErrorResponseHandler';import { AxiosError } from 'axios';+import { LOCALSTORAGE } from 'constants/localStorage';import { ErrorResponse, SuccessResponse } from 'types/api';import { EventSuccessPayloadProps } from 'types/api/events/types';@@ -11,9 +13,14 @@ const logEvent = async (rateLimited?: boolean,): Promise<SuccessResponse<EventSuccessPayloadProps> | ErrorResponse> => {try {- // add tenant_url to attributes+ // add deployment_url and user_email to attributesconst { hostname } = window.location;- const updatedAttributes = { ...attributes, tenant_url: hostname };+ const userEmail = getLocalStorageApi(LOCALSTORAGE.LOGGED_IN_USER_EMAIL);+ const updatedAttributes = {+ ...attributes,+ deployment_url: hostname,+ user_email: userEmail,+ };const response = await axios.post('/event', {eventName,attributes: updatedAttributes,diff --git a/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx b/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsxindex 7d2be2066d..dbe60b1ace 100644--- a/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx+++ b/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx@@ -471,11 +471,13 @@ function LogsFormatOptionsMenu({rootClassName="format-options-popover"destroyTooltipOnHide>- <Button- className="periscope-btn ghost"- icon={<Sliders size={14} />}- data-testid="periscope-btn-format-options"- />+ <Tooltip title="Options">+ <Button+ className="periscope-btn ghost"+ icon={<Sliders size={14} />}+ data-testid="periscope-btn-format-options"+ />+ </Tooltip></Popover>);}diff --git a/frontend/src/container/CloudIntegrationPage/__tests__/RequestIntegration.test.tsx b/frontend/src/container/CloudIntegrationPage/__tests__/RequestIntegration.test.tsxindex ff34af3f8f..d61191e48f 100644--- a/frontend/src/container/CloudIntegrationPage/__tests__/RequestIntegration.test.tsx+++ b/frontend/src/container/CloudIntegrationPage/__tests__/RequestIntegration.test.tsx@@ -57,7 +57,8 @@ describe('Request AWS integration', () => {expect(capturedPayload.attributes).toEqual({screen: 'AWS integration details',integration: 's3 sync',- tenant_url: 'localhost',+ deployment_url: 'localhost',+ user_email: null,});});});diff --git a/frontend/src/container/Login/index.tsx b/frontend/src/container/Login/index.tsxindex ddcece8c5a..509f034a66 100644--- a/frontend/src/container/Login/index.tsx+++ b/frontend/src/container/Login/index.tsx@@ -274,6 +274,7 @@ function Login(): JSX.Element {autoFocusdisabled={versionLoading}className="login-form-input"+ onPressEnter={onNextHandler}/></FormContainer.Item></ParentContainer>diff --git a/frontend/src/providers/App/App.tsx b/frontend/src/providers/App/App.tsxindex e517b4902a..f88272799f 100644--- a/frontend/src/providers/App/App.tsx+++ b/frontend/src/providers/App/App.tsx@@ -1,4 +1,5 @@import getLocalStorageApi from 'api/browser/localstorage/get';+import setLocalStorageApi from 'api/browser/localstorage/set';import listOrgPreferences from 'api/v1/org/preferences/list';import get from 'api/v1/user/me/get';import listUserPreferences from 'api/v1/user/preferences/list';@@ -77,6 +78,7 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {useEffect(() => {if (!isFetchingUser && userData && userData.data) {+ setLocalStorageApi(LOCALSTORAGE.LOGGED_IN_USER_EMAIL, userData.data.email);setUser((prev) => ({...prev,...userData.data,