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

Update custom traces table with filters #2178

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

ps48
Copy link
Member

@ps48 ps48 commented Sep 20, 2024

Description

  • The issue with original custom source table was that it says traces on top but shows data only from trace root spans. This is a problem cause it breaks users expectation of filtering traces across various fields like services and resource attributes.

Sorting and Pagination push down won’t be part of this PR.

Update custom traces table with filters added below:

  • All Spans - All spans from all traces
  • Traces - Aggregates all spans by traceId to show all traces
  • Service Entry Spans - The spans that mark start of server-side processing (SPAN_KIND_SERVER)
  • Trace Root Spans - The root spans which represent the starting point of a trace

Functional updates:

  • The trace table in custom source defaults to all spans
  • The trace table mode is stored in session storage, to persist across tab refreshes and page changes

Issues Resolved

  • Default table view
    Screenshot 2024-09-20 at 9 26 28 AM

  • Table filter options
    Screenshot 2024-09-20 at 9 26 38 AM

  • Table showing trace root spans
    Screenshot 2024-09-20 at 9 26 50 AM

  • Table showing attributes
    Screenshot 2024-09-20 at 9 27 00 AM

Demo Video

traces-table-filter.mov

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.

@ps48 ps48 added bug Something isn't working backport 2.x labels Sep 20, 2024
},
];

export const TRACE_TABLE_TYPE_KEY = 'TraceAnalyticsTraceTableType';
Copy link
Member

Choose a reason for hiding this comment

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

ideally the constants are in common only if they are shared between client (public) and server. if they are only used on one side they can go directly there

Copy link
Member Author

@ps48 ps48 Sep 20, 2024

Choose a reason for hiding this comment

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

That makes sense. Will keep this one here for now. Will sort out this and others in common/constants during a mini refactor.

public/components/trace_analytics/index.scss Show resolved Hide resolved
Copy link
Collaborator

@RyanL1997 RyanL1997 left a comment

Choose a reason for hiding this comment

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

In generally LGTM!

props.tracesTableMode,
getTraceViewUri,
openTraceFlyout,
items,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit:

React Hook useMemo has an unnecessary dependency: 'items'. Either exclude it or remove the dependency array    

Signed-off-by: Shenoy Pratik <[email protected]>
@ps48 ps48 merged commit 00fd9ac into opensearch-project:main Sep 23, 2024
9 of 18 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 23, 2024
* update custom traces table with filters

Signed-off-by: Shenoy Pratik <[email protected]>

* use css truncate, resolve comments

Signed-off-by: Shenoy Pratik <[email protected]>

* add guards for execution_hint

Signed-off-by: Shenoy Pratik <[email protected]>

* update descriptions

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 00fd9ac)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ps48 pushed a commit that referenced this pull request Sep 23, 2024
* update custom traces table with filters



* use css truncate, resolve comments



* add guards for execution_hint



* update descriptions



---------


(cherry picked from commit 00fd9ac)

Signed-off-by: Shenoy Pratik <[email protected]>
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>
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.

4 participants