Skip to content

V12.0.5 workload table attribution metric instrumentation#70

Merged
ejortegau merged 5 commits intoslack-vitess-r12.0.5from
eduardo.ortega/slack-vitess-r12.0.5_workload_table_attribution
Apr 13, 2023
Merged

V12.0.5 workload table attribution metric instrumentation#70
ejortegau merged 5 commits intoslack-vitess-r12.0.5from
eduardo.ortega/slack-vitess-r12.0.5_workload_table_attribution

Conversation

@ejortegau
Copy link

@ejortegau ejortegau commented Apr 6, 2023

Description

This PR backports the functionality of vitessio#12394 to our v12 fork.
Some changes were necessary with respect to the upstream PR due to the distance between v12
and the v16+ code against which the upstream change was built - particularly around the area of
query directive extraction; as well as the metrics that are instrumented.

This will not need to be ported to v14 it has been already included in #67 .

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
We were using `CommentDirectives.IsSet()` which only returns true if the query
directive's value is an integer or a boolean. By skipping this and simply
calling `CommentDirectives.GetString()` we can get the string value of the
directive or an empty string in case the workload name it is not set.

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
@ejortegau ejortegau marked this pull request as ready for review April 12, 2023 12:35
@ejortegau ejortegau requested a review from a team as a code owner April 12, 2023 12:36
@ejortegau ejortegau merged commit 690f417 into slack-vitess-r12.0.5 Apr 13, 2023
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.

2 participants