From 810c756a1945884a50e6605b5b601dec284cbfdb Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Mon, 23 Dec 2019 17:09:59 +1100 Subject: [PATCH 1/2] Use correct field name for trace identifier. See https://cloud.google.com/run/docs/logging#correlate-logs and https://github.com/GoogleCloudPlatform/golang-samples/blob/master/run/logging-manual/main.go#L60. --- formatter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formatter.go b/formatter.go index 528992e..deda342 100644 --- a/formatter.go +++ b/formatter.go @@ -78,7 +78,7 @@ type Entry struct { Timestamp string `json:"timestamp,omitempty"` Severity severity `json:"severity,omitempty"` HTTPRequest *HTTPRequest `json:"httpRequest,omitempty"` - Trace string `json:"trace,omitempty"` + Trace string `json:"logging.googleapis.com/trace,omitempty"` ServiceContext *ServiceContext `json:"serviceContext,omitempty"` Message string `json:"message,omitempty"` Context *Context `json:"context,omitempty"` From 65bfa625007eb5e1643d3c6a7eea71404f1d7e9d Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Mon, 23 Dec 2019 17:12:14 +1100 Subject: [PATCH 2/2] Update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 15fffb4..175f7ba 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/icco/logrus-stackdriver-formatter +module github.com/charleskorn/logrus-stackdriver-formatter require ( github.com/TV4/logrus-stackdriver-formatter v0.1.0