Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

cmd/swarm/swarm-smoke: timeout flag #1041

Closed
wants to merge 45 commits into from
Closed

Conversation

nonsense
Copy link
Contributor

@nonsense nonsense commented Dec 3, 2018

No description provided.

Copy link
Contributor

@holisticode holisticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically looks good to me, just a couple of observations we can discuss about

cmd/swarm/swarm-smoke/main.go Show resolved Hide resolved
cmd/swarm/swarm-smoke/main.go Outdated Show resolved Hide resolved
metrics/influxdb/influxdb.go Outdated Show resolved Hide resolved
@@ -489,6 +502,17 @@ func (c *Client) TarUpload(hash string, uploader Uploader, defaultPath string, t
if err != nil {
return "", err
}

opentracing.GlobalTracer().Inject(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justelad I don't like this, because users might also use this client - we don't want opentracing headers to be added always.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we get rid of this opentracing from here, so that we can merge this PR as it is, because it is getting large.

opentracing.HTTPHeaders,
opentracing.HTTPHeadersCarrier(req.Header))

trace := GetClientTrace("swarm api client - upload tar", "swarm.api.client.uploadtar", uuid.New()[:8], &tn)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove swarm. We are adding the prefix as part of the reporter.

@@ -474,6 +482,11 @@ type UploadFn func(file *File) error
// TarUpload uses the given Uploader to upload files to swarm as a tar stream,
// returning the resulting manifest hash
func (c *Client) TarUpload(hash string, uploader Uploader, defaultPath string, toEncrypt bool) (string, error) {
ctx, sp := spancontext.StartSpan(context.Background(), "swarm.api.client.tarupload")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove swarm.

@@ -728,3 +752,57 @@ func (c *Client) GetFeedRequest(query *feed.Query, manifestAddressOrDomain strin
}
return &metadata, nil
}

func GetClientTrace(traceMsg, metricPrefix, ruid string, tn *time.Time) *httptrace.ClientTrace {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove fetch and clienttrace prefixes - these can be added to metricsPrefix if needed.

@frncmx frncmx self-requested a review December 10, 2018 11:56
Copy link
Contributor

@frncmx frncmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm if @nonsense comment's addressed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants