Skip to content

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.

Add null check in GenericVisualization

Himanshu DIxit52b7d38df89b
diff --git a/frontend/src/components/DateTimeSelector.tsx b/frontend/src/components/DateTimeSelector.tsx
index 8de95ddf5d..b5deac900b 100644
--- a/frontend/src/components/DateTimeSelector.tsx
+++ b/frontend/src/components/DateTimeSelector.tsx
@@ -18,6 +18,7 @@ const { Option } = Select;
const DateTimeWrapper = styled.div`
margin-top: 20px;
+ justify-content: flex-end !important;
`;
interface DateTimeSelectorProps extends RouteComponentProps<any> {
diff --git a/frontend/src/components/metrics/GenericVisualization.tsx b/frontend/src/components/metrics/GenericVisualization.tsx
index 86a0350f92..28a83b46d1 100644
--- a/frontend/src/components/metrics/GenericVisualization.tsx
+++ b/frontend/src/components/metrics/GenericVisualization.tsx
@@ -15,10 +15,10 @@ interface GenericVisualizationsProps {
const GenericVisualizations = (props: GenericVisualizationsProps) => {
const data = {
- labels: props.data !== undefined && props.data.map((s) => new Date(s.timestamp / 1000000)),
+ labels: (props.data !== undefined && props.data !== null) && props.data.map((s) => new Date(s.timestamp / 1000000)),
datasets: [
{
- data: props.data.map((s) => s.value),
+ data: (props.data !== undefined && props.data !== null) && props.data.map((s) => s.value),
borderColor: "rgba(250,174,50,1)", // for line chart
backgroundColor: props.chartType === "bar" ? "rgba(250,174,50,1)" : "", // for bar chart, don't assign backgroundcolor if its not a bar chart, may be relevant for area graph though
},
diff --git a/frontend/src/components/traces/TraceFilter.tsx b/frontend/src/components/traces/TraceFilter.tsx
index f2eb9d1fbc..154a90bf8d 100644
--- a/frontend/src/components/traces/TraceFilter.tsx
+++ b/frontend/src/components/traces/TraceFilter.tsx
@@ -47,7 +47,6 @@ const _TraceFilter = (props: TraceFilterProps) => {
const urlParams = new URLSearchParams(location.search.split("?")[1]);
useEffect(()=>{
- console.log("Mera")
handleApplyFilterForm({
service: "",
tags: [],