Skip to content
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

Trace View: Update the queryType to traceql for checking if same trace when clicking span link #66645

Merged

Conversation

ericmustin
Copy link
Contributor

What is this feature?

This PR is a bug fix for the TraceView component. When clicking a trace span's "links", a split pane was always opening even if the span belonged to the same trace. The intended behavior is to only open a new pane if it's a different trace.

As far as i can tell from git history, this is a regression is part of the migration to the traceql tab from the traceid tab (see: #60180). This work enabled the traceql tab to also be used for individual trace lookup/viewing individual traces + the PR hid the traceid tab. Looks like a line was just missed for updating queryType from traceid to traceql as part of that work. Reviewing the tests it seems like this should just be traceql, but I've tried to introduce this gracefully (support both comparing a check for queryType traceql and traceid when deciding whether a new pane should be opened for a span link) in case any folks have already built custom monkeypatches assuming traceid.

We just picked this up on the upgrade to 9.4 and are already running this patch in production without issue, for context.

Why do we need this feature?

[Add a description of the problem the feature is trying to solve.]

Who is this feature for?

folks using opentelemetry span links or other similar styles of relationship between traces.

Which issue(s) does this PR fix?:

n/a, i can open an issue demonstrating the problem but this is pretty straightforward imo.

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@ericmustin ericmustin requested a review from a team as a code owner April 17, 2023 01:05
@grafanabot grafanabot added area/explore area/frontend pr/external This PR is from external contributor labels Apr 17, 2023
Copy link
Contributor

@adrapereira adrapereira left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution Eric, appreciate all the context you added to the PR!
Left a comment to simplify the change, since we don't need to support traceId anymore.

public/app/features/explore/TraceView/TraceView.tsx Outdated Show resolved Hide resolved
@adrapereira adrapereira added this to the 9.5.x milestone Apr 17, 2023
@adrapereira adrapereira added add to changelog backport v9.4.x Mark PR for automatic backport to v9.4.x labels Apr 17, 2023
@grafanabot
Copy link
Contributor

Hello @adrapereira!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

@adrapereira adrapereira changed the title TraceView: update the queryType to traceql for checking if same trace when clicking span link TraceView - update the queryType to traceql for checking if same trace when clicking span link Apr 17, 2023
@adrapereira adrapereira changed the title TraceView - update the queryType to traceql for checking if same trace when clicking span link Trace View: update the queryType to traceql for checking if same trace when clicking span link Apr 17, 2023
@adrapereira adrapereira changed the title Trace View: update the queryType to traceql for checking if same trace when clicking span link Trace View: Update the queryType to traceql for checking if same trace when clicking span link Apr 17, 2023
Copy link
Contributor

@adrapereira adrapereira left a comment

Choose a reason for hiding this comment

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

LGTM!

@adrapereira adrapereira merged commit 6462c81 into grafana:main Apr 17, 2023
@adrapereira adrapereira self-assigned this Apr 17, 2023
grafanabot pushed a commit that referenced this pull request Apr 17, 2023
…e when clicking span link (#66645)

* TraceView: update the queryType to traceql for checking if same trace when clicking span link

* TraceView: linting

* TraceView: remove traceid check completely

(cherry picked from commit 6462c81)
adela-almasan pushed a commit that referenced this pull request Apr 17, 2023
…e when clicking span link (#66645)

* TraceView: update the queryType to traceql for checking if same trace when clicking span link

* TraceView: linting

* TraceView: remove traceid check completely
adrapereira pushed a commit that referenced this pull request Apr 18, 2023
…same trace when clicking span link (#66670)

Trace View: Update the queryType to traceql for checking if same trace when clicking span link (#66645)

* TraceView: update the queryType to traceql for checking if same trace when clicking span link

* TraceView: linting

* TraceView: remove traceid check completely

(cherry picked from commit 6462c81)

Co-authored-by: Eric Mustin <mustin.eric@gmail.com>
@guicaulada guicaulada modified the milestones: 9.5.x, 9.5.0 Apr 24, 2023
@zerok zerok modified the milestones: 9.5.0, 10.0.0 May 3, 2023
@zerok zerok modified the milestones: 10.0.0, 10.0.0-preview May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/explore area/frontend backport v9.4.x Mark PR for automatic backport to v9.4.x pr/external This PR is from external contributor type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants