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

Metric API v2 #59

Closed
Unitech opened this issue May 23, 2018 · 1 comment
Closed

Metric API v2 #59

Unitech opened this issue May 23, 2018 · 1 comment

Comments

@Unitech
Copy link
Member

Unitech commented May 23, 2018

var a = io.metric('mon_metric')
var b = io.histogram('mon_histogram')
var c = io.counter('mon_counter')
var d = io.meter('mon_meter')

a.set('value')

/// 2nd way

io.metric({
  name: g_key,                                                                                                                                                           
  value: function() {
    return gpu_stats[g_key];
   }
})

// 3rd way (multi metric)

io.metrics([{
  name: g_key,                                                                                                                                                           
  value: function() {
    return gpu_stats[g_key];
   }
}, {
  name: g_key_2,                                                                                                                                                           
  value: function() {
    return gpu_stats[g_key_3];
   }
}])
@vmarchaud
Copy link
Contributor

Issue moved to keymetrics/pm2-io-apm #98 via ZenHub

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

2 participants