com.netflix.servo.tag.BasicTag Java Examples

The following examples show how to use com.netflix.servo.tag.BasicTag. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RouteStatusCodeMonitor.java    From s2g-zuul with MIT License 5 votes vote down vote up
public RouteStatusCodeMonitor(String route, int status_code) {
    if (route == null) route = "";
    this.route = route;
    this.status_code = status_code;
    route_code = route + "_" + status_code;
    tagList = BasicTagList.of(new BasicTag("ID", route_code));
}
 
Example #2
Source File: RouteErrorMonitor.java    From s2g-zuul with MIT License 5 votes vote down vote up
/**
 * create a counter by route and cause of error
 *
 * @param route
 * @param cause
 */
public RouteErrorMonitor(String route, String cause) {
    if (null == route || "".equals(route)) {
        route = "UNKNOWN";
    }
    id = route + "_" + cause;

    this.error_cause = cause;
    tagList = BasicTagList.of(new BasicTag("ID", id));


}
 
Example #3
Source File: DynoOPMonitor.java    From dyno with Apache License 2.0 5 votes vote down vote up
private BasicCounter getNewCounter(String metricName, String opName, String compressionEnabled) {
    MonitorConfig config = MonitorConfig.builder(metricName)
            .withTag(new BasicTag("dyno_op", opName))
            .withTag(new BasicTag("compression_enabled", compressionEnabled))
            .build();
    return new BasicCounter(config);
}
 
Example #4
Source File: EstimatedHistogramBasedCounter.java    From dyno with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance of the counter.
 */
public EstimatedHistogramBasedCounter(final String name, final String opName, final EstimatedHistogram histogram) {
    super(MonitorConfig.builder(name).build()
            .withAdditionalTag(DataSourceType.GAUGE)
            .withAdditionalTag(new BasicTag("dyno_op", opName)));
    this.estHistogram = histogram;
}
 
Example #5
Source File: DynoJedisPipelineMonitor.java    From dyno with Apache License 2.0 5 votes vote down vote up
private BasicCounter getNewPipelineCounter(String opName) {

        String metricName = "Dyno__" + appName + "__PL__" + opName;
        MonitorConfig config = MonitorConfig.builder(metricName)
                .withTag(new BasicTag("dyno_pl_op", opName))
                .build();
        return new BasicCounter(config);
    }
 
Example #6
Source File: EstimatedHistogramBasedCounter.java    From dyno with Apache License 2.0 4 votes vote down vote up
public EstimatedHistogramBasedCounter(final String name, final String opName, final String tagName, final EstimatedHistogram histogram) {
    super(MonitorConfig.builder(name).build()
            .withAdditionalTag(DataSourceType.GAUGE)
            .withAdditionalTag(new BasicTag(tagName, opName)));
    this.estHistogram = histogram;
}
 
Example #7
Source File: ErrorStatsData.java    From s2g-zuul with MIT License 3 votes vote down vote up
/**
 * create a counter by route and cause of error
 * @param route
 * @param cause
 */
public ErrorStatsData(String route, String cause) {
    if(null == route || "".equals(route)){
        route = "UNKNOWN";
    }
    id = route + "_" + cause;

    this.error_cause = cause;
    tagList = BasicTagList.of(new BasicTag("ID", id));



}