You've already forked golang-saas-starter-kit
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user