From 1cdffbd6ea00d6402dfe419ea48a4826335c469e Mon Sep 17 00:00:00 2001 From: Ge Song Date: Fri, 14 Apr 2023 00:11:54 +0800 Subject: [PATCH] =?UTF-8?q?logotel/=E4=BE=9D=E8=B5=96=E5=BA=93log=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=88=B0v0.8.0;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logotel/go.mod | 2 +- logotel/go.sum | 4 ++-- logotel/processor.go | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/logotel/go.mod b/logotel/go.mod index 3869c42..f7f2f50 100644 --- a/logotel/go.mod +++ b/logotel/go.mod @@ -3,7 +3,7 @@ module git.blauwelle.com/go/crate/logotel go 1.20 require ( - git.blauwelle.com/go/crate/log v0.7.0 + git.blauwelle.com/go/crate/log v0.8.0 go.opentelemetry.io/otel v1.13.0 go.opentelemetry.io/otel/trace v1.13.0 ) diff --git a/logotel/go.sum b/logotel/go.sum index 2e8aa85..3eb48ac 100644 --- a/logotel/go.sum +++ b/logotel/go.sum @@ -1,5 +1,5 @@ -git.blauwelle.com/go/crate/log v0.7.0 h1:CKQN4Lrt+4WZoHOk+/yyok2S2YSwApM8exW9kwscXKU= -git.blauwelle.com/go/crate/log v0.7.0/go.mod h1:jfVfpRODZTA70A8IkApVeGsS1zfLk1D77sLWZM/w+L0= +git.blauwelle.com/go/crate/log v0.8.0 h1:TINzuFo330MZIagzdULouwBoLCcLIB4yjI/G1IH0I+0= +git.blauwelle.com/go/crate/log v0.8.0/go.mod h1:jfVfpRODZTA70A8IkApVeGsS1zfLk1D77sLWZM/w+L0= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/logotel/processor.go b/logotel/processor.go index 09f4193..079c8b2 100644 --- a/logotel/processor.go +++ b/logotel/processor.go @@ -3,6 +3,7 @@ package logotel import ( + "context" "fmt" "strconv" @@ -29,8 +30,8 @@ type Processor struct { bufferPool logjson.BytesBufferPool } -func (processor *Processor) Process(entry logsdk.ReadonlyEntry) { - span := trace.SpanFromContext(entry.Context) +func (processor *Processor) Process(ctx context.Context, entry logsdk.ReadonlyEntry) { + span := trace.SpanFromContext(ctx) if !span.IsRecording() { return }