How to gather more metrics (system and runtime metrics)

APM Agent language and version:

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I want to add system and runtime metrics in addition to default metrics by calling GatherMetrics method ( from Tracer but it looks there is no way to access it unless I'm mistaken. Do you think I missed something or is the method not exposed for consumption?

Welcome to the forum @haile!

You can use Tracer.RegisterMetricsGatherer, passing in your own implementation of MetricsGatherer. There's GatherMetricsFunc for convenience, for simple cases.

You can see an example in

There's also integration with a couple of external metrics APIs, if you prefer that approach:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.