Skip to content

Commit

Permalink
propagate trace to EOS (cs3org#4510)
Browse files Browse the repository at this point in the history
* propagate trace to EOS

* add changelog
  • Loading branch information
labkode authored Feb 8, 2024
1 parent 8e0818f commit 46d37fa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 328 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ tests/ocis/tests/acceptance/work_tmp
.air.toml

toolchain/

logs_test/
6 changes: 6 additions & 0 deletions changelog/unreleased/eostrace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Propagates traceID to EOS

This PR fixes the cases where the EOS trace ID
was always a bunch of zeroes.

https://github.com/cs3org/reva/pull/4510
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ require (
github.com/wk8/go-ordered-map v1.0.0
go-micro.dev/v4 v4.3.1-0.20211108085239-0c2041e43908
go.opencensus.io v0.24.0
go.opentelemetry.io/otel/trace v1.20.0
go.step.sm/crypto v0.39.0
golang.org/x/crypto v0.17.0
golang.org/x/oauth2 v0.14.0
Expand Down Expand Up @@ -142,6 +141,7 @@ require (
go.etcd.io/bbolt v1.3.8 // indirect
go.mongodb.org/mongo-driver v1.11.3 // indirect
go.opentelemetry.io/otel v1.20.0 // indirect
go.opentelemetry.io/otel/trace v1.20.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/time v0.5.0 // indirect
Expand Down
324 changes: 0 additions & 324 deletions logs_tests

This file was deleted.

5 changes: 2 additions & 3 deletions pkg/eosclient/eosbinary/eosbinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import (
"github.com/cs3org/reva/pkg/eosclient"
"github.com/cs3org/reva/pkg/errtypes"
"github.com/cs3org/reva/pkg/storage/utils/acl"
"github.com/cs3org/reva/pkg/trace"
"github.com/google/uuid"
"github.com/pkg/errors"
"go.opentelemetry.io/otel/trace"
)

const (
Expand Down Expand Up @@ -243,8 +243,7 @@ func (c *Client) executeEOS(ctx context.Context, cmdArgs []string, auth eosclien

cmd.Args = append(cmd.Args, cmdArgs...)

span := trace.SpanFromContext(ctx)
cmd.Args = append(cmd.Args, "--comment", span.SpanContext().TraceID().String())
cmd.Args = append(cmd.Args, "--comment", trace.Get(ctx))

err := cmd.Run()

Expand Down

0 comments on commit 46d37fa

Please sign in to comment.