(format string, args ...interface{})
| 1130 | } |
| 1131 | |
| 1132 | func (r *Runner) failedJobf(format string, args ...interface{}) *proto.FailedJob { |
| 1133 | message := fmt.Sprintf(format, args...) |
| 1134 | var code string |
| 1135 | |
| 1136 | for c, m := range errorCodes { |
| 1137 | if strings.Contains(message, m) { |
| 1138 | code = c |
| 1139 | break |
| 1140 | } |
| 1141 | } |
| 1142 | return &proto.FailedJob{ |
| 1143 | JobId: r.job.JobId, |
| 1144 | Error: message, |
| 1145 | ErrorCode: code, |
| 1146 | } |
| 1147 | } |
| 1148 | |
| 1149 | func (r *Runner) startTrace(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) { |
| 1150 | return r.tracer.Start(ctx, name, append(opts, trace.WithAttributes( |
no test coverage detected