@@ -480,9 +480,6 @@ func aggregate(reportChan <-chan *TestReport, errChan <-chan error, opts *aggreg
480480 fullReport .SelectedTests = append (fullReport .SelectedTests , test )
481481 }
482482
483- // Get the report without any results to send to splunk
484- splunkReport := * fullReport
485-
486483 // Prepare final results
487484 var (
488485 aggregatedResults []TestResult
@@ -497,14 +494,16 @@ func aggregate(reportChan <-chan *TestReport, errChan <-chan error, opts *aggreg
497494 GenerateSummaryData (fullReport )
498495
499496 if sendToSplunk {
500- err = sendDataToSplunk (opts , splunkReport , aggregatedResults ... )
497+ err = sendDataToSplunk (opts , * fullReport )
501498 }
502499 return fullReport , err
503500}
504501
505502// sendDataToSplunk sends a truncated TestReport and each individual TestResults to Splunk as events
506- func sendDataToSplunk (opts * aggregateOptions , report TestReport , results ... TestResult ) error {
503+ func sendDataToSplunk (opts * aggregateOptions , report TestReport ) error {
507504 start := time .Now ()
505+ results := report .Results
506+ report .Results = nil // Don't send results to Splunk, doing that individually
508507 // Dry-run mode for example runs
509508 isExampleRun := strings .Contains (opts .splunkURL , "splunk.example.com" )
510509
@@ -515,7 +514,7 @@ func sendDataToSplunk(opts *aggregateOptions, report TestReport, results ...Test
515514 SetHeader ("Content-Type" , "application/json" ).
516515 SetLogger (ZerologRestyLogger {})
517516
518- log .Debug ().Str ("report id" , report .ID ).Int ("results" , len (results )).Msg ("Sending aggregated data to Splunk" )
517+ log .Debug ().Str ("report id" , report .ID ).Int ("results" , len (report . Results )).Msg ("Sending aggregated data to Splunk" )
519518
520519 var (
521520 splunkErrs = []error {}
0 commit comments