mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 23:29:01 +08:00
fix: adjust the buffer time for start and end time in trace to logs (#6953)
This commit is contained in:
parent
35c61045c4
commit
8cb8beb63f
@ -19,6 +19,8 @@ import Events from './Events';
|
||||
import { CardContainer, CustomSubText, styles } from './styles';
|
||||
import Tags from './Tags';
|
||||
|
||||
const FIVE_MINUTES_IN_MS = 5 * 60 * 1000;
|
||||
|
||||
function SelectedSpanDetails(props: SelectedSpanDetailsProps): JSX.Element {
|
||||
const { maxTime, minTime } = useSelector<AppState, GlobalReducer>(
|
||||
(state) => state.globalTime,
|
||||
@ -86,10 +88,10 @@ function SelectedSpanDetails(props: SelectedSpanDetailsProps): JSX.Element {
|
||||
history.push(
|
||||
`${ROUTES.LOGS_EXPLORER}?${createQueryParams({
|
||||
[QueryParams.compositeQuery]: JSON.stringify(query),
|
||||
// we subtract 1000 milliseconds from the start time to handle the cases when the trace duration is in nanoseconds
|
||||
[QueryParams.startTime]: traceStartTime - 1000,
|
||||
// we add 1000 milliseconds to the end time for nano second duration traces
|
||||
[QueryParams.endTime]: traceEndTime + 1000,
|
||||
// we subtract 5 minutes from the start time to handle the cases when the trace duration is in nanoseconds
|
||||
[QueryParams.startTime]: traceStartTime - FIVE_MINUTES_IN_MS,
|
||||
// we add 5 minutes to the end time for nano second duration traces
|
||||
[QueryParams.endTime]: traceEndTime + FIVE_MINUTES_IN_MS,
|
||||
})}`,
|
||||
);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user