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

Add more metrics to frontend #1326

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

joshuali925
Copy link
Member

Description

Add more metrics to frontend, followup PR for #1306

Issues Resolved

[List any issues this PR will resolve]

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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2022

Codecov Report

Merging #1326 (1312314) into 2.x (17b8771) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                2.x    #1326   +/-   ##
=========================================
  Coverage     41.82%   41.82%           
  Complexity      315      315           
=========================================
  Files           302      302           
  Lines         17840    17840           
  Branches       4285     4285           
=========================================
  Hits           7462     7462           
  Misses        10205    10205           
  Partials        173      173           
Flag Coverage Δ
dashboards-observability 37.25% <ø> (ø)
opensearch-observability 70.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ability/public/components/common/search/search.tsx 54.54% <ø> (ø)
...ent_analytics/explorer/events_views/docViewRow.tsx 58.22% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Joshua Li <[email protected]>
@joshuali925 joshuali925 marked this pull request as ready for review December 5, 2022 18:50
@joshuali925 joshuali925 requested a review from a team as a code owner December 5, 2022 18:50
@@ -64,8 +64,10 @@ export function addRequestToMetric(
const timeKey = getKey(Date.now());
const rollingCounter = time2CountWin.get(timeKey) || _.cloneDeep(DEFAULT_ROLLING_COUNTER);

// @ts-ignore not sure why 'request' can't be indexed
rollingCounter[component][request][counter]!++;
Copy link
Member Author

Choose a reason for hiding this comment

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

The error is Type 'RequestType<T>' cannot be used to index type 'CounterType[T]'., let me know if anyone knows how I should change it and i can remove the @ts-ignore

@joshuali925 joshuali925 merged commit 43a8cfe into opensearch-project:2.x Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants