cleanup: Remove Opentracing support as no active users (#2196)
References: [1] #2193 [2] https://fissionio.slack.com/archives/C3LUX6BBP/p1631706812069300 Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -29,12 +29,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"go.opencensus.io/plugin/ochttp"
|
||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
|
||||
"github.com/fission/fission/pkg/storagesvc"
|
||||
"github.com/fission/fission/pkg/utils/tracing"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -46,12 +44,7 @@ type (
|
||||
|
||||
// Client creates a storage service client.
|
||||
func MakeClient(url string) *Client {
|
||||
var hc *http.Client
|
||||
if tracing.TracingEnabled(nil) {
|
||||
hc = &http.Client{Transport: &ochttp.Transport{}}
|
||||
} else {
|
||||
hc = &http.Client{Transport: otelhttp.NewTransport(http.DefaultTransport)}
|
||||
}
|
||||
hc := &http.Client{Transport: otelhttp.NewTransport(http.DefaultTransport)}
|
||||
return &Client{
|
||||
url: strings.TrimSuffix(url, "/") + "/v1",
|
||||
httpClient: hc,
|
||||
|
||||
@@ -138,7 +138,7 @@ func TestS3StorageService(t *testing.T) {
|
||||
storage := storagesvc.NewS3Storage()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
_ = storagesvc.Start(ctx, logger, storage, port, true)
|
||||
_ = storagesvc.Start(ctx, logger, storage, port)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
client := MakeClient(fmt.Sprintf("http://localhost:%v/", 8081))
|
||||
@@ -216,7 +216,7 @@ func TestLocalStorageService(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
os.Setenv("METRICS_ADDR", "8083")
|
||||
_ = storagesvc.Start(ctx, logger, storage, port, true)
|
||||
_ = storagesvc.Start(ctx, logger, storage, port)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
client := MakeClient(fmt.Sprintf("http://localhost:%v/", port))
|
||||
|
||||
Reference in New Issue
Block a user