From d58e0e8d0a45419db9e06142ce15caf09081cbe8 Mon Sep 17 00:00:00 2001 From: Reginald McDonald <40721169+reggiemcdonald@users.noreply.github.com> Date: Mon, 17 Aug 2020 21:39:48 -0600 Subject: [PATCH] feat: Add integration for github.com/astaxie/beego (#200) * feat: added beego integration configuration options * feat: added beego middleware * feat: added doc * chore: add readme * fix: test cases * fix: use json in test case * chore: update comments * fix: parameter name to clarify purpose * chore: add additional unit tests * fix: linting * feat: add additional test cases for http * feat: add ability to race template render * chore: update readme * fix: typos * fix: test case and go version * fix: make test cases consistent * fix: replace beego instance each test * fix: address pr to switch config to use providers * fix: address pr feedback by removing unecessary documentation in readme * fix: reduce cardinality of span names by using route template * fix: remove readme and add example * fix: update comment * fix: add comment and update mod * chore: update changelog --- CHANGELOG.md | 1 + .../github.com/astaxie/beego/beego.go | 153 +++++ .../github.com/astaxie/beego/beego_test.go | 590 ++++++++++++++++++ .../github.com/astaxie/beego/common.go | 58 ++ .../github.com/astaxie/beego/config.go | 108 ++++ .../github.com/astaxie/beego/doc.go | 18 + .../astaxie/beego/example_middleware_test.go | 49 ++ .../github.com/astaxie/beego/go.mod | 19 + .../github.com/astaxie/beego/go.sum | 258 ++++++++ 9 files changed, 1254 insertions(+) create mode 100644 instrumentation/github.com/astaxie/beego/beego.go create mode 100644 instrumentation/github.com/astaxie/beego/beego_test.go create mode 100644 instrumentation/github.com/astaxie/beego/common.go create mode 100644 instrumentation/github.com/astaxie/beego/config.go create mode 100644 instrumentation/github.com/astaxie/beego/doc.go create mode 100644 instrumentation/github.com/astaxie/beego/example_middleware_test.go create mode 100644 instrumentation/github.com/astaxie/beego/go.mod create mode 100644 instrumentation/github.com/astaxie/beego/go.sum diff --git a/CHANGELOG.md b/CHANGELOG.md index f3263276fc9..b18e549e97e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added - Top-level `Version()` and `SemVersion()` functions defining the current version of the contrib package. (#225) +- Instrumentation for the `github.com/astaxie/beego` package. (#200) ### Changed diff --git a/instrumentation/github.com/astaxie/beego/beego.go b/instrumentation/github.com/astaxie/beego/beego.go new file mode 100644 index 00000000000..caf4fd4e620 --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/beego.go @@ -0,0 +1,153 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package beego + +import ( + "context" + "net/http" + + "google.golang.org/grpc/codes" + + otelhttp "go.opentelemetry.io/contrib/instrumentation/net/http" + "go.opentelemetry.io/otel/api/trace" + + "github.com/astaxie/beego" +) + +// OTelBeegoHandler implements the http.Handler interface and provides +// trace and metrics to beego web apps. +type OTelBeegoHandler struct { + http.Handler +} + +// ServerHTTP calls the configured handler to serve HTTP for req to rr. +func (o *OTelBeegoHandler) ServeHTTP(rr http.ResponseWriter, req *http.Request) { + ctx := beego.BeeApp.Handlers.GetContext() + defer beego.BeeApp.Handlers.GiveBackContext(ctx) + ctx.Reset(rr, req) + // use the beego context to try to find a route template + if router, found := beego.BeeApp.Handlers.FindRouter(ctx); found { + // if found, save it to the context + reqCtx := context.WithValue(req.Context(), ctxRouteTemplateKey, router.GetPattern()) + req = req.WithContext(reqCtx) + } + o.Handler.ServeHTTP(rr, req) +} + +// defaultSpanNameFormatter is the default formatter for spans created with the beego +// integration. Returns the route path template, or the URL path if the current path +// is not associated with a router. +func defaultSpanNameFormatter(operation string, req *http.Request) string { + if val := req.Context().Value(ctxRouteTemplateKey); val != nil { + str, ok := val.(string) + if ok { + return str + } + } + return req.Method +} + +// NewOTelBeegoMiddleWare creates a MiddleWare that provides OpenTelemetry +// tracing and metrics to a Beego web app. +// Parameter service should describe the name of the (virtual) server handling the request. +// The OTelBeegoMiddleWare can be configured using the provided Options. +func NewOTelBeegoMiddleWare(service string, options ...Option) beego.MiddleWare { + cfg := configure(options...) + + httpOptions := []otelhttp.Option{ + otelhttp.WithTracer(cfg.traceProvider.Tracer(packageName)), + otelhttp.WithMeter(cfg.meterProvider.Meter(packageName)), + otelhttp.WithPropagators(cfg.propagators), + } + + for _, f := range cfg.filters { + httpOptions = append( + httpOptions, + otelhttp.WithFilter(otelhttp.Filter(f)), + ) + } + + if cfg.formatter != nil { + httpOptions = append(httpOptions, otelhttp.WithSpanNameFormatter(cfg.formatter)) + } + + return func(handler http.Handler) http.Handler { + return &OTelBeegoHandler{ + otelhttp.NewHandler( + handler, + service, + httpOptions..., + ), + } + } +} + +// Render traces beego.Controller.Render. Use this function +// if you want to add a child span for the rendering of a template file. +// Disable autorender before use, and call this function explicitly. +func Render(c *beego.Controller) error { + ctx, span := span(c, renderTemplateSpanName) + defer span.End() + err := c.Render() + if err != nil { + span.RecordError(ctx, err) + span.SetStatus(codes.Internal, "template failure") + } + return err +} + +// RenderString traces beego.Controller.RenderString. Use this function +// if you want to add a child span for the rendering of a template file to +// its string representation. +// Disable autorender before use, and call this function explicitly. +func RenderString(c *beego.Controller) (string, error) { + ctx, span := span(c, renderStringSpanName) + defer span.End() + str, err := c.RenderString() + if err != nil { + span.RecordError(ctx, err) + span.SetStatus(codes.Internal, "render string failure") + } + return str, err +} + +// RenderBytes traces beego.Controller.RenderBytes. Use this function if +// you want to add a child span for the rendering of a template file to its +// byte representation. +// Disable autorender before use, and call this function explicitly. +func RenderBytes(c *beego.Controller) ([]byte, error) { + ctx, span := span(c, renderBytesSpanName) + defer span.End() + bytes, err := c.RenderBytes() + if err != nil { + span.RecordError(ctx, err) + span.SetStatus(codes.Internal, "render bytes failure") + } + return bytes, err +} + +func span(c *beego.Controller, spanName string) (context.Context, trace.Span) { + ctx := c.Ctx.Request.Context() + span := trace.SpanFromContext(ctx) + tracer := span.Tracer() + return tracer.Start( + ctx, + spanName, + trace.WithAttributes( + Template(c.TplName), + ), + ) + +} diff --git a/instrumentation/github.com/astaxie/beego/beego_test.go b/instrumentation/github.com/astaxie/beego/beego_test.go new file mode 100644 index 00000000000..58bd4d1757d --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/beego_test.go @@ -0,0 +1,590 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package beego + +import ( + "context" + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "net/http/httptest" + "os" + "path/filepath" + "strings" + "testing" + + "go.opentelemetry.io/otel/api/global" + "go.opentelemetry.io/otel/api/kv" + prop "go.opentelemetry.io/otel/api/propagation" + "go.opentelemetry.io/otel/api/standard" + "go.opentelemetry.io/otel/api/trace" + + "github.com/stretchr/testify/require" + + "github.com/astaxie/beego" + beegoCtx "github.com/astaxie/beego/context" + + mockmeter "go.opentelemetry.io/contrib/internal/metric" + mocktrace "go.opentelemetry.io/contrib/internal/trace" +) + +// ------------------------------------------ Mock Trace Provider + +type MockTraceProvider struct { + tracer *mocktrace.Tracer +} + +func (m *MockTraceProvider) Tracer(name string, options ...trace.TracerOption) trace.Tracer { + return m.tracer +} + +func NewTraceProvider() *MockTraceProvider { + return &MockTraceProvider{ + tracer: mocktrace.NewTracer(packageName), + } +} + +// ------------------------------------------ Test Controller + +const defaultReply = "hello world" + +var tplName = "" + +type testReply struct { + Message string `json:"message"` + Err string `json:"error"` +} + +type testController struct { + beego.Controller + T *testing.T +} + +func (c *testController) Get() { + reply := &testReply{ + Message: defaultReply, + } + c.Data["json"] = reply + c.ServeJSON() +} + +func (c *testController) Post() { + name := c.GetString("name") + var reply *testReply + if name == "" { + c.Ctx.ResponseWriter.WriteHeader(http.StatusBadRequest) + reply = &testReply{ + Err: "missing query param \"name\"", + } + } else { + reply = &testReply{ + Message: fmt.Sprintf("%s said hello.", name), + } + } + c.Data["json"] = reply + c.ServeJSON() +} + +func (c *testController) Delete() { + reply := &testReply{ + Message: "success", + } + c.Ctx.ResponseWriter.WriteHeader(http.StatusAccepted) + c.Data["json"] = reply + c.ServeJSON() +} + +func (c *testController) Put() { + reply := &testReply{ + Message: "successfully put", + } + c.Ctx.ResponseWriter.WriteHeader(http.StatusAccepted) + c.Data["json"] = reply + c.ServeJSON() +} + +func (c *testController) TemplateRender() { + c.TplName = tplName + c.Data["name"] = "test" + require.NoError(c.T, Render(&c.Controller)) +} + +func (c *testController) TemplateRenderString() { + c.TplName = tplName + c.Data["name"] = "test" + str, err := RenderString(&c.Controller) + require.NoError(c.T, err) + c.Ctx.WriteString(str) +} + +func (c *testController) TemplateRenderBytes() { + c.TplName = tplName + c.Data["name"] = "test" + bytes, err := RenderBytes(&c.Controller) + require.NoError(c.T, err) + _, err = c.Ctx.ResponseWriter.Write(bytes) + require.NoError(c.T, err) +} + +func addTestRoutes(t *testing.T) { + controller := &testController{ + T: t, + } + beego.Router("/", controller) + beego.Router("/:id", controller) + beego.Router("/greet", controller) + beego.Router("/template/render", controller, "get:TemplateRender") + beego.Router("/template/renderstring", controller, "get:TemplateRenderString") + beego.Router("/template/renderbytes", controller, "get:TemplateRenderBytes") + router := beego.NewNamespace("/api", + beego.NSNamespace("/v1", + beego.NSRouter("/", controller), + beego.NSRouter("/:id", controller), + beego.NSRouter("/greet", controller), + ), + ) + beego.AddNamespace(router) +} + +func replaceBeego() { + beego.BeeApp = beego.NewApp() +} + +// ------------------------------------------ Unit Tests + +func TestHandler(t *testing.T) { + for _, tcase := range testCases { + tc := *tcase + t.Run(tc.name, func(t *testing.T) { + runTest(t, &tc, "http://localhost") + }) + } +} + +func TestHandlerWithNamespace(t *testing.T) { + for _, tcase := range testCases { + tc := *tcase + t.Run(tc.name, func(t *testing.T) { + // if using default span name, change name to NS path + if tc.expectedSpanName != customSpanName { + tc.expectedSpanName = fmt.Sprintf("/api/v1%s", tc.expectedSpanName) + } + runTest(t, &tc, "http://localhost/api/v1") + }) + } +} + +func TestWithFilters(t *testing.T) { + for _, tcase := range testCases { + tc := *tcase + t.Run(tc.name, func(t *testing.T) { + wasCalled := false + beego.InsertFilter("/*", beego.BeforeRouter, func(ctx *beegoCtx.Context) { + wasCalled = true + }) + runTest(t, &tc, "http://localhost") + require.True(t, wasCalled) + }) + } +} + +func TestSpanFromContextDefaultProvider(t *testing.T) { + defer replaceBeego() + _, provider := mockmeter.NewProvider() + global.SetMeterProvider(provider) + global.SetTraceProvider(NewTraceProvider()) + router := beego.NewControllerRegister() + router.Get("/hello-with-span", func(ctx *beegoCtx.Context) { + assertSpanFromContext(ctx.Request.Context(), t) + ctx.ResponseWriter.WriteHeader(http.StatusAccepted) + }) + + rr := httptest.NewRecorder() + req, err := http.NewRequest(http.MethodGet, "http://localhost/hello-with-span", nil) + require.NoError(t, err) + + mw := NewOTelBeegoMiddleWare(middleWareName) + + mw(router).ServeHTTP(rr, req) + + require.Equal(t, http.StatusAccepted, rr.Result().StatusCode) +} + +func TestSpanFromContextCustomProvider(t *testing.T) { + defer replaceBeego() + _, provider := mockmeter.NewProvider() + router := beego.NewControllerRegister() + router.Get("/hello-with-span", func(ctx *beegoCtx.Context) { + assertSpanFromContext(ctx.Request.Context(), t) + ctx.ResponseWriter.WriteHeader(http.StatusAccepted) + }) + + rr := httptest.NewRecorder() + req, err := http.NewRequest(http.MethodGet, "http://localhost/hello-with-span", nil) + require.NoError(t, err) + + mw := NewOTelBeegoMiddleWare( + middleWareName, + WithTraceProvider(NewTraceProvider()), + WithMeterProvider(provider), + ) + + mw(router).ServeHTTP(rr, req) + + require.Equal(t, http.StatusAccepted, rr.Result().StatusCode) +} + +func TestStatic(t *testing.T) { + defer replaceBeego() + traceProvider := NewTraceProvider() + meterimpl, meterProvider := mockmeter.NewProvider() + file, err := ioutil.TempFile("", "static-*.html") + require.NoError(t, err) + defer os.Remove(file.Name()) + _, err = file.WriteString(beego.Htmlunquote("

Hello, world!

")) + require.NoError(t, err) + + beego.SetStaticPath("/", file.Name()) + defer beego.SetStaticPath("/", "") + + mw := NewOTelBeegoMiddleWare(middleWareName, + WithTraceProvider(traceProvider), + WithMeterProvider(meterProvider), + ) + + rr := httptest.NewRecorder() + req, err := http.NewRequest(http.MethodGet, "http://localhost/", nil) + require.NoError(t, err) + mw(beego.BeeApp.Handlers).ServeHTTP(rr, req) + tc := &testCase{ + expectedSpanName: "GET", + expectedAttributes: defaultAttributes(), + } + + require.Equal(t, http.StatusOK, rr.Result().StatusCode) + body, err := ioutil.ReadAll(rr.Result().Body) + require.NoError(t, err) + require.Equal(t, "

Hello, world!

", string(body)) + spans := traceProvider.tracer.EndedSpans() + require.Len(t, spans, 1) + assertSpan(t, spans[0], tc) + assertMetrics(t, meterimpl.MeasurementBatches, tc) +} + +func TestRender(t *testing.T) { + // Disable autorender to enable traced render + beego.BConfig.WebConfig.AutoRender = false + addTestRoutes(t) + defer replaceBeego() + htmlStr := "" + + "Hello World" + + "This is a template test. Hello {{.name}}" + + // Create a temp directory to hold a view + dir, err := ioutil.TempDir(".", "views") + defer os.RemoveAll(dir) + require.NoError(t, err) + + // Create the view + file, err := ioutil.TempFile("./"+dir, "*index.tpl") + require.NoError(t, err) + _, err = file.WriteString(htmlStr) + require.NoError(t, err) + // Add path to view path + require.NoError(t, beego.AddViewPath(dir)) + beego.SetViewsPath(dir) + _, tplName = filepath.Split(file.Name()) + + traceProvider := NewTraceProvider() + + mw := NewOTelBeegoMiddleWare( + middleWareName, + WithTraceProvider(traceProvider), + ) + for _, str := range []string{"/render", "/renderstring", "/renderbytes"} { + rr := httptest.NewRecorder() + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("http://localhost/template%s", str), nil) + require.NoError(t, err) + mw(beego.BeeApp.Handlers).ServeHTTP(rr, req) + body, err := ioutil.ReadAll(rr.Result().Body) + require.Equal(t, strings.Replace(htmlStr, "{{.name}}", "test", 1), string(body)) + require.NoError(t, err) + } + + spans := traceProvider.tracer.EndedSpans() + require.Len(t, spans, 6) // 3 HTTP requests, each creating 2 spans + for _, span := range spans { + switch span.Name { + case "/template/render": + case "/template/renderstring": + case "/template/renderbytes": + continue + case renderTemplateSpanName: + require.Equal(t, tplName, span.Attributes[templateKey].AsString()) + case renderStringSpanName: + require.Equal(t, tplName, span.Attributes[templateKey].AsString()) + case renderBytesSpanName: + require.Equal(t, tplName, span.Attributes[templateKey].AsString()) + default: + t.Fatal("unexpected span name") + } + } +} + +// ------------------------------------------ Utilities + +func runTest(t *testing.T, tc *testCase, url string) { + traceProvider := NewTraceProvider() + meterimpl, meterProvider := mockmeter.NewProvider() + addTestRoutes(t) + defer replaceBeego() + + rr := httptest.NewRecorder() + req, err := http.NewRequest( + tc.method, + fmt.Sprintf("%s%s", url, tc.path), + nil, + ) + require.NoError(t, err) + + tc.expectedAttributes = append(tc.expectedAttributes, defaultAttributes()...) + + mw := NewOTelBeegoMiddleWare( + middleWareName, + append( + tc.options, + WithTraceProvider(traceProvider), + WithMeterProvider(meterProvider), + )..., + ) + + mw(beego.BeeApp.Handlers).ServeHTTP(rr, req) + + require.Equal(t, tc.expectedHTTPStatus, rr.Result().StatusCode) + body, err := ioutil.ReadAll(rr.Result().Body) + require.NoError(t, err) + message := testReply{} + require.NoError(t, json.Unmarshal(body, &message)) + require.Equal(t, tc.expectedResponse, message) + + spans := traceProvider.tracer.EndedSpans() + if tc.hasSpan { + require.Len(t, spans, 1) + assertSpan(t, spans[0], tc) + } else { + require.Len(t, spans, 0) + } + assertMetrics(t, meterimpl.MeasurementBatches, tc) +} + +func defaultAttributes() []kv.KeyValue { + return []kv.KeyValue{ + standard.HTTPServerNameKey.String(middleWareName), + standard.HTTPSchemeHTTP, + standard.HTTPHostKey.String("localhost"), + } +} + +func assertSpan(t *testing.T, span *mocktrace.Span, tc *testCase) { + require.Equal(t, tc.expectedSpanName, span.Name) + for _, att := range tc.expectedAttributes { + require.Equal(t, att.Value.AsInterface(), span.Attributes[att.Key].AsInterface()) + } +} + +func assertMetrics(t *testing.T, batches []mockmeter.Batch, tc *testCase) { + for _, batch := range batches { + for _, att := range tc.expectedAttributes { + require.Contains(t, batch.Labels, att) + } + } +} + +func assertSpanFromContext(ctx context.Context, t *testing.T) { + span := trace.SpanFromContext(ctx) + _, ok := span.(*mocktrace.Span) + require.True(t, ok) + spanTracer := span.Tracer() + mockTracer, ok := spanTracer.(*mocktrace.Tracer) + require.True(t, ok) + require.Equal(t, packageName, mockTracer.Name) +} + +// ------------------------------------------ Test Cases + +const middleWareName = "test-router" + +const customSpanName = "Test span name" + +type testCase struct { + name string + method string + path string + options []Option + hasSpan bool + expectedSpanName string + expectedHTTPStatus int + expectedResponse testReply + expectedAttributes []kv.KeyValue +} + +var testCases = []*testCase{ + { + name: "GET/__All default options", + method: http.MethodGet, + path: "/", + options: []Option{}, + hasSpan: true, + expectedSpanName: "/", + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: defaultReply}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "GET/1__All default options", + method: http.MethodGet, + path: "/1", + options: []Option{}, + hasSpan: true, + expectedSpanName: "/:id", + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: defaultReply}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "POST/greet?name=test__All default options", + method: http.MethodPost, + path: "/greet?name=test", + options: []Option{}, + hasSpan: true, + expectedSpanName: "/greet", + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: "test said hello."}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "DELETE/__All default options", + method: http.MethodDelete, + path: "/", + options: []Option{}, + hasSpan: true, + expectedSpanName: "/", + expectedHTTPStatus: http.StatusAccepted, + expectedResponse: testReply{Message: "success"}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "PUT/__All default options", + method: http.MethodPut, + path: "/", + options: []Option{}, + hasSpan: true, + expectedSpanName: "/", + expectedHTTPStatus: http.StatusAccepted, + expectedResponse: testReply{Message: "successfully put"}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "GET/__Custom propagators", + method: http.MethodGet, + path: "/", + options: []Option{ + WithPropagators(prop.New( + prop.WithExtractors(trace.B3{}), + prop.WithInjectors(trace.B3{}), + )), + }, + hasSpan: true, + expectedSpanName: "/", + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: defaultReply}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "GET/__Custom filter filtering route", + method: http.MethodGet, + path: "/", + options: []Option{ + WithFilter(Filter(func(req *http.Request) bool { + return req.URL.Path != "/" + })), + WithFilter(Filter(func(req *http.Request) bool { + return req.URL.Path != "/api/v1/" + })), + }, + hasSpan: false, + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: defaultReply}, + }, + { + name: "GET/__Custom filter not filtering route", + method: http.MethodGet, + path: "/", + options: []Option{ + WithFilter(Filter(func(req *http.Request) bool { + return req.URL.Path != "/greet" + })), + }, + hasSpan: true, + expectedSpanName: "/", + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: defaultReply}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "POST/greet__Default options, bad request", + method: http.MethodPost, + path: "/greet", + options: []Option{}, + hasSpan: true, + expectedSpanName: "/greet", + expectedHTTPStatus: http.StatusBadRequest, + expectedResponse: testReply{Err: "missing query param \"name\""}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "POST/greet?name=test__Custom span name formatter", + method: http.MethodPost, + path: "/greet?name=test", + options: []Option{ + WithSpanNameFormatter(SpanNameFormatter(func(opp string, req *http.Request) string { + return customSpanName + })), + }, + hasSpan: true, + expectedSpanName: customSpanName, + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: "test said hello."}, + expectedAttributes: []kv.KeyValue{}, + }, + { + name: "POST/greet?name=test__Custom span name formatter and custom filter", + method: http.MethodPost, + path: "/greet?name=test", + options: []Option{ + WithFilter(Filter(func(req *http.Request) bool { + return !strings.Contains(req.URL.Path, "greet") + })), + WithSpanNameFormatter(SpanNameFormatter(func(opp string, req *http.Request) string { + return customSpanName + })), + }, + hasSpan: false, + expectedHTTPStatus: http.StatusOK, + expectedResponse: testReply{Message: "test said hello."}, + expectedAttributes: []kv.KeyValue{}, + }, +} diff --git a/instrumentation/github.com/astaxie/beego/common.go b/instrumentation/github.com/astaxie/beego/common.go new file mode 100644 index 00000000000..457ddf981c6 --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/common.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package beego + +import ( + "net/http" + + "go.opentelemetry.io/otel/api/kv" +) + +// ------------------------------------------ Constants + +const ( + // packageName is the name of the this package, and is used as the default tracer + // and meter names. + packageName = "go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego" + + ctxRouteTemplateKey = contextKey("x-opentelemetry-route-template") + + renderTemplateSpanName = "beego.render.template" + renderStringSpanName = "beego.render.string" + renderBytesSpanName = "beego.render.bytes" + + templateKey = kv.Key("go.template") +) + +// ------------------------------------------ Attribute Functions + +// Template returns the template name as a KeyValue pair. +func Template(name string) kv.KeyValue { + return templateKey.String(name) +} + +// ------------------------------------------ OTel HTTP Types + +// Filter returns true if the request should be traced. +type Filter func(*http.Request) bool + +// SpanNameFormatter creates a custom span name from the operation and request object. +type SpanNameFormatter func(operation string, req *http.Request) string + +// ------------------------------------------ Misc + +// contextKey is a key for a value in a context.Context, +// used as it is not recommended to use basic types as keys. +type contextKey string diff --git a/instrumentation/github.com/astaxie/beego/config.go b/instrumentation/github.com/astaxie/beego/config.go new file mode 100644 index 00000000000..1c1792d0f62 --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/config.go @@ -0,0 +1,108 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package beego + +import ( + "go.opentelemetry.io/otel/api/global" + "go.opentelemetry.io/otel/api/metric" + "go.opentelemetry.io/otel/api/propagation" + "go.opentelemetry.io/otel/api/trace" +) + +// Config provides configuration for the beego OpenTelemetry +// middleware. Configuration is modified using the provided Options. +type Config struct { + traceProvider trace.Provider + meterProvider metric.Provider + propagators propagation.Propagators + filters []Filter + formatter SpanNameFormatter +} + +// Option applies a configuration to the given Config. +type Option interface { + Apply(*Config) +} + +// OptionFunc is a function type that applies a particular +// configuration to the beego middleware in question. +type OptionFunc func(c *Config) + +// Apply will apply the option to the Config, c. +func (o OptionFunc) Apply(c *Config) { + o(c) +} + +// ------------------------------------------ Options + +// WithTraceProvider sets the trace provider to be used by the middleware +// to create a tracer for the spans. +// Defaults to calling global.TraceProvider(). +// Tracer name is set to "go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego". +func WithTraceProvider(provider trace.Provider) OptionFunc { + return OptionFunc(func(c *Config) { + c.traceProvider = provider + }) +} + +// WithMeterProvider sets the meter provider to be used to create a meter +// by the middleware. +// Defaults to calling global.MeterProvider(). +// Meter name is set to "go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego". +func WithMeterProvider(provider metric.Provider) OptionFunc { + return OptionFunc(func(c *Config) { + c.meterProvider = provider + }) +} + +// WithPropagators sets the propagators used in the middleware. +// Defaults to global.Propagators(). +func WithPropagators(propagators propagation.Propagators) OptionFunc { + return OptionFunc(func(c *Config) { + c.propagators = propagators + }) +} + +// WithFilter adds the given filter for use in the middleware. +// Defaults to no filters. +func WithFilter(f Filter) OptionFunc { + return OptionFunc(func(c *Config) { + c.filters = append(c.filters, f) + }) +} + +// WithSpanNameFormatter sets the formatter to be used to format +// span names. Defaults to the path template. +func WithSpanNameFormatter(f SpanNameFormatter) OptionFunc { + return OptionFunc(func(c *Config) { + c.formatter = f + }) +} + +// ------------------------------------------ Private Functions + +func configure(options ...Option) *Config { + config := &Config{ + traceProvider: global.TraceProvider(), + meterProvider: global.MeterProvider(), + propagators: global.Propagators(), + filters: []Filter{}, + formatter: defaultSpanNameFormatter, + } + for _, option := range options { + option.Apply(config) + } + return config +} diff --git a/instrumentation/github.com/astaxie/beego/doc.go b/instrumentation/github.com/astaxie/beego/doc.go new file mode 100644 index 00000000000..2ae087ee6f6 --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/doc.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package beego provides functions to instrument the github.com/astaxie/beego package +// (https://github.com/astaxie/beego). +// +package beego // import "go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego" diff --git a/instrumentation/github.com/astaxie/beego/example_middleware_test.go b/instrumentation/github.com/astaxie/beego/example_middleware_test.go new file mode 100644 index 00000000000..a2cd5c28f9f --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/example_middleware_test.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package beego + +import ( + "github.com/astaxie/beego" +) + +type ExampleController struct { + beego.Controller +} + +func (c *ExampleController) Get() { + // name of the template in the views directory + c.TplName = "index.tpl" + + // explicit call to Render + if err := Render(&c.Controller); err != nil { + c.Abort("500") + } +} + +func ExampleRender() { + // Init the trace and meter provider + + // Disable autorender + beego.BConfig.WebConfig.AutoRender = false + + // Create routes + beego.Router("/", &ExampleController{}) + + // Create the middleware + mware := NewOTelBeegoMiddleWare("exampe-server") + + // Start the server using the OTel middleware + beego.RunWithMiddleWares(":7777", mware) +} diff --git a/instrumentation/github.com/astaxie/beego/go.mod b/instrumentation/github.com/astaxie/beego/go.mod new file mode 100644 index 00000000000..3cc347bac33 --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/go.mod @@ -0,0 +1,19 @@ +module go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego + +go 1.14 + +require ( + github.com/astaxie/beego v1.12.2 + github.com/stretchr/testify v1.6.1 + go.opentelemetry.io/contrib v0.10.1 + go.opentelemetry.io/contrib/instrumentation/net/http v0.10.1 + go.opentelemetry.io/otel v0.10.0 + golang.org/x/net v0.0.0-20200707034311-ab3426394381 // indirect + golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 // indirect + golang.org/x/text v0.3.3 // indirect + google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c // indirect + google.golang.org/grpc v1.31.0 + google.golang.org/protobuf v1.25.0 // indirect +) + +replace go.opentelemetry.io/contrib => ../../../.. diff --git a/instrumentation/github.com/astaxie/beego/go.sum b/instrumentation/github.com/astaxie/beego/go.sum new file mode 100644 index 00000000000..f9cfb7206dd --- /dev/null +++ b/instrumentation/github.com/astaxie/beego/go.sum @@ -0,0 +1,258 @@ +cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= +github.com/astaxie/beego v1.12.2 h1:CajUexhSX5ONWDiSCpeQBNVfTzOtPb9e9d+3vuU5FuU= +github.com/astaxie/beego v1.12.2/go.mod h1:TMcqhsbhN3UFpN+RCfysaxPAbrhox6QSS3NIAEp/uzE= +github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= +github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= +github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= +github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= +github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= +github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= +github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= +github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U= +github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= +github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= +github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= +github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s= +github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= +github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= +github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= +go.opentelemetry.io/contrib/instrumentation/net/http v0.10.1 h1:9tIDwzTYu2uHTgbEZbHndxzA7dCsuQiagf4IopRTbdA= +go.opentelemetry.io/contrib/instrumentation/net/http v0.10.1/go.mod h1:f1+E6aTPAGAC5CSNsvC3yQlGvc3emI59iGfPid6R3K8= +go.opentelemetry.io/otel v0.10.0 h1:2y/HYj1dIfG1nPh0Z15X4se8WwYWuTyKHLSgRb/mbQ0= +go.opentelemetry.io/otel v0.10.0/go.mod h1:n3v1JGUBpn5DafiF1UeoDs5fr5XZMG+43kigDtFB8Vk= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20200117065230-39095c1d176c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c h1:Lq4llNryJoaVFRmvrIwC/ZHH7tNt4tUYIu8+se2aayY= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=