fix: timerange selected for traces to logs (#6634)

This commit is contained in:
Vikrant Gupta 2024-12-16 22:35:25 +05:30 committed by GitHub
parent 2701ae5c34
commit 8608f02263
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,8 +86,10 @@ function SelectedSpanDetails(props: SelectedSpanDetailsProps): JSX.Element {
history.push(
`${ROUTES.LOGS_EXPLORER}?${createQueryParams({
[QueryParams.compositeQuery]: JSON.stringify(query),
[QueryParams.startTime]: minTime,
[QueryParams.endTime]: maxTime,
// 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,
})}`,
);
};