Skip to content

Fix trace polling todo - #4250

Open
Myself-Praveen wants to merge 1 commit into
jaegertracing:mainfrom
Myself-Praveen:fix-trace-polling-todo
Open

Fix trace polling todo#4250
Myself-Praveen wants to merge 1 commit into
jaegertracing:mainfrom
Myself-Praveen:fix-trace-polling-todo

Conversation

@Myself-Praveen

@Myself-Praveen Myself-Praveen commented Jul 22, 2026

Copy link
Copy Markdown

Which problem is this PR solving?

  • Resolves a hidden TODO left in packages/jaeger-ui/src/hooks/useTraceLoading.ts. Currently, staleTime: Infinity is used for caching traces, which is incorrect since Jaeger may return partial traces while spans are still arriving.

Description of the changes

  • Changed staleTime from Infinity to 60_000 (60 seconds).
  • Added meta.firstFetchedAt to stamp the query creation time.
  • Implemented a refetchInterval function that calculates the elapsed time since firstFetchedAt.
  • The hook now correctly polls for partial trace updates every 60 seconds for up to 5 minutes, gracefully falling back to false when the time window expires.

How was this change tested?

  • Verified that the trace data is cached correctly.
  • Confirmed that existing automated tests for useTraceLoading pass successfully locally.

Checklist

AI Usage in this PR (choose one)

See AI Usage Policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Copilot AI review requested due to automatic review settings July 22, 2026 19:17
@Myself-Praveen
Myself-Praveen requested a review from a team as a code owner July 22, 2026 19:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…ding)

Signed-off-by: Myself-Praveen <praveen104685@gmail.com>
@Myself-Praveen
Myself-Praveen force-pushed the fix-trace-polling-todo branch from 5a8d1c0 to 7df48a4 Compare July 22, 2026 19:32
Copilot AI review requested due to automatic review settings July 22, 2026 19:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants