forked from TrueCloudLab/frostfs-node
[#1589] client: Add missing tracing spans
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
defb9dc797
commit
6d3a0a75a6
1 changed files with 12 additions and 0 deletions
|
@ -144,6 +144,9 @@ func (x GetObjectRes) Object() *objectSDK.Object {
|
||||||
//
|
//
|
||||||
// GetObject ignores the provided session if it is not related to the requested objectSDK.
|
// GetObject ignores the provided session if it is not related to the requested objectSDK.
|
||||||
func GetObject(ctx context.Context, prm GetObjectPrm) (*GetObjectRes, error) {
|
func GetObject(ctx context.Context, prm GetObjectPrm) (*GetObjectRes, error) {
|
||||||
|
ctx, span := tracing.StartSpanFromContext(ctx, "client.HeadObject")
|
||||||
|
defer span.End()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil, ctx.Err()
|
return nil, ctx.Err()
|
||||||
|
@ -244,6 +247,9 @@ func (x HeadObjectRes) Header() *objectSDK.Object {
|
||||||
//
|
//
|
||||||
// HeadObject ignores the provided session if it is not related to the requested objectSDK.
|
// HeadObject ignores the provided session if it is not related to the requested objectSDK.
|
||||||
func HeadObject(ctx context.Context, prm HeadObjectPrm) (*HeadObjectRes, error) {
|
func HeadObject(ctx context.Context, prm HeadObjectPrm) (*HeadObjectRes, error) {
|
||||||
|
ctx, span := tracing.StartSpanFromContext(ctx, "client.HeadObject")
|
||||||
|
defer span.End()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil, ctx.Err()
|
return nil, ctx.Err()
|
||||||
|
@ -345,6 +351,9 @@ const maxInitialBufferSize = 1024 * 1024 // 1 MiB
|
||||||
//
|
//
|
||||||
// PayloadRange ignores the provided session if it is not related to the requested objectSDK.
|
// PayloadRange ignores the provided session if it is not related to the requested objectSDK.
|
||||||
func PayloadRange(ctx context.Context, prm PayloadRangePrm) (*PayloadRangeRes, error) {
|
func PayloadRange(ctx context.Context, prm PayloadRangePrm) (*PayloadRangeRes, error) {
|
||||||
|
ctx, span := tracing.StartSpanFromContext(ctx, "client.PayloadRange")
|
||||||
|
defer span.End()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil, ctx.Err()
|
return nil, ctx.Err()
|
||||||
|
@ -535,6 +544,9 @@ func (x SearchObjectsRes) IDList() []oid.ID {
|
||||||
//
|
//
|
||||||
// Returns any error which prevented the operation from completing correctly in error return.
|
// Returns any error which prevented the operation from completing correctly in error return.
|
||||||
func SearchObjects(ctx context.Context, prm SearchObjectsPrm) (*SearchObjectsRes, error) {
|
func SearchObjects(ctx context.Context, prm SearchObjectsPrm) (*SearchObjectsRes, error) {
|
||||||
|
ctx, span := tracing.StartSpanFromContext(ctx, "client.SearchObjects")
|
||||||
|
defer span.End()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil, ctx.Err()
|
return nil, ctx.Err()
|
||||||
|
|
Loading…
Reference in a new issue