1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-12-24 00:01:31 +02:00

update tracing, fixed docker-compose and removed vendor dir

This commit is contained in:
Lee Brown
2019-05-23 19:40:29 -05:00
parent c77dd8f5f3
commit c19f46e07f
264 changed files with 391 additions and 45102 deletions

View File

@@ -5,9 +5,9 @@ import (
"net/http"
"runtime/debug"
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
"geeks-accelerator/oss/saas-starter-kit/example-project/internal/platform/web"
"github.com/pkg/errors"
"go.opencensus.io/trace"
)
// Panics recovers from panics and converts the panic to an error so it is
@@ -19,8 +19,8 @@ func Panics() web.Middleware {
// Wrap this handler around the next one provided.
h := func(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) (err error) {
ctx, span := trace.StartSpan(ctx, "internal.mid.Panics")
defer span.End()
span, ctx := tracer.StartSpanFromContext(ctx, "internal.mid.Panics")
defer span.Finish()
// Defer a function to recover from a panic and set the err return variable
// after the fact. Using the errors package will generate a stack trace.