Skip to content
New issue

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

Tracking custom method and http latencies #57

Open
neerajkumaragarwal1990 opened this issue Jul 4, 2016 · 0 comments
Open

Tracking custom method and http latencies #57

neerajkumaragarwal1990 opened this issue Jul 4, 2016 · 0 comments

Comments

@neerajkumaragarwal1990
Copy link

neerajkumaragarwal1990 commented Jul 4, 2016

I have added a custom method tracer

  1. 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.

  1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant