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

Remove redundant traces call for related services #2315

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

ps48
Copy link
Member

@ps48 ps48 commented Jan 23, 2025

Description

Users were seeing high latency on the custom services page in trace analytics

Issues Resolved

  • Removes the redundant traces call
  • Reduces the number of traces/spans loaded to 500 on home page

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 traces traces telemetry related features bug Something isn't working backport 2.x labels Jan 23, 2025
Signed-off-by: Shenoy Pratik <[email protected]>
@ps48 ps48 requested review from TackAdam and sumukhswamy January 23, 2025 23:40
Copy link
Collaborator

@TackAdam TackAdam left a comment

Choose a reason for hiding this comment

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

LGTM, tested locally

@@ -197,30 +196,6 @@ export const handleServiceMapRequest = async (
}
}

if (currService) {
await handleDslRequest(http, DSL, getRelatedServicesQuery(currService), mode, dataSourceMDSId)
Copy link
Member

Choose a reason for hiding this comment

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

also remove the function to get query if it's no longer used?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes deleted.

}

// Add the related services to the map for the current service
map[currService].relatedServices = [...relatedServices];
Copy link
Member

Choose a reason for hiding this comment

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

nit. also remove

relatedServices?: string[]; // services appear in the same traces this service appears

and the ones in
relatedServices: ['analytics-service', 'database', 'frontend-client'],
?

@ps48 ps48 merged commit a9610da into opensearch-project:main Jan 24, 2025
17 of 18 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 24, 2025
* remove traces call for related services

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

* remove call and update the number of traces to 500

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

* update snapshots

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

---------

Signed-off-by: Shenoy Pratik <[email protected]>
(cherry picked from commit a9610da)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
TackAdam pushed a commit that referenced this pull request Jan 24, 2025
* remove traces call for related services



* remove call and update the number of traces to 500



* update snapshots



---------


(cherry picked from commit a9610da)

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 traces traces telemetry related features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants