-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feature: add key prefix support to useTranslation hook #1371
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jethro-M
added a commit
to yugabyte/yugabyte-db
that referenced
this pull request
Jun 27, 2023
Summary: **Context** Currently in YugabyteDB, pg_stat_statements is used to track latency as aggregates and with columns showing total_time, min_time, mean_time… for each query type. The following commit added a query latency histogram column in pg_stat_statment to support tracking the distribution of query latencies: 2fd44b1 The following commit added the histogram of latencies and calculated percentile latencies to the slow queries response: 3b50cf9 We would like to expose the histogram of latencies on the YBA UI along with the set of calculated percentile latencies (P99, P95, P90, etc.). Prior to this diff, clicking on either a live query or a slow query will bring up the same side info panel (`QueryInfoSidePanel.js`). This side panel simply iterates over the query object and writes the key values onto the screen. **Change** This diff marks the previous `QueryInfoSidePanel.js` as 'legacy' and uses it as a fallback. This fallback is used when the user is viewing a live query or a slow query on a universe with YBDB version < 2.19.1.0-b81. This diff adds `QueryInfoSidePanel.tsx` to handle the new response payload for slow queries on universes with YBDB version >= 2.19.1.0-b81. The new response payload type interface has been added in `queries/helpers/types.ts`. When data is missing the UI will use '-' as a placeholder. When the histogram data is missing, the UI will just skip rendering it. This diff also implements a reusable `CodeBlock` component. This component is simply displays the provided code string and gives the user the option to copy the code string. **Package Changes** Upgrade `react-i18next` from `11.8.15` to `11.18.6` - This upgrade was motivated by the key prefix feature added in 11.12: i18next/react-i18next#1371 Test Plan: Verify that the user is able to view the new slow query side panel when selecting slow queries on a universe with YBDB version >= 2.19.1.0-b81. Verify that the user is able to copy the code string in the code block. Verify that the UI does not crash when viewing various queries (slow query, live query, slow query on universes with YBDB version < 2.19.1.0-b81). Reviewers: rmadhavan, asharma, kkannan Reviewed By: kkannan Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D26236
Jethro-M
added a commit
to yugabyte/yugabyte-db
that referenced
this pull request
Jul 6, 2023
… info panel for slow queries Summary: **Context** Currently in YugabyteDB, pg_stat_statements is used to track latency as aggregates and with columns showing total_time, min_time, mean_time… for each query type. The following commit added a query latency histogram column in pg_stat_statment to support tracking the distribution of query latencies: 2fd44b1 The following commit added the histogram of latencies and calculated percentile latencies to the slow queries response: 3b50cf9 We would like to expose the histogram of latencies on the YBA UI along with the set of calculated percentile latencies (P99, P95, P90, etc.). Prior to this diff, clicking on either a live query or a slow query will bring up the same side info panel (`QueryInfoSidePanel.js`). This side panel simply iterates over the query object and writes the key values onto the screen. **Change** This diff marks the previous `QueryInfoSidePanel.js` as 'legacy' and uses it as a fallback. This fallback is used when the user is viewing a live query or a slow query on a universe with YBDB version < 2.19.1.0-b81. This diff adds `QueryInfoSidePanel.tsx` to handle the new response payload for slow queries on universes with YBDB version >= 2.19.1.0-b81. The new response payload type interface has been added in `queries/helpers/types.ts`. When data is missing the UI will use '-' as a placeholder. When the histogram data is missing, the UI will just skip rendering it. This diff also implements a reusable `CodeBlock` component. This component is simply displays the provided code string and gives the user the option to copy the code string. **Package Changes** Upgrade `react-i18next` from `11.8.15` to `11.18.6` - This upgrade was motivated by the key prefix feature added in 11.12: i18next/react-i18next#1371 Original commit: 4220609 / D26236 [PLAT-9456] Fix slow query side panel prop name and add label mapping **Context** In febb72f we replaced `rolname` with `userid`. The `userid` field had no text label mapping so the UI showed an empty string as the label. We should use 'User Id' as the label instead. Original commit: 7f335e7 / D25146 Test Plan: Verify that the user is able to view the new slow query side panel when selecting slow queries on a universe with YBDB version >= 2.19.1.0-b81. Verify that the user is able to copy the code string in the code block. Verify that the UI does not crash when viewing various queries (slow query, live query, slow query on universes with YBDB version < 2.19.1.0-b81). - Create a universe with YBDB version <= 2.19.1.0-b80 - Verify that the user can see slow query details. {F82818} - Upgrade the universe to a version > 2.19.1.0-b80 - Verify that the user can see slow query details (now in a new component with latency data). {F82577} Reviewers: rmadhavan, asharma, kkannan Reviewed By: kkannan Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D26692
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
keyPrefix
option foruseTranslation
hook (Issue #1359)Checklist
npm run test
Checklist (for documentation change)
Scope of changes:
keyPrefix
param handling foruseTranslation
hooki18next
dep to2.6.0
(keyPrefix
param added togetFixedT
)