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 Groups Optimization - Remove duplicate filters #2368

Merged
merged 6 commits into from
Mar 4, 2025

Conversation

TackAdam
Copy link
Collaborator

@TackAdam TackAdam commented Feb 28, 2025

Description

  1. TraceGroups was unnecessarily triggering a re-query of the main table when opened. This was due to the use-effect inside dashboard_content setting the lock for valid filters. Upon investigating this call seemed to be a repeat and unnecessary as it is already handled in:
    https://github.com/opensearch-project/dashboards-observability/blob/main/public/components/trace_analytics/components/common/filters/filters.tsx#L79
    and by the trace content page itself.

Removing these unnecessary filter settings led the queries to stop firing unnecessarily when opening the trace group panel.

  1. Fix a bug where a trace group filter being applied was not refreshing the trace group table due to the re-direction flag being set.

Before (7 Queries (2 unnecessary))

Before

After (5 Queries)
AfterRemoving

Filter behavior before:

BeforeFilter.mov

After (unchanged with code removal):

AfterFilterStillWorking.mov
  1. Before (filter not applied):
Before.mov

After (filter applied):

After.mov

Issues Resolved

#2334 - Trace Group Optimizations

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Adam Tackett <tackadam@amazon.com>
@TackAdam TackAdam added bug Something isn't working backport 2.x labels Feb 28, 2025
@TackAdam TackAdam marked this pull request as ready for review February 28, 2025 21:41
@TackAdam TackAdam changed the title TraceGroup Optimization - Remove duplicate filters Trace Groups Optimization - Remove duplicate filters Feb 28, 2025
Adam Tackett and others added 3 commits February 28, 2025 15:05
…board content

Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
@ps48
Copy link
Member

ps48 commented Mar 4, 2025

Just one issue when we click on number of traces from the traceGroup table, filter doesn't pushed down to tracegroup table Only the traces table is updated. Not sure if this is an existing bug.

Also, opening the tracegroup table reloads the trace table. This is the call that we wanted to remove I believe

Signed-off-by: Adam Tackett <tackadam@amazon.com>
@TackAdam
Copy link
Collaborator Author

TackAdam commented Mar 4, 2025

Just one issue when we click on number of traces from the traceGroup table, filter doesn't pushed down to tracegroup table Only the traces table is updated. Not sure if this is an existing bug.

Also, opening the tracegroup table reloads the trace table. This is the call that we wanted to remove I believe

TraceGroup not triggering the re-load confirmed offline and in attached videos.

Number of traces not filtering when clicked was an existing but that I just added a fix for

if (!['app', 'traces'].includes(props.page)) {

Dashboards was previously a seperate page so the re-direction flag was causing it to not refresh.

@TackAdam TackAdam merged commit b84c5db into opensearch-project:main Mar 4, 2025
18 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 4, 2025
* trace group opt, remove duplicate filter calls

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* add back validation for traces and services, keep it removed for dashboard content

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* remove spacing

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* fix bug for filter applied from trace group

Signed-off-by: Adam Tackett <tackadam@amazon.com>

---------

Signed-off-by: Adam Tackett <tackadam@amazon.com>
Co-authored-by: Adam Tackett <tackadam@amazon.com>
(cherry picked from commit b84c5db)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
TackAdam pushed a commit that referenced this pull request Mar 5, 2025
* trace group opt, remove duplicate filter calls



* add back validation for traces and services, keep it removed for dashboard content



* remove spacing



* fix bug for filter applied from trace group



---------



(cherry picked from commit b84c5db)

Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adam Tackett <tackadam@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants