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

sql: add tracing spans for each statement executed within a UDF #88929

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

mgartner
Copy link
Collaborator

This commit creates a separate tracing span for each statement executed during evaluation of a UDF.

Release note: None

@mgartner mgartner requested review from yuzefovich and a team September 28, 2022 16:34
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)


pkg/sql/routine.go line 72 at r1 (raw file):

	for i := 0; i < expr.NumStmts; i++ {
		if err := func() error {
			opName := "udf-stmt-" + strconv.Itoa(i)

nit: RoutineExpr has name field - it'd be good to include that in the opName here too.

@mgartner mgartner requested a review from a team as a code owner September 28, 2022 21:53
Copy link
Collaborator Author

@mgartner mgartner 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 @yuzefovich)


pkg/sql/routine.go line 72 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

nit: RoutineExpr has name field - it'd be good to include that in the opName here too.

Done.

This commit creates a separate tracing span for each statement executed
during evaluation of a UDF.

Release note: None
@mgartner
Copy link
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 30, 2022

Build succeeded:

@craig craig bot merged commit 5990da6 into cockroachdb:master Sep 30, 2022
@mgartner mgartner deleted the udf-tracing branch September 30, 2022 22:13
@mgartner
Copy link
Collaborator Author

mgartner commented Oct 4, 2022

blathers backport 22.2.0

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.

3 participants