package scipipe

import (
	"time"
)

// AuditInfo contains structured audit/provenance logging information for a
// particular task (invocation), to go with all outgoing IPs from that task
type AuditInfo struct {
	ID         string
	Command    string
	Params     map[string]string
	Keys       map[string]string
	ExecTimeMS time.Duration
	Upstream   map[string]*AuditInfo
}

// NewAuditInfo returns a new AuditInfo struct
func NewAuditInfo() *AuditInfo {
	return &AuditInfo{
		ID:         randSeqLC(20),
		Command:    "",
		Params:     make(map[string]string),
		Keys:       make(map[string]string),
		ExecTimeMS: -1,
		Upstream:   make(map[string]*AuditInfo),
	}
}

package scipipe

import (
	"time"
)

// AuditInfo contains structured audit/provenance logging information to go with an IP
type AuditInfo struct {
	Command    string
	Params     map[string]string
	Keys       map[string]string
	ExecTimeMS time.Duration
	Upstream   map[string]*AuditInfo
}

// NewAuditInfo returns a new AuditInfo struct
func NewAuditInfo() *AuditInfo {
	return &AuditInfo{
		Command:    "",
		Params:     make(map[string]string),
		Keys:       make(map[string]string),
		ExecTimeMS: -1,
		Upstream:   make(map[string]*AuditInfo),
	}
}

--- 
+++ 
@@ -4,8 +4,10 @@
 	"time"
 )
 
-// AuditInfo contains structured audit/provenance logging information to go with an IP
+// AuditInfo contains structured audit/provenance logging information for a
+// particular task (invocation), to go with all outgoing IPs from that task
 type AuditInfo struct {
+	ID         string
 	Command    string
 	Params     map[string]string
 	Keys       map[string]string
@@ -16,6 +18,7 @@
 // NewAuditInfo returns a new AuditInfo struct
 func NewAuditInfo() *AuditInfo {
 	return &AuditInfo{
+		ID:         randSeqLC(20),
 		Command:    "",
 		Params:     make(map[string]string),
 		Keys:       make(map[string]string),
Add an ID field to AuditInfo
