logotel/依赖库log升级到v0.8.0;

develop logotel/v0.8.0
Ge Song 2 years ago
parent b0180865fc
commit 1cdffbd6ea

@ -3,7 +3,7 @@ module git.blauwelle.com/go/crate/logotel
go 1.20 go 1.20
require ( 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 v1.13.0
go.opentelemetry.io/otel/trace v1.13.0 go.opentelemetry.io/otel/trace v1.13.0
) )

@ -1,5 +1,5 @@
git.blauwelle.com/go/crate/log v0.7.0 h1:CKQN4Lrt+4WZoHOk+/yyok2S2YSwApM8exW9kwscXKU= git.blauwelle.com/go/crate/log v0.8.0 h1:TINzuFo330MZIagzdULouwBoLCcLIB4yjI/G1IH0I+0=
git.blauwelle.com/go/crate/log v0.7.0/go.mod h1:jfVfpRODZTA70A8IkApVeGsS1zfLk1D77sLWZM/w+L0= 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/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

@ -3,6 +3,7 @@
package logotel package logotel
import ( import (
"context"
"fmt" "fmt"
"strconv" "strconv"
@ -29,8 +30,8 @@ type Processor struct {
bufferPool logjson.BytesBufferPool bufferPool logjson.BytesBufferPool
} }
func (processor *Processor) Process(entry logsdk.ReadonlyEntry) { func (processor *Processor) Process(ctx context.Context, entry logsdk.ReadonlyEntry) {
span := trace.SpanFromContext(entry.Context) span := trace.SpanFromContext(ctx)
if !span.IsRecording() { if !span.IsRecording() {
return return
} }

Loading…
Cancel
Save