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

build: add OTEL span around build function #2742

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

tonistiigi
Copy link
Member

Small improvement for OTEL trace to group all the grpc requests made by build function under the same parent.

build/build.go Outdated
@@ -500,7 +500,9 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opts map[
resultHandle, rr, err = NewResultHandle(ctx, cc, *so, "buildx", buildFunc, ch)
resultHandleFunc(dp.driverIndex, resultHandle)
} else {
span, ctx := tracing.StartSpan(ctx, "Build")
Copy link
Member

Choose a reason for hiding this comment

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

Does casing matters?

Suggested change
span, ctx := tracing.StartSpan(ctx, "Build")
span, ctx := tracing.StartSpan(ctx, "build")

Copy link
Member Author

Choose a reason for hiding this comment

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

🤷 Is there a convention? Or should we define one?

Copy link
Member

Choose a reason for hiding this comment

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

Don't think there is any convention but it's lowercasing from what I see on buildkit repo: https://github.com/search?q=repo%3Amoby%2Fbuildkit%20tracing.StartSpan&type=code

@thompson-shaun thompson-shaun modified the milestones: v0.18.0, v0.19.0 Oct 23, 2024
@crazy-max crazy-max modified the milestones: v0.19.0, v0.18.0 Oct 25, 2024
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi merged commit 1813483 into docker:master Oct 28, 2024
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants