mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 10:03:42 +08:00 
			
		
		
		
	build: add OTEL span around build function
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
		@@ -500,7 +500,9 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opts map[
 | 
				
			|||||||
						resultHandle, rr, err = NewResultHandle(ctx, cc, *so, "buildx", buildFunc, ch)
 | 
											resultHandle, rr, err = NewResultHandle(ctx, cc, *so, "buildx", buildFunc, ch)
 | 
				
			||||||
						resultHandleFunc(dp.driverIndex, resultHandle)
 | 
											resultHandleFunc(dp.driverIndex, resultHandle)
 | 
				
			||||||
					} else {
 | 
										} else {
 | 
				
			||||||
 | 
											span, ctx := tracing.StartSpan(ctx, "build")
 | 
				
			||||||
						rr, err = c.Build(ctx, *so, "buildx", buildFunc, ch)
 | 
											rr, err = c.Build(ctx, *so, "buildx", buildFunc, ch)
 | 
				
			||||||
 | 
											tracing.FinishWithError(span, err)
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					if !so.Internal && desktop.BuildBackendEnabled() && node.Driver.HistoryAPISupported(ctx) {
 | 
										if !so.Internal && desktop.BuildBackendEnabled() && node.Driver.HistoryAPISupported(ctx) {
 | 
				
			||||||
						if err != nil {
 | 
											if err != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user