MM-26834 - Move opentracing into a separate package (#15011)

Этот коммит содержится в:
Eli Yukelzon
2020-07-15 12:59:11 +03:00
коммит произвёл GitHub
родитель ef63afac21
Коммит b15c0484c6
5 изменённых файлов: 63 добавлений и 41 удалений

Просмотреть файл

@@ -15,16 +15,16 @@ import (
"time"
"github.com/NYTimes/gziphandler"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
spanlog "github.com/opentracing/opentracing-go/log"
"github.com/mattermost/mattermost-server/v5/app"
app_opentracing "github.com/mattermost/mattermost-server/v5/app/opentracing"
"github.com/mattermost/mattermost-server/v5/mlog"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/mattermost/mattermost-server/v5/services/tracing"
"github.com/mattermost/mattermost-server/v5/store"
"github.com/mattermost/mattermost-server/v5/utils"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
spanlog "github.com/opentracing/opentracing-go/log"
)
func GetHandlerName(h func(*Context, http.ResponseWriter, *http.Request)) string {
@@ -140,7 +140,7 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
tmpSrv = *c.App.Srv()
tmpSrv.Store = store.NewOpenTracingLayer(c.App.Srv().Store, ctx)
c.App.SetServer(&tmpSrv)
c.App = app.NewOpenTracingAppLayer(c.App, ctx)
c.App = app_opentracing.NewOpenTracingAppLayer(c.App, ctx)
}
// Set the max request body size to be equal to MaxFileSize.