yvasiyarov / gorelic

GoRelic is deprecated in favour of https://github.com/newrelic/go-agent
BSD 2-Clause "Simplified" License
389 stars 64 forks source link

Custom metrics as shown in examples/example_web.go doesn't work #37

Open harshadptl opened 9 years ago

harshadptl commented 9 years ago

I tried implementing the custom metrics as shown in the examples/example_web.go file. But the sawtooth metric is not show on the dashboard! is this a dashboard issue?

digitalcrab commented 9 years ago

+1 same issue for me

andreyevsyukov commented 8 years ago

+1 same for me! It would be great if you could provide a simple documentation about Custom Metrics. Which would make GORelic plugin really powerful!

docmerlin commented 8 years ago

Ditto

andreyevsyukov commented 8 years ago

Here's the example which works: https://github.com/yvasiyarov/newrelic_platform_go/blob/master/examples/wave_plugin.go

docmerlin commented 8 years ago

Thanks for the prompt response! Is there a way to do it within the gorelic plugin or do we have to define a new plugin using newrelic_platform_go.

andreyevsyukov commented 8 years ago

Well, Custom Metrics do not work on gorelic, even it shows the data is sent but it doesn't come up in the Dashboard. When you use newrelic_platform_go you define your own GUID and it will make NewRelic show this data as another plugin. But as for me it was a perfect solution: I created a simple wrapper around newrelic_platform_go.NewNewrelicPlugin and newrelic_platform_go.NewPluginComponent, defined my own GUID, my own data. In NewRelic dashboard you can then define everything as you wish: you can add as more Graphs as you want and tune them in different ways. Just because NewRelic will consider this plugin as your plugin and you will be able to do anything!

callumj commented 8 years ago

You do not need to use newrelic_platform_go, you just need to override AgentGUID which will then create a new custom plugin for gorelic. With this custom plugin you then have full control over the dashboard data with the caveat that you'll need to replicate the dashboards provided by gorelic as well (HTTP, GC, Memory).