mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-24 14:01:46 +02:00
Remove incorrect defer that was causing the datadog tracer to get stopped too early
This commit is contained in:
parent
bc4d2b05f1
commit
0e085211a8
@ -2,15 +2,16 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
httptrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/net/http"
|
|
||||||
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
|
|
||||||
"gopkg.in/DataDog/dd-trace-go.v1/profiler"
|
|
||||||
"math"
|
"math"
|
||||||
"net/http"
|
"net/http"
|
||||||
pprofhttp "net/http/pprof"
|
pprofhttp "net/http/pprof"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
httptrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/net/http"
|
||||||
|
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
|
||||||
|
"gopkg.in/DataDog/dd-trace-go.v1/profiler"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getMaximumNumberOfAllowedUsers() int {
|
func getMaximumNumberOfAllowedUsers() int {
|
||||||
@ -46,8 +47,6 @@ func configureObservability(mux *httptrace.ServeMux, releaseVersion string) func
|
|||||||
tracer.WithService("hishtory-api"),
|
tracer.WithService("hishtory-api"),
|
||||||
tracer.WithUDS("/var/run/datadog/apm.socket"),
|
tracer.WithUDS("/var/run/datadog/apm.socket"),
|
||||||
)
|
)
|
||||||
// TODO: should this be here?
|
|
||||||
defer tracer.Stop()
|
|
||||||
|
|
||||||
// Pprof
|
// Pprof
|
||||||
mux.HandleFunc("/debug/pprof/", pprofhttp.Index)
|
mux.HandleFunc("/debug/pprof/", pprofhttp.Index)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user