We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello. I'm working in a suport for Datadog APM
I have this:
func Datadog(ctx gearbox.Context) { method := string(ctx.Context().Method()) opts := []ddtrace.StartSpanOption{ tracer.SpanType(ext.SpanTypeWeb), //tracer.ServiceName(cfg.serviceName) tracer.Tag(ext.HTTPMethod, method), tracer.Tag(ext.HTTPURL, ctx.Context().URI().String()), tracer.Measured(), } span, ctxOfSpan := tracer.StartSpanFromContext(context.Background(), "http.request", opts...) defer span.Finish() ctx.Next() span.SetTag(ext.ResourceName, string(ctx.Context().URI().Path())) status := ctx.Context().Response.StatusCode() span.SetTag(ext.HTTPCode, status) if status == gearbox.StatusInternalServerError { b := string(ctx.Context().Response.Body()) span.SetTag(ext.Error, true) span.SetTag(ext.ErrorMsg, b) } }
This a example in "go-chi" https://github.com/DataDog/dd-trace-go/blob/v1/contrib/go-chi/chi/chi.go
I have one problem need pass a my handler ctxOfSpan this variable is type context.Context. I have been thinking in a possible solution like this:
ctx.NextWithCtx(ctxOfSpan)
You have a better idea?
Thank you for you important time. Regards
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello. I'm working in a suport for Datadog APM
I have this:
This a example in "go-chi" https://github.com/DataDog/dd-trace-go/blob/v1/contrib/go-chi/chi/chi.go
I have one problem need pass a my handler ctxOfSpan this variable is type context.Context. I have been thinking in a possible solution like this:
ctx.NextWithCtx(ctxOfSpan)
You have a better idea?
Thank you for you important time. Regards
The text was updated successfully, but these errors were encountered: