Repository: honeycombio/honeycomb-kubernetes-agent
Pull request #44 (2019-05-06 19:03:41)

[processors] support time.Time as custom timestamp field type
Addresses https://github.com/honeycombio/honeycomb-kubernetes-agent/issues/35 - also sorts out a dependency case issue that was complicating vendoring of honeytail v1.0.1


Patch:
diff --git a/go.mod b/go.mod
index 0d17cab..1be36ef 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,6 @@ require (
 	cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2 // indirect
 	github.com/PuerkitoBio/purell v1.0.0 // indirect
 	github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2 // indirect
-	github.com/Sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34
 	github.com/blang/semver v3.0.1+incompatible // indirect
 	github.com/boltdb/bolt v0.0.0-20160719165138-5cc10bbbc5c1
 	github.com/coreos/go-oidc v0.0.0-20160818215358-5644a2f50e2d // indirect
@@ -30,7 +29,7 @@ require (
 	github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad
 	github.com/honeycombio/dynsampler-go v0.0.0-20170809005534-e2e8a486b1ed
 	github.com/honeycombio/gonx v0.0.0-20161103000552-45c9e8369299
-	github.com/honeycombio/honeytail v0.0.0-20170804015214-caa5d01bbba5
+	github.com/honeycombio/honeytail v1.0.1
 	github.com/honeycombio/libhoney-go v0.0.0-20181120182722-a6839afb6be6
 	github.com/honeycombio/urlshaper v0.0.0-20161221211858-02612463a463
 	github.com/hpcloud/tail v0.0.0-20170707194310-a927b6857fc7
@@ -43,6 +42,7 @@ require (
 	github.com/mitchellh/mapstructure v0.0.0-20170523030023-d0303fe80992
 	github.com/pborman/uuid v0.0.0-20150603214016-ca53cad383ca // indirect
 	github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0 // indirect
+	github.com/sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34
 	github.com/smartystreets/assertions v0.0.0-20170607222757-4ea54c1f28ad // indirect
 	github.com/smartystreets/goconvey v0.0.0-20170602164621-9e8dc3f972df // indirect
 	github.com/spf13/pflag v0.0.0-20161024131444-5ccb023bc27d // indirect
diff --git a/go.sum b/go.sum
index 9b4f706..bd05d19 100644
--- a/go.sum
+++ b/go.sum
@@ -55,6 +55,8 @@ github.com/honeycombio/gonx v0.0.0-20161103000552-45c9e8369299 h1:GDFkgkvBs0gOFS
 github.com/honeycombio/gonx v0.0.0-20161103000552-45c9e8369299/go.mod h1:b5vehEHPr2kpld6NR9gSja7nMX8lGQbU5ACKOd9aa9g=
 github.com/honeycombio/honeytail v0.0.0-20170804015214-caa5d01bbba5 h1:pEiTsEB+YwtksHKMtROrvhnB4WGlxsScn969qvuejJY=
 github.com/honeycombio/honeytail v0.0.0-20170804015214-caa5d01bbba5/go.mod h1:MY/vbQjeFBUicmwkKq7wf8JzNSlmSCEYu5/+K63dcFQ=
+github.com/honeycombio/honeytail v1.0.1 h1:hHOwjfpW9cY2cjRMr2vuqlp8xb8flHsOHM48tVGtr7Y=
+github.com/honeycombio/honeytail v1.0.1/go.mod h1:MY/vbQjeFBUicmwkKq7wf8JzNSlmSCEYu5/+K63dcFQ=
 github.com/honeycombio/libhoney-go v0.0.0-20181120182722-a6839afb6be6 h1:DXvuQEdaAODkMUZpIGhk1HYet4WUpb3Q4pfaC/ORYV4=
 github.com/honeycombio/libhoney-go v0.0.0-20181120182722-a6839afb6be6/go.mod h1:jdLxh51fcBTy6XIpx1efuJmHePs2xUfVkw25lr+hsmg=
 github.com/honeycombio/urlshaper v0.0.0-20161221211858-02612463a463 h1:imZTsYvq9kHQ5hx3+ZNhlfMmQ4rimtW1xb9zBb9DJnM=
@@ -78,6 +80,8 @@ github.com/pborman/uuid v0.0.0-20150603214016-ca53cad383ca h1:dKRMHfduZ/ZqOHuYGk
 github.com/pborman/uuid v0.0.0-20150603214016-ca53cad383ca/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
 github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0 h1:GD+A8+e+wFkqje55/2fOVnZPkoDIu1VooBWfNrnY8Uo=
 github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34 h1:kVLTAexkb0RpvzqHGdmxz80/bPLGuZn4qnUR0a4sW9Y=
+github.com/sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
 github.com/smartystreets/assertions v0.0.0-20170607222757-4ea54c1f28ad/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
 github.com/smartystreets/goconvey v0.0.0-20170602164621-9e8dc3f972df/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
 github.com/spf13/pflag v0.0.0-20161024131444-5ccb023bc27d h1:cpV+7T5E6SXMwGmiItJzTK/37mX2aQj1uWCYWtO3q9U=
diff --git a/handlers/handlers.go b/handlers/handlers.go
index aa53a9f..6a23145 100644
--- a/handlers/handlers.go
+++ b/handlers/handlers.go
@@ -8,12 +8,12 @@ package handlers
 import (
 	"fmt"
 
-	"github.com/Sirupsen/logrus"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/config"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/parsers"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/processors"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/transmission"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/unwrappers"
+	"github.com/sirupsen/logrus"
 )
 
 type LineHandler interface {
diff --git a/k8sagent/watcher.go b/k8sagent/watcher.go
index 199836b..8550731 100644
--- a/k8sagent/watcher.go
+++ b/k8sagent/watcher.go
@@ -6,7 +6,7 @@ import (
 	"sync"
 	"time"
 
-	"github.com/Sirupsen/logrus"
+	"github.com/sirupsen/logrus"
 
 	corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
 	"k8s.io/client-go/pkg/api"
diff --git a/main.go b/main.go
index 5234b2d..10a4b9d 100644
--- a/main.go
+++ b/main.go
@@ -8,7 +8,6 @@ import (
 	"strings"
 	"syscall"
 
-	"github.com/Sirupsen/logrus"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/config"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/handlers"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/podtailer"
@@ -18,6 +17,7 @@ import (
 	"github.com/honeycombio/honeycomb-kubernetes-agent/version"
 	libhoney "github.com/honeycombio/libhoney-go"
 	flag "github.com/jessevdk/go-flags"
+	"github.com/sirupsen/logrus"
 
 	"k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/rest"
diff --git a/podtailer/podtailer.go b/podtailer/podtailer.go
index 5d33be5..3310f22 100644
--- a/podtailer/podtailer.go
+++ b/podtailer/podtailer.go
@@ -13,7 +13,6 @@ import (
 	"k8s.io/client-go/pkg/api/v1"
 	"k8s.io/client-go/pkg/types"
 
-	"github.com/Sirupsen/logrus"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/config"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/handlers"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/k8sagent"
@@ -21,6 +20,7 @@ import (
 	"github.com/honeycombio/honeycomb-kubernetes-agent/tailer"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/transmission"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/unwrappers"
+	"github.com/sirupsen/logrus"
 	corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
 )
 
diff --git a/processors/urlshaper.go b/processors/urlshaper.go
index 3183030..8d25515 100644
--- a/processors/urlshaper.go
+++ b/processors/urlshaper.go
@@ -5,10 +5,10 @@ import (
 	"sort"
 	"strings"
 
-	"github.com/Sirupsen/logrus"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/event"
 	"github.com/honeycombio/urlshaper"
 	"github.com/mitchellh/mapstructure"
+	"github.com/sirupsen/logrus"
 )
 
 type RequestShaper struct {
diff --git a/tailer/tailer.go b/tailer/tailer.go
index ebfe97a..f1a2730 100644
--- a/tailer/tailer.go
+++ b/tailer/tailer.go
@@ -7,9 +7,9 @@ import (
 	"sync"
 	"time"
 
-	"github.com/Sirupsen/logrus"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/handlers"
 	"github.com/hpcloud/tail"
+	"github.com/sirupsen/logrus"
 	"k8s.io/client-go/pkg/api/v1"
 )
 
diff --git a/transmission/transmission.go b/transmission/transmission.go
index eb3f2d9..20b14aa 100644
--- a/transmission/transmission.go
+++ b/transmission/transmission.go
@@ -3,9 +3,9 @@ package transmission
 import (
 	"strings"
 
-	"github.com/Sirupsen/logrus"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/event"
 	libhoney "github.com/honeycombio/libhoney-go"
+	"github.com/sirupsen/logrus"
 )
 
 const truncatedLineMax = 1000
diff --git a/unwrappers/docker_json.go b/unwrappers/docker_json.go
index 19d9d6a..e07d7fa 100644
--- a/unwrappers/docker_json.go
+++ b/unwrappers/docker_json.go
@@ -6,9 +6,9 @@ import (
 	"strings"
 	"time"
 
-	"github.com/Sirupsen/logrus"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/event"
 	"github.com/honeycombio/honeycomb-kubernetes-agent/parsers"
+	"github.com/sirupsen/logrus"
 )
 
 type dockerJSONLogLine struct {
diff --git a/vendor/github.com/honeycombio/honeytail/httime/httime.go b/vendor/github.com/honeycombio/honeytail/httime/httime.go
index b633638..29bc5cb 100644
--- a/vendor/github.com/honeycombio/honeytail/httime/httime.go
+++ b/vendor/github.com/honeycombio/honeytail/httime/httime.go
@@ -1,26 +1,46 @@
 package httime
 
 import (
+	"math"
 	"strconv"
 	"strings"
 	"time"
 
-	"github.com/Sirupsen/logrus"
+	"github.com/sirupsen/logrus"
 )
 
 const (
-	StrftimeChar     = "%"
-	UnixTimestampFmt = "%s"
+	StrftimeChar        = "%"
+	UnixTimestampFmt    = "%s(%L)?"
+	UnixTimestampFmtAlt = "%s(.%L)?"
+	UnixTimestampFmtTxt = "unixepoch"
 )
 
+// TODO UnixTimestampFmt is not a regex - it shouldn't look like one. Also even
+// if it were a regex it would be wrong because it's expecting a dot between the
+// seconds and fractional seconds, eg `%s(.%L)?`. But just changing it would
+// break anybody that is using the magical  string `%s(%L)?` as their timestamp
+// in order to enable this magical behavior. Is anybody doing that? Who can
+// know? Introducing UnixTimestampFmtAlt gets it closer to what it's actually
+// representing, except that it's not actually _just_ milliseconds, it's
+// actually any fraction. Which can't really be represented using either
+// strftime or go's time format. Ugh.  Time!! Everything is terrible. Maybe this
+// magical string should just be "UnixEpochDecimal" instead to make clear it's
+// something special?
+
 var (
-	DefaultNower           Nower = &RealNower{}
-	warnedAboutTime              = false
-	possibleTimeFieldNames       = []string{
+	// DefaultNower returns current time when called with Now() unless overridden
+	DefaultNower Nower = &RealNower{}
+	// Location defaults to UTC unless overridden
+	Location *time.Location = time.UTC
+
+	warnedAboutTime        = false
+	possibleTimeFieldNames = []string{
 		"time", "Time",
 		"timestamp", "Timestamp", "TimeStamp",
 		"date", "Date",
 		"datetime", "Datetime", "DateTime",
+		"msec",
 	}
 	// reference: http://man7.org/linux/man-pages/man3/strftime.3.html
 	convertMapping = map[string]string{
@@ -107,6 +127,11 @@ func GetTimestamp(m map[string]interface{}, timeFieldName, timeFieldFormat strin
 				timeStr = v
 			case int:
 				timeStr = strconv.Itoa(v)
+			case float64:
+				timeStr = strconv.FormatFloat(v, 'f', -1, 64)
+			case time.Time:
+				// it's a time.Time struct - we can just return it
+				return v
 			default:
 				warnAboutTime(timeFieldName, t, timeFoundImproperTypeMsg)
 				ts = Now()
@@ -150,11 +175,16 @@ func GetTimestamp(m map[string]interface{}, timeFieldName, timeFieldFormat strin
 	return ts
 }
 
+// Parse wraps time.ParseInLocation to use httime's Location from parsers
+func Parse(format, timespec string) (time.Time, error) {
+	return time.ParseInLocation(format, timespec, Location)
+}
+
 // convertTimeFormat tries to handle C-style time formats alongside Go's
 // existing time.Parse behavior.
 func convertTimeFormat(layout string) string {
-	for fmt, conv := range convertMapping {
-		layout = strings.Replace(layout, fmt, conv, -1)
+	for format, conv := range convertMapping {
+		layout = strings.Replace(layout, format, conv, -1)
 	}
 	return layout
 }
@@ -164,34 +194,67 @@ func tryTimeFormats(t, intendedFormat string) time.Time {
 	// hack it by just replacing all commas with periods and hope it works out.
 	// https://github.com/golang/go/issues/6189
 	t = strings.Replace(t, ",", ".", -1)
-	if intendedFormat == UnixTimestampFmt {
+	if (intendedFormat == UnixTimestampFmt) ||
+		(intendedFormat == UnixTimestampFmtAlt) ||
+		(intendedFormat == UnixTimestampFmtTxt) {
 		if unix, err := strconv.ParseInt(t, 0, 64); err == nil {
 			return time.Unix(unix, 0)
 		}
+		// fractional seconds eg 12345678.890123
+		if unix, err := strconv.ParseFloat(t, 64); err == nil {
+			sec, dec := math.Modf(unix)
+			return time.Unix(int64(sec), int64(dec*(1e9)))
+		}
 	}
 	if intendedFormat != "" {
 		format := strings.Replace(intendedFormat, ",", ".", -1)
 		if strings.Contains(format, StrftimeChar) {
-			if ts, err := time.Parse(convertTimeFormat(format), t); err == nil {
+			if ts, err := Parse(convertTimeFormat(format), t); err == nil {
 				return ts
 			}
 		}
 
 		// Still try Go style, just in case
-		if ts, err := time.Parse(format, t); err == nil {
+		if ts, err := Parse(format, t); err == nil {
 			return ts
 		}
 	}
 
 	var ts time.Time
-	if tOther, err := time.Parse("2006-01-02 15:04:05.999999999 -0700 MST", t); err == nil {
+	if tOther, err := Parse("2006-01-02 15:04:05.999999999 -0700 MST", t); err == nil {
 		ts = tOther
-	} else if tOther, err := time.Parse(time.RFC3339Nano, t); err == nil {
+	} else if tOther, err := Parse(time.RFC3339Nano, t); err == nil {
 		ts = tOther
-	} else if tOther, err := time.Parse(time.RubyDate, t); err == nil {
+	} else if tOther, err := Parse(time.RubyDate, t); err == nil {
 		ts = tOther
-	} else if tOther, err := time.Parse(time.UnixDate, t); err == nil {
+	} else if tOther, err := Parse(time.UnixDate, t); err == nil {
 		ts = tOther
+	} else {
+		// the defaults didn't catch it, let's try a few other things
+		// is it all numeric? then try unix epoch times
+		epochInt, err := strconv.ParseInt(t, 0, 64)
+		if err == nil {
+			// it might be seconds or it might be milliseconds! Who can know!
+			// 10-digit numbers are seconds, 13-digit milliseconds, 16 microseconds
+			if len(t) == 10 {
+				ts = time.Unix(epochInt, 0)
+			} else if len(t) > 10 {
+				// turn it into seconds and fractional seconds
+				fractionalTime := t[:10] + "." + t[10:]
+				// then chop it into the int part and the fractional part
+				if epochFloat, err := strconv.ParseFloat(fractionalTime, 64); err == nil {
+					sec, dec := math.Modf(epochFloat)
+					ts = time.Unix(int64(sec), int64(dec*(1e9)))
+				}
+
+			}
+		} else {
+			epochFloat, err := strconv.ParseFloat(t, 64)
+			if err == nil {
+				sec, dec := math.Modf(epochFloat)
+				ts = time.Unix(int64(sec), int64(dec*(1e9)))
+			}
+		}
 	}
 	return ts
 }
diff --git a/vendor/github.com/Sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/.gitignore
rename to vendor/github.com/sirupsen/logrus/.gitignore
diff --git a/vendor/github.com/Sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/.travis.yml
rename to vendor/github.com/sirupsen/logrus/.travis.yml
diff --git a/vendor/github.com/Sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/CHANGELOG.md
rename to vendor/github.com/sirupsen/logrus/CHANGELOG.md
diff --git a/vendor/github.com/Sirupsen/logrus/LICENSE b/vendor/github.com/sirupsen/logrus/LICENSE
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/LICENSE
rename to vendor/github.com/sirupsen/logrus/LICENSE
diff --git a/vendor/github.com/Sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/README.md
rename to vendor/github.com/sirupsen/logrus/README.md
diff --git a/vendor/github.com/Sirupsen/logrus/alt_exit.go b/vendor/github.com/sirupsen/logrus/alt_exit.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/alt_exit.go
rename to vendor/github.com/sirupsen/logrus/alt_exit.go
diff --git a/vendor/github.com/Sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/doc.go
rename to vendor/github.com/sirupsen/logrus/doc.go
diff --git a/vendor/github.com/Sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/entry.go
rename to vendor/github.com/sirupsen/logrus/entry.go
diff --git a/vendor/github.com/Sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/exported.go
rename to vendor/github.com/sirupsen/logrus/exported.go
diff --git a/vendor/github.com/Sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/formatter.go
rename to vendor/github.com/sirupsen/logrus/formatter.go
diff --git a/vendor/github.com/Sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/hooks.go
rename to vendor/github.com/sirupsen/logrus/hooks.go
diff --git a/vendor/github.com/Sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/json_formatter.go
rename to vendor/github.com/sirupsen/logrus/json_formatter.go
diff --git a/vendor/github.com/Sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/logger.go
rename to vendor/github.com/sirupsen/logrus/logger.go
diff --git a/vendor/github.com/Sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/logrus.go
rename to vendor/github.com/sirupsen/logrus/logrus.go
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_appengine.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/terminal_appengine.go
rename to vendor/github.com/sirupsen/logrus/terminal_appengine.go
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_bsd.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/terminal_bsd.go
rename to vendor/github.com/sirupsen/logrus/terminal_bsd.go
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_linux.go b/vendor/github.com/sirupsen/logrus/terminal_linux.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/terminal_linux.go
rename to vendor/github.com/sirupsen/logrus/terminal_linux.go
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go b/vendor/github.com/sirupsen/logrus/terminal_notwindows.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
rename to vendor/github.com/sirupsen/logrus/terminal_notwindows.go
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_solaris.go b/vendor/github.com/sirupsen/logrus/terminal_solaris.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/terminal_solaris.go
rename to vendor/github.com/sirupsen/logrus/terminal_solaris.go
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_windows.go b/vendor/github.com/sirupsen/logrus/terminal_windows.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/terminal_windows.go
rename to vendor/github.com/sirupsen/logrus/terminal_windows.go
diff --git a/vendor/github.com/Sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/text_formatter.go
rename to vendor/github.com/sirupsen/logrus/text_formatter.go
diff --git a/vendor/github.com/Sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go
similarity index 100%
rename from vendor/github.com/Sirupsen/logrus/writer.go
rename to vendor/github.com/sirupsen/logrus/writer.go
diff --git a/vendor/modules.txt b/vendor/modules.txt
index a0cd9cf..22ac2ff 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -5,8 +5,6 @@ cloud.google.com/go/internal
 github.com/PuerkitoBio/purell
 # github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2
 github.com/PuerkitoBio/urlesc
-# github.com/Sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34
-github.com/Sirupsen/logrus
 # github.com/blang/semver v3.0.1+incompatible
 github.com/blang/semver
 # github.com/boltdb/bolt v0.0.0-20160719165138-5cc10bbbc5c1
@@ -62,7 +60,7 @@ github.com/hashicorp/golang-lru/simplelru
 github.com/honeycombio/dynsampler-go
 # github.com/honeycombio/gonx v0.0.0-20161103000552-45c9e8369299
 github.com/honeycombio/gonx
-# github.com/honeycombio/honeytail v0.0.0-20170804015214-caa5d01bbba5
+# github.com/honeycombio/honeytail v1.0.1
 github.com/honeycombio/honeytail/httime
 # github.com/honeycombio/libhoney-go v0.0.0-20181120182722-a6839afb6be6
 github.com/honeycombio/libhoney-go
@@ -92,6 +90,8 @@ github.com/mitchellh/mapstructure
 github.com/pborman/uuid
 # github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0
 github.com/pmezard/go-difflib/difflib
+# github.com/sirupsen/logrus v0.0.0-20170620144510-3d4380f53a34
+github.com/sirupsen/logrus
 # github.com/spf13/pflag v0.0.0-20161024131444-5ccb023bc27d
 github.com/spf13/pflag
 # github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365


Test patch:
diff --git a/processors/timefield_test.go b/processors/timefield_test.go
new file mode 100644
index 0000000..08cdb2e
--- /dev/null
+++ b/processors/timefield_test.go
@@ -0,0 +1,22 @@
+package processors
+
+import (
+	"testing"
+	"time"
+
+	"github.com/honeycombio/honeycomb-kubernetes-agent/event"
+	"github.com/stretchr/testify/assert"
+)
+
+// Ensure that the timestamp processor can handle timestamp fields of type time.Time
+func TestTimefieldProcessReturnsTime(t *testing.T) {
+	// Format should be irrelevant here, we just return the field if it's there
+	tp := TimeFieldExtractor{config: &timeFieldConfig{Field: "special_time_field", Format: time.RFC3339}}
+
+	mockTime := time.Now()
+	ev := &event.Event{}
+	assert.True(t, ev.Timestamp.IsZero())
+	ev.Data = map[string]interface{}{"foo": "some_value", "special_time_field": mockTime}
+	tp.Process(ev)
+	assert.Equal(t, mockTime, ev.Timestamp)
+}