RemoteShuffleService icon indicating copy to clipboard operation
RemoteShuffleService copied to clipboard

How to get metrics value from RSS?

Open myandpr opened this issue 5 years ago • 3 comments

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?

myandpr avatar Jan 19 '21 15:01 myandpr

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.

hiboyang avatar Jan 20 '21 07:01 hiboyang

Did you set "-Drss.scopeBuilder" when starting RSS server?

On Wed, Jan 20, 2021 at 1:57 AM yanmin [email protected] wrote:

I use default M3DummyScopeBuilder, and I implement StatsReporter like following.

... public class PrintStatsReporter implements StatsReporter {

private static final Logger logger =

        LoggerFactory.getLogger(PrintStatsReporter.class);

@Override

public Capabilities capabilities() {

    return CapableOf.REPORTING;

}



@Override

public void flush() {

    System.out.println("********* Flushed");

}



@Override

public void close() {

    System.out.println("************ Closed");

}



@Override

public void reportCounter(String name, Map<String, String> tags, long value) {

    System.out.format("CounterImpl %s: %d\n", name, value);

}



@Override

.......

And then I add PrintStatsReporter() in scopeBuilder in M3Stats.createScopeHelper(), But it doesn't worker,Can you give me some suggestion?

    StatsReporter reporter = new PrintStatsReporter();

    Scope scope = scopeBuilder.reporter(reporter).reportEvery(Duration.ofSeconds(5));

    return scope;

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uber/RemoteShuffleService/issues/32#issuecomment-763485290, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE2465B7MXNUSAB4EFCDR3S22SKJANCNFSM4WI7TBOA .

bobyangbo avatar Jan 22 '21 05:01 bobyangbo

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
    
    

CCweixiao avatar Jul 06 '21 07:07 CCweixiao