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:
Sanket Sudake
2022-07-12 14:52:17 +05:30
committed by GitHub
parent 7838debadf
commit 899e6e96d6
35 changed files with 66 additions and 321 deletions
+2 -9
View File
@@ -24,7 +24,6 @@ import (
"strings"
"github.com/gorilla/mux"
"go.opencensus.io/plugin/ochttp"
"go.uber.org/zap"
apiv1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
@@ -270,14 +269,8 @@ func (api *API) GetHandler() http.Handler {
return r
}
func (api *API) Serve(ctx context.Context, port int, openTracingEnabled bool) {
var handler http.Handler
if openTracingEnabled {
handler = &ochttp.Handler{Handler: api.GetHandler()}
} else {
handler = otel.GetHandlerWithOTEL(api.GetHandler(), "fission-controller", otel.UrlsToIgnore("/healthz"))
}
func (api *API) Serve(ctx context.Context, port int) {
handler := otel.GetHandlerWithOTEL(api.GetHandler(), "fission-controller", otel.UrlsToIgnore("/healthz"))
go metrics.ServeMetrics(ctx, api.logger)
httpserver.StartServer(ctx, api.logger, "controller", fmt.Sprintf("%d", port), handler)
}
+1 -1
View File
@@ -377,7 +377,7 @@ func TestMain(m *testing.M) {
panicIf(err)
ctx := context.Background()
go Start(ctx, logger, 8888, true, true)
go Start(ctx, logger, 8888, true)
time.Sleep(5 * time.Second)
+2 -2
View File
@@ -24,7 +24,7 @@ import (
"github.com/fission/fission/pkg/crd"
)
func Start(ctx context.Context, logger *zap.Logger, port int, unitTestFlag bool, openTracingEnabled bool) {
func Start(ctx context.Context, logger *zap.Logger, port int, unitTestFlag bool) {
cLogger := logger.Named("controller")
fc, kc, apiExtClient, _, err := crd.MakeFissionClient()
@@ -51,5 +51,5 @@ func Start(ctx context.Context, logger *zap.Logger, port int, unitTestFlag bool,
if err != nil {
cLogger.Fatal("failed to start controller", zap.Error(err))
}
api.Serve(ctx, port, openTracingEnabled)
api.Serve(ctx, port)
}