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.

fix: offset added hinders the timestamps for the traces (#4642)

Vikrant Guptafdd7e022e96e
diff --git a/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts b/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts
index 56a6f1e333..7dfbbe9b47 100644
--- a/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts
+++ b/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts
@@ -18,8 +18,9 @@ function onClickPlugin(opts: OnClickPluginOpts): uPlot.Plugin {
const mouseY = event.offsetY + 40;
// Convert pixel positions to data values
- const xValue = u.posToVal(mouseX, 'x');
- const yValue = u.posToVal(mouseY, 'y');
+ // do not use mouseX and mouseY here as it offsets the timestamp as well
+ const xValue = u.posToVal(event.offsetX, 'x');
+ const yValue = u.posToVal(event.offsetY, 'y');
opts.onClick(xValue, yValue, mouseX, mouseY);
};