-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: add telemetry for when distsql/vectorized is used #40885
Conversation
df9f4c2
to
cf98285
Compare
I am not super sure about the feature names I choose -- let me know if another name would be better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @rafiss and @rohany)
pkg/sql/sqltelemetry/exec.go, line 16 at r1 (raw file):
var ( DistSQLExecCounter = telemetry.GetCounterOnce("sql.exec.distsql.on")
I'm not sure, but i think its better to place these in an init method? Though if there isn't any difference really then I don't have an opinion.
How about
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks i like your names better
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @rohany)
pkg/sql/sqltelemetry/exec.go, line 16 at r1 (raw file):
Previously, rohany (Rohan Yadav) wrote…
I'm not sure, but i think its better to place these in an init method? Though if there isn't any difference really then I don't have an opinion.
my understanding was that an init
method is only needed when the initialization can't be done inline, like if you need a loop. i'll check out other examples
jk make those names have dashes, not underscores -- telemetry/doc.go style guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)
pkg/sql/sqltelemetry/exec.go, line 16 at r1 (raw file):
Previously, rafiss (Rafi Shamim) wrote…
my understanding was that an
init
method is only needed when the initialization can't be done inline, like if you need a loop. i'll check out other examples
I looked a bit more, theres a small difference -- i think this initialization always happens, while the init initialization happens only if the package is imported
cf98285
to
75d1cf8
Compare
This adds two new features that are incremented whenever a query is executed with distsql or vectorized. The feature names are: - sql.exec.query.is-distributed - sql.exec.query.is-vectorized touches cockroachdb#40418 Release justification: low impact monitoring improvement Release note: None
75d1cf8
to
c1bfd5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @rohany)
pkg/sql/sqltelemetry/exec.go, line 16 at r1 (raw file):
Previously, rohany (Rohan Yadav) wrote…
I looked a bit more, theres a small difference -- i think this initialization always happens, while the init initialization happens only if the package is imported
ah interesting. well the convention in the sqltelemetry
package seems to be to do it inline with the declaration when possible, so i guess i'll stick with that.
e.g. pkg/sql/sqltelemetry/planning.go and pkg/sql/sqltelemetry/pgwire.go
ping @jordanlewis for TL sign-off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
bors r=jordanlewis |
40885: sql: add telemetry for when distsql/vectorized is used r=jordanlewis a=rafiss This adds two new features that are incremented whenever a query is executed with distsql or vectorized. The feature names are: - sql.exec.query.is-distributed - sql.exec.query.is-vectorized touches #40418 and cockroachlabs/registration#227 Release justification: low impact monitoring improvement Release note: None Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Build succeeded |
This adds two new features that are incremented whenever a query is
executed with distsql or vectorized. The feature names are:
touches #40418 and cockroachlabs/registration#227
Release justification: low impact monitoring improvement
Release note: None