Skip to content

Tracking custom method and http latencies #57

@neerajkumaragarwal1990

Description

@neerajkumaragarwal1990

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions