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
feat: updated the design for Messaging Queue - summary section (#6319)
SagarRajput-7c9fee276048a
diff --git a/frontend/public/locales/en/messagingQueuesKafkaOverview.json b/frontend/public/locales/en/messagingQueuesKafkaOverview.jsonindex 5061a5ddcb..de67d0b3e9 100644--- a/frontend/public/locales/en/messagingQueuesKafkaOverview.json+++ b/frontend/public/locales/en/messagingQueuesKafkaOverview.json@@ -1,30 +1,50 @@{- "breadcrumb": "Messaging Queues",- "header": "Kafka / Overview",- "overview": {- "title": "Start sending data in as little as 20 minutes",- "subtitle": "Connect and Monitor Your Data Streams"- },- "configureConsumer": {- "title": "Configure Consumer",- "description": "Add consumer data sources to gain insights and enhance monitoring.",- "button": "Get Started"- },- "configureProducer": {- "title": "Configure Producer",- "description": "Add producer data sources to gain insights and enhance monitoring.",- "button": "Get Started"- },- "monitorKafka": {- "title": "Monitor kafka",- "description": "Add your Kafka source to gain insights and enhance activity tracking.",- "button": "Get Started"- },- "summarySection": {- "viewDetailsButton": "View Details"- },- "confirmModal": {- "content": "Before navigating to the details page, please make sure you have configured all the required setup to ensure correct data monitoring.",- "okText": "Proceed"- }-}\ No newline at end of file+ "breadcrumb": "Messaging Queues",+ "header": "Kafka / Overview",+ "overview": {+ "title": "Start sending data in as little as 20 minutes",+ "subtitle": "Connect and Monitor Your Data Streams"+ },+ "configureConsumer": {+ "title": "Configure Consumer",+ "description": "Add consumer data sources to gain insights and enhance monitoring.",+ "button": "Get Started"+ },+ "configureProducer": {+ "title": "Configure Producer",+ "description": "Add producer data sources to gain insights and enhance monitoring.",+ "button": "Get Started"+ },+ "monitorKafka": {+ "title": "Monitor kafka",+ "description": "Add your Kafka source to gain insights and enhance activity tracking.",+ "button": "Get Started"+ },+ "summarySection": {+ "viewDetailsButton": "View Details",+ "consumer": {+ "title": "Consumer lag view",+ "description": "Connect and Monitor Your Data Streams"+ },+ "producer": {+ "title": "Producer latency view",+ "description": "Connect and Monitor Your Data Streams"+ },+ "partition": {+ "title": "Partition Latency view",+ "description": "Connect and Monitor Your Data Streams"+ },+ "dropRate": {+ "title": "Drop Rate view",+ "description": "Connect and Monitor Your Data Streams"+ }+ },+ "confirmModal": {+ "content": "Before navigating to the details page, please make sure you have configured all the required setup to ensure correct data monitoring.",+ "okText": "Proceed"+ },+ "overviewSummarySection": {+ "title": "Monitor Your Data Streams",+ "subtitle": "Monitor key Kafka metrics like consumer lag and latency to ensure efficient data flow and troubleshoot in real time."+ }+}diff --git a/frontend/src/constants/query.ts b/frontend/src/constants/query.tsindex 7d3cb2603d..56fbd737b5 100644--- a/frontend/src/constants/query.ts+++ b/frontend/src/constants/query.ts@@ -40,4 +40,5 @@ export enum QueryParams {configDetail = 'configDetail',getStartedSource = 'getStartedSource',getStartedSourceService = 'getStartedSourceService',+ mqServiceView = 'mqServiceView',}diff --git a/frontend/src/pages/MessagingQueues/MQDetailPage/MQDetailPage.tsx b/frontend/src/pages/MessagingQueues/MQDetailPage/MQDetailPage.tsxindex be8aec1da1..b87a5abc7a 100644--- a/frontend/src/pages/MessagingQueues/MQDetailPage/MQDetailPage.tsx+++ b/frontend/src/pages/MessagingQueues/MQDetailPage/MQDetailPage.tsx@@ -2,8 +2,10 @@ import '../MessagingQueues.styles.scss';import { Select, Typography } from 'antd';import logEvent from 'api/common/logEvent';+import { QueryParams } from 'constants/query';import ROUTES from 'constants/routes';import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';+import useUrlQuery from 'hooks/useUrlQuery';import { ListMinus } from 'lucide-react';import { useEffect, useState } from 'react';import { useHistory } from 'react-router-dom';@@ -32,10 +34,30 @@ function MQDetailPage(): JSX.Element {setproducerLatencyOption,] = useState<ProducerLatencyOptions>(ProducerLatencyOptions.Producers);+ const mqServiceView = useUrlQuery().get(+ QueryParams.mqServiceView,+ ) as MessagingQueuesViewTypeOptions;+useEffect(() => {logEvent('Messaging Queues: Detail page visited', {});}, []);+ useEffect(() => {+ if (mqServiceView) {+ setSelectedView(mqServiceView);+ }+ }, [mqServiceView]);++ const updateUrlQuery = (query: Record<string, string | number>): void => {+ const searchParams = new URLSearchParams(history.location.search);+ Object.keys(query).forEach((key) => {+ searchParams.set(key, query[key].toString());+ });+ history.push({+ search: searchParams.toString(),+ });+ };+return (<div className="messaging-queue-container"><div className="messaging-breadcrumb">@@ -54,7 +76,11 @@ function MQDetailPage(): JSX.Element {className="messaging-queue-options"defaultValue={MessagingQueuesViewType.consumerLag.value}popupClassName="messaging-queue-options-popup"- onChange={(value): void => setSelectedView(value)}+ onChange={(value): void => {+ setSelectedView(value);+ updateUrlQuery({ [QueryParams.mqServiceView]: value });+ }}+ value={mqServiceView}options={[{label: MessagingQueuesViewType.consumerLag.label,diff --git a/frontend/src/pages/MessagingQueues/MessagingQueues.styles.scss b/frontend/src/pages/MessagingQueues/MessagingQueues.styles.scssindex ef54e329e4..bcfd62c773 100644--- a/frontend/src/pages/MessagingQueues/MessagingQueues.styles.scss+++ b/frontend/src/pages/MessagingQueues/MessagingQueues.styles.scss@@ -227,6 +227,23 @@}}}++ &.summary-section {+ .overview-info-card {+ min-height: 144px;++ .card-title {+ color: var(--bg-vanilla-400);+ font-family: Inter;+ font-size: 13px;+ font-style: normal;+ font-weight: 500;+ line-height: 22px;+ letter-spacing: 0.52px;+ text-transform: uppercase;+ }+ }+ }}.summary-section {diff --git a/frontend/src/pages/MessagingQueues/MessagingQueues.tsx b/frontend/src/pages/MessagingQueues/MessagingQueues.tsxindex 0bd930363c..9e2c630bb0 100644--- a/frontend/src/pages/MessagingQueues/MessagingQueues.tsx+++ b/frontend/src/pages/MessagingQueues/MessagingQueues.tsx@@ -1,13 +1,13 @@+/* eslint-disable sonarjs/no-duplicate-string */import './MessagingQueues.styles.scss';-import { ExclamationCircleFilled } from '@ant-design/icons';-import { Color } from '@signozhq/design-tokens';-import { Button, Modal } from 'antd';+import { Button } from 'antd';import logEvent from 'api/common/logEvent';+import cx from 'classnames';import { QueryParams } from 'constants/query';import ROUTES from 'constants/routes';import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';-import { Calendar, ListMinus } from 'lucide-react';+import { ListMinus } from 'lucide-react';import { useEffect } from 'react';import { useTranslation } from 'react-i18next';import { useHistory } from 'react-router-dom';@@ -19,32 +19,20 @@ import {MessagingQueueHealthCheckService,MessagingQueuesViewType,} from './MessagingQueuesUtils';-import { ComingSoon } from './MQCommon/MQCommon';function MessagingQueues(): JSX.Element {const history = useHistory();const { t } = useTranslation('messagingQueuesKafkaOverview');- const { confirm } = Modal;-- const showConfirm = (): void => {+ const redirectToDetailsPage = (callerView?: string): void => {logEvent('Messaging Queues: View details clicked', {page: 'Messaging Queues Overview',- source: 'Consumer Latency view',+ source: callerView,});- confirm({- icon: <ExclamationCircleFilled />,- content: t('confirmModal.content'),- className: 'overview-confirm-modal',- onOk() {- logEvent('Messaging Queues: Proceed button clicked', {- page: 'Messaging Queues Overview',- });- history.push(ROUTES.MESSAGING_QUEUES_DETAIL);- },- okText: t('confirmModal.okText'),- });+ history.push(+ `${ROUTES.MESSAGING_QUEUES_DETAIL}?${QueryParams.mqServiceView}=${callerView}`,+ );};const isCloudUserVal = isCloudUser();@@ -146,55 +134,80 @@ function MessagingQueues(): JSX.Element {</div></div></div>- <div className="summary-section">- <div className="summary-card">- <div className="summary-title">- <p>{MessagingQueuesViewType.consumerLag.label}</p>- <div className="time-value">- <Calendar size={14} color={Color.BG_SLATE_200} />- <p className="time-value">1D</p>- </div>++ <p className="overview-text">{t('overviewSummarySection.title')}</p>+ <p className="overview-subtext">{t('overviewSummarySection.subtitle')}</p>+ <div className={cx('overview-doc-area', 'summary-section')}>+ <div className="overview-info-card">+ <div>+ <p className="card-title">{t('summarySection.consumer.title')}</p>+ <p className="card-info-text">+ {t('summarySection.consumer.description')}+ </p></div>- <div className="view-detail-btn">- <Button type="primary" onClick={showConfirm}>+ <div className="button-grp">+ <Button+ type="default"+ onClick={(): void =>+ redirectToDetailsPage(MessagingQueuesViewType.consumerLag.value)+ }+ >{t('summarySection.viewDetailsButton')}</Button></div></div>- <div className="summary-card coming-soon-card">- <div className="summary-title">- <p>{MessagingQueuesViewType.partitionLatency.label}</p>- <div className="time-value">- <Calendar size={14} color={Color.BG_SLATE_200} />- <p className="time-value">1D</p>- </div>+ <div className="overview-info-card middle-card">+ <div>+ <p className="card-title">{t('summarySection.producer.title')}</p>+ <p className="card-info-text">+ {t('summarySection.producer.description')}+ </p></div>- <div className="view-detail-btn">- <ComingSoon />+ <div className="button-grp">+ <Button+ type="default"+ onClick={(): void =>+ redirectToDetailsPage(MessagingQueuesViewType.producerLatency.value)+ }+ >+ {t('summarySection.viewDetailsButton')}+ </Button></div></div>- <div className="summary-card coming-soon-card">- <div className="summary-title">- <p>{MessagingQueuesViewType.producerLatency.label}</p>- <div className="time-value">- <Calendar size={14} color={Color.BG_SLATE_200} />- <p className="time-value">1D</p>- </div>+ <div className="overview-info-card middle-card">+ <div>+ <p className="card-title">{t('summarySection.partition.title')}</p>+ <p className="card-info-text">+ {t('summarySection.partition.description')}+ </p></div>- <div className="view-detail-btn">- <ComingSoon />+ <div className="button-grp">+ <Button+ type="default"+ onClick={(): void =>+ redirectToDetailsPage(MessagingQueuesViewType.partitionLatency.value)+ }+ >+ {t('summarySection.viewDetailsButton')}+ </Button></div></div>- <div className="summary-card coming-soon-card">- <div className="summary-title">- <p>{MessagingQueuesViewType.dropRate.label}</p>- <div className="time-value">- <Calendar size={14} color={Color.BG_SLATE_200} />- <p className="time-value">1D</p>- </div>+ <div className="overview-info-card">+ <div>+ <p className="card-title">{t('summarySection.dropRate.title')}</p>+ <p className="card-info-text">+ {t('summarySection.dropRate.description')}+ </p></div>- <div className="view-detail-btn">- <ComingSoon />+ <div className="button-grp">+ <Button+ type="default"+ onClick={(): void =>+ redirectToDetailsPage(MessagingQueuesViewType.dropRate.value)+ }+ >+ {t('summarySection.viewDetailsButton')}+ </Button></div></div></div>diff --git a/frontend/src/pages/MessagingQueues/MessagingQueuesUtils.ts b/frontend/src/pages/MessagingQueues/MessagingQueuesUtils.tsindex 0270258b33..024c2dfb1c 100644--- a/frontend/src/pages/MessagingQueues/MessagingQueuesUtils.ts+++ b/frontend/src/pages/MessagingQueues/MessagingQueuesUtils.ts@@ -239,7 +239,7 @@ export const MessagingQueuesViewType = {value: MessagingQueuesViewTypeOptions.ProducerLatency,},dropRate: {- label: 'Drop Rate',+ label: 'Drop Rate view',value: 'dropRate',},};