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

llbsolver: add more otel spans for export and history #4997

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

tonistiigi
Copy link
Member

Add more OpenTelemetry spans to track the time for exporters, attestations and history record creation.

@@ -222,7 +226,10 @@ func (s *Solver) recordBuildHistory(ctx context.Context, id string, req frontend
}
}

makeProvenance := func(res solver.ResultProxy, cap *provenance.Capture) (*controlapi.Descriptor, func(), error) {
makeProvenance := func(name string, res solver.ResultProxy, cap *provenance.Capture) (*controlapi.Descriptor, func(), error) {
span, ctx := tracing.StartSpan(ctx, fmt.Sprintf("create %s history provenance", name))
Copy link
Member

Choose a reason for hiding this comment

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

Can name be an attribute on the span instead of part of the name?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the Jaeger UI, spans need individual names to pick the correct line. Other details, like attributes, become visible only when a span is clicked on.

@thompson-shaun thompson-shaun modified the milestone: v0.14.0 Jun 6, 2024
@tonistiigi tonistiigi merged commit 0435475 into moby:master Jun 6, 2024
74 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.

4 participants