I have built a demo REST API in Go with MongoDB as the datastore, with Gin as the HTTP framework. I have followed all of the instructions on the Datadog website, however, am getting traces with little to no information. All that is traced is http.request
. On the Datadog blog there is a screenshot with a Go trace (see below).
Here is what I'm seeing - there is no trace of the MongoDB Query performed in the request.
Is there some other configuration or manual reporting that I have to do?
I am initiating the Datadog tracer with the following in my main function:
rules := []tracer.SamplingRule{tracer.RateRule(1)}
tracer.Start(
tracer.WithSamplingRules(rules),
tracer.WithService("Go Mongo"),
tracer.WithEnv("dev"),
)
defer tracer.Stop()
Full code is available at: https://github.com/NG235/go-mongo
Thanks.