Skip to content

MDS Support for trace analytics #1752

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 9 commits into from
May 1, 2024

Conversation

sumukhswamy
Copy link
Collaborator

@sumukhswamy sumukhswamy commented Apr 29, 2024

Description

Added MDS Support for trace analytics

Issues Resolved

#1440 [FEATURE] Support Multiple Data Source in Observability Dashboards Plugin

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.

@@ -173,6 +171,7 @@ export function DashboardContent(props: DashboardProps) {
// setToast!('Query took too long to execute.', 'danger', 'Reduce time range or filter your data. If issue persists, consider increasing your cluster size.');
// }
// },
dataSourceMDSId[0].id,
Copy link

Choose a reason for hiding this comment

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

are we certain dataSourceMDSId is non empty array?

DSL,
setFields,
mode,
props.dataSourceMDSId[0].id
Copy link

Choose a reason for hiding this comment

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

do we check if the array is not empty?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

have initialized it to [{id:'',label:''}]

fullWidth: true,
}}
/>
)}
Copy link
Member

Choose a reason for hiding this comment

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

there was a DataSourceMenu in home.tsx, why is it needed again here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there are two menus one is readonly and one is a selector

@YANG-DB
Copy link
Member

YANG-DB commented Apr 29, 2024

Hi @sumukhswamy
can you please explain in more details the overall change you've introduced here

  • flow changes
  • query updates
  • UX changes
    Thanks

Comment on lines +27 to +29
dataSourceMDSId?: string,
setServiceMap?: any,
serviceNameFilter?: string,
serviceNameFilter?: string

Choose a reason for hiding this comment

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

One suggestion is making those optional parameters an object attribute like:

export const handleServicesRequest = async (
  http: HttpSetup,
  DSL: any,
  setItems: any,
  mode: TraceAnalyticsMode,
  options?: ServicesRequestOptions)

Then we don't need to specify all the parameters from caller, and it would become more clear which parameter is specified. (generally, having more than 4 parameter is not recommended for readability/maintainability especially the same type parameters)

@sumukhswamy
Copy link
Collaborator Author

Screen.Recording.2024-04-29.at.4.16.37.PM.mov

Signed-off-by: sumukhswamy <[email protected]>
@sumukhswamy sumukhswamy added the enhancement New feature or request label Apr 30, 2024
Signed-off-by: sumukhswamy <[email protected]>
@sumukhswamy sumukhswamy merged commit da7d54e into opensearch-project:main May 1, 2024
8 of 19 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-observability/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.x
# Create a new branch
git switch --create backport/backport-1752-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 da7d54e6d01bc46ae16db071bfa472b5f828afaa
# Push it to GitHub
git push --set-upstream origin backport/backport-1752-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1752-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.14 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-observability/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.14
# Create a new branch
git switch --create backport/backport-1752-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 da7d54e6d01bc46ae16db071bfa472b5f828afaa
# Push it to GitHub
git push --set-upstream origin backport/backport-1752-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.14

Then, create a pull request where the base branch is 2.14 and the compare/head branch is backport/backport-1752-to-2.14.

sumukhswamy added a commit to sumukhswamy/dashboards-observability that referenced this pull request May 1, 2024
* added changes for datasourcemds- ids

Signed-off-by: sumukhswamy <[email protected]>

* added trace analytics support for MDS

Signed-off-by: sumukhswamy <[email protected]>

* added trace analytics support for MDS

Signed-off-by: sumukhswamy <[email protected]>

* added changes

Signed-off-by: sumukhswamy <[email protected]>

* addressed PR comments

Signed-off-by: sumukhswamy <[email protected]>

* addressed linter issues

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Sumukh Swamy <[email protected]>
sumukhswamy added a commit to sumukhswamy/dashboards-observability that referenced this pull request May 1, 2024
* added changes for datasourcemds- ids

Signed-off-by: sumukhswamy <[email protected]>

* added trace analytics support for MDS

Signed-off-by: sumukhswamy <[email protected]>

* added trace analytics support for MDS

Signed-off-by: sumukhswamy <[email protected]>

* added changes

Signed-off-by: sumukhswamy <[email protected]>

* addressed PR comments

Signed-off-by: sumukhswamy <[email protected]>

* addressed linter issues

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Sumukh Swamy <[email protected]>
sumukhswamy added a commit to sumukhswamy/dashboards-observability that referenced this pull request May 1, 2024
* added changes for datasourcemds- ids

Signed-off-by: sumukhswamy <[email protected]>

* added trace analytics support for MDS

Signed-off-by: sumukhswamy <[email protected]>

* added trace analytics support for MDS

Signed-off-by: sumukhswamy <[email protected]>

* added changes

Signed-off-by: sumukhswamy <[email protected]>

* addressed PR comments

Signed-off-by: sumukhswamy <[email protected]>

* addressed linter issues

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Sumukh Swamy <[email protected]>
sumukhswamy added a commit that referenced this pull request May 1, 2024
* added changes for datasourcemds- ids



* added trace analytics support for MDS



* added trace analytics support for MDS



* added changes



* addressed PR comments



* addressed linter issues



---------

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Sumukh Swamy <[email protected]>
sumukhswamy added a commit that referenced this pull request May 1, 2024
* added changes for datasourcemds- ids



* added trace analytics support for MDS



* added trace analytics support for MDS



* added changes



* addressed PR comments



* addressed linter issues



---------

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Sumukh Swamy <[email protected]>
sumukhswamy added a commit that referenced this pull request May 1, 2024
sumukhswamy added a commit that referenced this pull request May 1, 2024
sumukhswamy added a commit that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants