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:
@@ -10,14 +10,12 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"go.opencensus.io/plugin/ochttp"
|
||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
|
||||
ferror "github.com/fission/fission/pkg/error"
|
||||
"github.com/fission/fission/pkg/fetcher"
|
||||
"github.com/fission/fission/pkg/utils/tracing"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -29,13 +27,7 @@ type (
|
||||
)
|
||||
|
||||
func MakeClient(logger *zap.Logger, fetcherUrl string) *Client {
|
||||
var hc *http.Client
|
||||
if tracing.TracingEnabled(logger) {
|
||||
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{
|
||||
logger: logger.Named("fetcher_client"),
|
||||
url: strings.TrimSuffix(fetcherUrl, "/"),
|
||||
|
||||
@@ -34,8 +34,6 @@ type Config struct {
|
||||
sharedCfgMapPath string
|
||||
|
||||
serviceAccount string
|
||||
|
||||
jaegerCollectorEndpoint string
|
||||
}
|
||||
|
||||
func getFetcherResources() (apiv1.ResourceRequirements, error) {
|
||||
@@ -82,14 +80,13 @@ func MakeFetcherConfig(sharedMountPath string) (*Config, error) {
|
||||
}
|
||||
|
||||
return &Config{
|
||||
resourceRequirements: resources,
|
||||
fetcherImage: fetcherImage,
|
||||
fetcherImagePullPolicy: utils.GetImagePullPolicy(fetcherImagePullPolicy),
|
||||
sharedMountPath: sharedMountPath,
|
||||
sharedSecretPath: "/secrets",
|
||||
sharedCfgMapPath: "/configs",
|
||||
jaegerCollectorEndpoint: os.Getenv("TRACE_JAEGER_COLLECTOR_ENDPOINT"),
|
||||
serviceAccount: fv1.FissionFetcherSA,
|
||||
resourceRequirements: resources,
|
||||
fetcherImage: fetcherImage,
|
||||
fetcherImagePullPolicy: utils.GetImagePullPolicy(fetcherImagePullPolicy),
|
||||
sharedMountPath: sharedMountPath,
|
||||
sharedSecretPath: "/secrets",
|
||||
sharedCfgMapPath: "/configs",
|
||||
serviceAccount: fv1.FissionFetcherSA,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -169,7 +166,6 @@ func (cfg *Config) fetcherCommand(extraArgs ...string) []string {
|
||||
command := []string{"/fetcher",
|
||||
"-secret-dir", cfg.sharedSecretPath,
|
||||
"-cfgmap-dir", cfg.sharedCfgMapPath,
|
||||
"-jaeger-collector-endpoint", cfg.jaegerCollectorEndpoint,
|
||||
}
|
||||
|
||||
command = append(command, extraArgs...)
|
||||
|
||||
@@ -31,7 +31,6 @@ import (
|
||||
"github.com/mholt/archiver/v3"
|
||||
"github.com/pkg/errors"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"go.opencensus.io/plugin/ochttp"
|
||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
@@ -53,7 +52,6 @@ import (
|
||||
storageSvcClient "github.com/fission/fission/pkg/storagesvc/client"
|
||||
"github.com/fission/fission/pkg/utils"
|
||||
otelUtils "github.com/fission/fission/pkg/utils/otel"
|
||||
"github.com/fission/fission/pkg/utils/tracing"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -107,13 +105,7 @@ func MakeFetcher(logger *zap.Logger, sharedVolumePath string, sharedSecretPath s
|
||||
return nil, errors.Wrap(err, "error reading pod namespace from downward volume")
|
||||
}
|
||||
|
||||
var hc *http.Client
|
||||
if tracing.TracingEnabled(logger) {
|
||||
hc = &http.Client{Transport: &ochttp.Transport{}}
|
||||
} else {
|
||||
hc = &http.Client{Transport: otelhttp.NewTransport(http.DefaultTransport)}
|
||||
}
|
||||
|
||||
hc := &http.Client{Transport: otelhttp.NewTransport(http.DefaultTransport)}
|
||||
return &Fetcher{
|
||||
logger: fLogger,
|
||||
sharedVolumePath: sharedVolumePath,
|
||||
|
||||
Reference in New Issue
Block a user