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

How to get metrics value from RSS? #32

Open
myandpr opened this issue Jan 19, 2021 · 3 comments
Open

How to get metrics value from RSS? #32

myandpr opened this issue Jan 19, 2021 · 3 comments

Comments

@myandpr
Copy link

myandpr commented Jan 19, 2021

We want to monitor some RSS cluster using metrics in RemoteShuffleService project, but I dont know how to get these metrics value.

And I can not find any metric reporter, so I dont know where these metrics are emitted to.

So how can I get these metrics to monitor my RSS cluster?

@hiboyang
Copy link
Contributor

RSS uses Uber M3 library to send metrics. You could check https://github.com/uber-java/tally. To send metrics to your own metric server, you could implement a M3 scope builder, and add argument like following when starting the server: -Drss.scopeBuilder=com.uber.rss.metrics.M3DummyScopeBuilder.

@bobyangbo
Copy link
Collaborator

bobyangbo commented Jan 22, 2021 via email

@CCweixiao
Copy link

RSS uses Uber M3 library to send metrics. You could check https://github.com/uber-java/tally. To send metrics to your own metric server, you could implement a M3 scope builder, and add argument like following when starting the server: -Drss.scopeBuilder=com.uber.rss.metrics.M3DummyScopeBuilder.

public class PrintStatsReporter implements StatsReporter {
private static final Logger logger = LoggerFactory.getLogger(PrintStatsReporter.class);

@Override
public void reportCounter(String name, Map<String, String> tags, long value) {
    System.out.format("CounterImpl %s: %d\n", name, value);
}

@Override
public void reportGauge(String s, Map<String, String> map, double v) {

}

@Override
public void reportTimer(String s, Map<String, String> map, Duration duration) {

}

@Override
public void reportHistogramValueSamples(String s, Map<String, String> map, Buckets buckets, double v, double v1, long l) {

}

@Override
public void reportHistogramDurationSamples(String s, Map<String, String> map, Buckets buckets, Duration duration, Duration duration1, long l) {

}

@Override
public Capabilities capabilities() {
    return CapableOf.REPORTING;
}

@Override
public void flush() {
    System.out.println("********* Flushed");
}

@Override
public void close() {
    System.out.println("************ Closed");
}

}

    StatsReporter reporter = new PrintStatsReporter();
    Scope scope = scopeBuilder.reporter(reporter).reportEvery(Duration.ofSeconds(5));
    return scope;
    
    java -Drss.scopeBuilder=com.uber.rss.metrics.M3DummyScopeBuilder  ....
    
    my reporter is not usefully. What should I do to send metric

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

4 participants