Package com.netflix.servo.tag

Examples of com.netflix.servo.tag.Tag


    public HystrixServoMetricsPublisherThreadPool(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolMetrics metrics, HystrixThreadPoolProperties properties) {
        this.key = threadPoolKey;
        this.metrics = metrics;
        this.properties = properties;

        this.servoInstanceTag = new Tag() {

            @Override
            public String getKey() {
                return "instance";
            }

            @Override
            public String getValue() {
                return key.name();
            }

            @Override
            public String tagString() {
                return key.name();
            }

        };
        this.servoTypeTag = new Tag() {

            @Override
            public String getKey() {
                return "type";
            }
View Full Code Here


        this.key = commandKey;
        this.commandGroupKey = commandGroupKey;
        this.metrics = metrics;
        this.circuitBreaker = circuitBreaker;
        this.properties = properties;
        this.servoInstanceTag = new Tag() {

            @Override
            public String getKey() {
                return "instance";
            }

            @Override
            public String getValue() {
                return key.name();
            }

            @Override
            public String tagString() {
                return key.name();
            }

        };
        this.servoTypeTag = new Tag() {

            @Override
            public String getKey() {
                return "type";
            }
View Full Code Here

        TagList tags = config.getTags();
        String value;
        if (tagKey == null) {
            value = name;
        } else {
            Tag t = tags.getTag(tagKey);
            value = (t == null) ? null : t.getValue();
        }

        boolean match = matchIfMissingTag;
        if (value != null) {
            match = pattern.matcher(value).matches();
View Full Code Here

     * Creates a new instance of the timer.
     */
    BasicTimer(MonitorConfig config, TimeUnit unit, Clock clock) {
        super(config);

        final Tag unitTag = Tags.newTag(UNIT, unit.name());
        final MonitorConfig unitConfig = config.withAdditionalTag(unitTag);
        timeUnit = unit;
        timeUnitNanosFactor = 1.0 / timeUnit.toNanos(1);

        totalTime = new StepCounter(unitConfig.withAdditionalTag(STAT_TOTAL), clock);
View Full Code Here

                return EMPTY_LIST;
            }
            final double value = Double.parseDouble(m.group(2));


            final Tag metricType = (name.startsWith("Total") || name.startsWith("Uptime"))
                    ? DataSourceType.COUNTER : DataSourceType.GAUGE;
            final MonitorConfig monitorConfig = MonitorConfig.builder(name)
                    .withTag(metricType)
                    .withTag(CLASS_TAG)
                    .build();
View Full Code Here

    BucketTimer(MonitorConfig config, BucketConfig bucketConfig, TimeUnit unit, Clock clock) {
        super(config);
        this.bucketConfig = Preconditions.checkNotNull(bucketConfig, "bucketConfig");

        final Tag unitTag = Tags.newTag(UNIT, unit.name());
        final MonitorConfig unitConfig = config.withAdditionalTag(unitTag);
        this.timeUnit = unit;

        this.totalTime = new BasicCounter(unitConfig.withAdditionalTag(STAT_TOTAL));
        this.overflowCount = new BasicCounter(unitConfig
View Full Code Here

                        final ScheduledExecutorService executor,
                        final String totalTagName,
                        final boolean autoStart,
                        final Tag... additionalTags) {
        super(config);
        final Tag statsTotal = Tags.newTag(STATISTIC, totalTagName);
        TagList additionalTagList = new BasicTagList(Arrays.asList(additionalTags));
        this.baseConfig = config.withAdditionalTags(additionalTagList);
        this.cur = new StatsBuffer(statsConfig.getSampleSize(), statsConfig.getPercentiles());
        this.prev = new StatsBuffer(statsConfig.getSampleSize(), statsConfig.getPercentiles());
        this.count = new BasicCounter(baseConfig.withAdditionalTag(STAT_COUNT));
View Full Code Here

    }

    private void addGarbageCollectorMetrics(long timestamp, MetricList metrics) {
        final List<GarbageCollectorMXBean> beans = ManagementFactory.getGarbageCollectorMXBeans();
        for (GarbageCollectorMXBean bean : beans) {
            final Tag id = new BasicTag("id", bean.getName());
            metrics.add(new Metric(COLLECTION_COUNT.withAdditionalTag(id),
                    timestamp, bean.getCollectionCount()));
            metrics.add(new Metric(COLLECTION_TIME.withAdditionalTag(id),
                    timestamp, bean.getCollectionTime()));
        }
View Full Code Here

        TagList tags = config.getTags();
        String value;
        if (tagKey == null) {
            value = name;
        } else {
            Tag t = tags.getTag(tagKey);
            value = (t == null) ? null : t.getValue();
        }

        if (Strings.isNullOrEmpty(value)) {
            return root.matches(config);
        } else {
View Full Code Here

    @Monitor(name = "updateFailureCount", type = DataSourceType.COUNTER)
    private final AtomicInteger failedUpdateCount = new AtomicInteger(0);

    /** Creates a new instance with a given name. */
    public BaseMetricObserver(String name) {
        final Tag id = Tags.newTag(StandardTagKeys.MONITOR_ID.getKeyName(), name);
        this.name = Preconditions.checkNotNull(name);
        this.tags = BasicTagList.of(id);
    }
View Full Code Here

TOP

Related Classes of com.netflix.servo.tag.Tag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.