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

docs: clarify descriptions for tracing cluster settings #81468

Merged
merged 1 commit into from
May 19, 2022

Conversation

michae2
Copy link
Collaborator

@michae2 michae2 commented May 18, 2022

The descriptions for sql.trace.txn.enable_threshold and
sql.trace.stmt.enable_threshold suggested that tracing was only enabled
for transactions and statements longer than the threshold duration. This
is not true, however: tracing is enabled for everything, and only
logged for transactions and statements longer than the threshold
duration. Make this clear in the descriptions. Also make the description
for sql.trace.session_eventlog.enabled a "single" sentence to match the
style of other descriptions.

Release note: None

@michae2 michae2 requested review from andreimatei and arulajmani May 18, 2022 19:37
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @arulajmani and @michae2)


pkg/sql/exec_util.go line 240 at r1 (raw file):

	"sql.trace.stmt.enable_threshold",
	"enables tracing on all statements; statements executing for longer than "+
		"this duration will have their trace recorded (set to 0 to disable); "+

"recorded" means something else in the context of tracing. When this setting is active, all traces are recorded. Talk about logging.

@michae2 michae2 force-pushed the tracing_settings branch from a8f0ac2 to e5abdd9 Compare May 18, 2022 20:47
Copy link
Collaborator Author

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @arulajmani)


pkg/sql/exec_util.go line 240 at r1 (raw file):

Previously, andreimatei (Andrei Matei) wrote…

"recorded" means something else in the context of tracing. When this setting is active, all traces are recorded. Talk about logging.

Done.

Copy link
Contributor

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @andreimatei, @arulajmani, and @michae2)


pkg/sql/exec_util.go line 226 at r2 (raw file):

	"enables tracing on all transactions; transactions open for longer than "+
		"this duration will have their trace logged (set to 0 to disable); "+
		"note that enabling this may have a non-trivial negative performance "+

nit: I'd strike "non-trivial"

The descriptions for sql.trace.txn.enable_threshold and
sql.trace.stmt.enable_threshold suggested that tracing was only enabled
for transactions and statements longer than the threshold duration. This
is not true, however: tracing is enabled for everything, and only
_logged_ for transactions and statements longer than the threshold
duration. Make this clear in the descriptions. Also make the description
for sql.trace.session_eventlog.enabled a "single" sentence to match the
style of other descriptions.

Release note: None
@michae2 michae2 force-pushed the tracing_settings branch from e5abdd9 to 381c3c4 Compare May 18, 2022 21:50
Copy link
Collaborator Author

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @andreimatei and @arulajmani)


pkg/sql/exec_util.go line 226 at r2 (raw file):

Previously, andreimatei (Andrei Matei) wrote…

nit: I'd strike "non-trivial"

Done.

Copy link
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

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

Thanks for making this change so quick!

@michae2
Copy link
Collaborator Author

michae2 commented May 18, 2022

You're welcome! Thanks for reviewing!

bors r=andreimatei,arulajmani

@craig
Copy link
Contributor

craig bot commented May 19, 2022

Build succeeded:

@blathers-crl
Copy link

blathers-crl bot commented May 19, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 381c3c4 to blathers/backport-release-21.2-81468: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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