Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

propagate trace to EOS #4510

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading