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
import { Typography } from '@signozhq/ui/typography';
import logEvent from 'api/common/logEvent';
import ROUTES from 'constants/routes';
import { useGetTenantLicense } from 'hooks/useGetTenantLicense';
import { navigate } from 'lib/router/navigation';
import { ArrowUpRight } from '@signozhq/icons';
import { DataSource } from 'types/common/queryBuilder';
import DOCLINKS from 'utils/docLinks';
import { openInNewTab } from 'utils/navigation';
import eyesEmojiUrl from '@/assets/Images/eyesEmoji.svg';
import './NoLogs.styles.scss';
export default function NoLogs({
dataSource,
}: {
dataSource: DataSource;
}): JSX.Element {
const { isCloudUser: isCloudUserVal } = useGetTenantLicense();
const handleLinkClick = (
e: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
): void => {
e.preventDefault();
e.stopPropagation();
if (isCloudUserVal) {
if (dataSource === DataSource.TRACES) {
logEvent('Traces Explorer: Navigate to onboarding', {});
} else if (dataSource === DataSource.LOGS) {
logEvent('Logs Explorer: Navigate to onboarding', {});
} else if (dataSource === DataSource.METRICS) {
logEvent('Metrics Explorer: Navigate to onboarding', {});
}
navigate(ROUTES.GET_STARTED_WITH_CLOUD);
} else if (dataSource === 'traces') {
openInNewTab(DOCLINKS.TRACES_EXPLORER_EMPTY_STATE);
} else if (dataSource === DataSource.METRICS) {
openInNewTab(DOCLINKS.METRICS_EXPLORER_EMPTY_STATE);
} else {
openInNewTab(`${DOCLINKS.USER_GUIDE}${dataSource}/`);
}
};
return (
<div className="no-logs-container">
<div className="no-logs-container-content">
<img className="eyes-emoji" src={eyesEmojiUrl} alt="eyes emoji" />
<Typography className="no-logs-text">
No {dataSource} yet.
<span className="sub-text">
{' '}
When we receive {dataSource}, they would show up here
</span>
</Typography>
<Typography.Link className="send-logs-link" onClick={handleLinkClick}>
Sending {dataSource} to SigNoz <ArrowUpRight size={16} />
</Typography.Link>
</div>
</div>
);
}