Skip to content

feat(trace-view): Add UI fallback to old view for STs #73684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

k-fish
Copy link
Member

@k-fish k-fish commented Jul 2, 2024

Summary

Singletenant (and on-prem etc.) may not be fully rolled out for span extraction. This means the new trace-view which is entirely span based won't work. This causes links to fallback to the old trace view if the organization is one without span-extraction rolled out, then proceeds to check the rollout date so we can offer the new experience where possible right away.

Aside

  • OrganizationSummary didn't need to be narrowed, so switched it out for the full Organization provided at the top level by useOrganization, can't see a reason why we wouldn't.

Singletenant (and on-prem etc.) may not be fully rolled out for span extraction. This means the new trace-view which is entirely span based won't work. This causes links to fallback to the old trace view if the organization is one without span-extraction rolled out, then proceeds to check the rollout date so we can offer the new experience where possible right away.
@k-fish k-fish requested a review from a team as a code owner July 2, 2024 20:12
@k-fish k-fish requested a review from Abdkhan14 July 2, 2024 20:12
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 2, 2024
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.11%. Comparing base (88d4ae4) to head (73ff278).
Report is 108 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #73684      +/-   ##
==========================================
+ Coverage   78.07%   78.11%   +0.04%     
==========================================
  Files        6649     6664      +15     
  Lines      297218   297762     +544     
  Branches    51148    51214      +66     
==========================================
+ Hits       232062   232610     +548     
- Misses      58839    58864      +25     
+ Partials     6317     6288      -29     
Files Coverage Δ
static/app/components/quickTrace/utils.tsx 21.05% <ø> (ø)
static/app/utils/discover/urls.tsx 82.14% <ø> (+7.14%) ⬆️
...tatic/app/views/performance/traceDetails/utils.tsx 35.84% <100.00%> (+18.07%) ⬆️
...s/performance/traceDetails/TraceDetailsRouting.tsx 31.81% <0.00%> (ø)
static/app/components/quickTrace/index.tsx 50.78% <0.00%> (ø)

... and 191 files with indirect coverage changes

@@ -48,7 +48,8 @@ export interface Organization extends OrganizationSummary {
allowJoinRequests: boolean;
allowSharedIssues: boolean;
attachmentsRole: string;
availableRoles: {id: string; name: string}[]; // Deprecated, use orgRoleList
availableRoles: {id: string; name: string}[];
// Deprecated, use orgRoleList
Copy link
Member

Choose a reason for hiding this comment

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

The new line break here makes the comment's location misleading IMO.

Copy link
Member Author

Choose a reason for hiding this comment

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

Deprecated should actually be annotated, which makes it show up in editors and also moves with the key properly, going to change it to that instead.

Screenshot 2024-07-04 at 2 58 08 PM

Screenshot 2024-07-04 at 2 58 13 PM

) {
const usableTimestamp = getTimeStampFromTableDateField(timestamp);
if (!usableTimestamp) {
// Timestamps must always be provided for the new view, if it doesn't exist, fall back to the old view.
Copy link
Contributor

Choose a reason for hiding this comment

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

@k-fish , it just helps make the query faster. The traceview still loads without it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I realize it works on the api but the frontend it should be mandatory no? it significantly improves trace performance, I had assumed all callsites were sending it where appropriate for the new view.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah we do it from all callsites. However, even without it the new traceview should load faster than the old traceview I believe. But yeah, just wanted to point it out in case you thought that the new view wouldn't work at all without timestamp.

@k-fish
Copy link
Member Author

k-fish commented Jul 4, 2024

@Abdkhan14 are there any other call sites / a better way instead of a redirect to do this?

@Abdkhan14
Copy link
Contributor

@Abdkhan14 are there any other call sites / a better way instead of a redirect to do this?

@k-fish, you've covered all entry points. We need the traceSlug from the fetched event so re-routing seems to be a straightforward solution here.

@k-fish k-fish merged commit 5f49eed into master Jul 15, 2024
43 checks passed
@k-fish k-fish deleted the feat/trace-view/flip-trace-views-depending-on-options branch July 15, 2024 16:28
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants