I have added a custom method tracer
- Since there is no official newrelic agent for golang, I am trying to integrate with gorelic. It is sending this custom trace data as part of the metrics:
"Component/Trace/helpers.Abc/max[ms]": 2.173409,
"Component/Trace/helpers.Abc/mean[ms]": 0.43093377777777775,
"Component/Trace/helpers.Abc/min[ms]": 0.238445,
"Component/Trace/helpers.Abc/percentile75[ms]": 0.379749,
"Component/Trace/helpers.Abc/percentile90[ms]": 0.5905421000000025,
"Component/Trace/helpers.Abc/percentile95[ms]": 2.173409,
This is the code I have added:
t := newrelic.GetAgent().Tracer.BeginTrace("helpers.Abc")
defer t.EndTrace()
But I can't see these metrics on the newrelic dashboard.
- Can I trace each http method separately?
My handlers looks like this:
chain.HandlerF(http.HandlerFunc(newrelicAgent.WrapHTTPHandlerFunc(<some_func>))
(chain is xhandler.Chain)
I copied newrelic middleware from here: https://github.com/achiku/sample-golang-newrelic/blob/master/main.go
But I can't see per api metrics on the dashboard
I have added a custom method tracer
This is the code I have added:
But I can't see these metrics on the newrelic dashboard.
My handlers looks like this:
(chain is xhandler.Chain)
I copied newrelic middleware from here: https://github.com/achiku/sample-golang-newrelic/blob/master/main.go
But I can't see per api metrics on the dashboard