forked from TrueCloudLab/frostfs-node
[#146] node: Add trace_id to logs
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
b8c3c2486d
commit
c1e4130020
24 changed files with 129 additions and 41 deletions
|
@ -22,6 +22,7 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/internal"
|
||||
svcutil "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object_manager/placement"
|
||||
tracingPkg "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/tracing"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/tracing"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/checksum"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
|
@ -242,8 +243,7 @@ func (s *Service) redirectPutSingleRequest(ctx context.Context,
|
|||
info.AddressGroup().IterateAddresses(func(addr network.Address) (stop bool) {
|
||||
ctx, span := tracing.StartSpanFromContext(ctx, "putService.redirectPutSingleRequest.IterateAddresses",
|
||||
trace.WithAttributes(
|
||||
attribute.String("address", addr.String()),
|
||||
))
|
||||
attribute.String("address", addr.String())))
|
||||
defer span.End()
|
||||
|
||||
var err error
|
||||
|
@ -257,6 +257,7 @@ func (s *Service) redirectPutSingleRequest(ctx context.Context,
|
|||
zap.Stringer("address", addr),
|
||||
zap.Stringer("object_id", objID),
|
||||
zap.Stringer("container_id", cnrID),
|
||||
zap.String("trace_id", tracingPkg.GetTraceID(ctx)),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue