本文整理汇总了Java中com.netflix.servo.publish.atlas.AtlasMetricObserver类的典型用法代码示例。如果您正苦于以下问题:Java AtlasMetricObserver类的具体用法?Java AtlasMetricObserver怎么用?Java AtlasMetricObserver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AtlasMetricObserver类属于com.netflix.servo.publish.atlas包,在下文中一共展示了AtlasMetricObserver类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: atlasObserver
import com.netflix.servo.publish.atlas.AtlasMetricObserver; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(AtlasMetricObserver.class)
public AtlasMetricObserver atlasObserver(Optional<Collection<AtlasTagProvider>> tagProviders, ServoAtlasConfig servoAtlasConfig) {
BasicTagList tags = (BasicTagList) BasicTagList.EMPTY;
if(tagProviders != null && tagProviders.isPresent()) {
for (AtlasTagProvider tagProvider : tagProviders.get()) {
for (Map.Entry<String, String> tag : tagProvider.defaultTags().entrySet()) {
if(tag.getValue() != null)
tags = tags.copy(tag.getKey(), tag.getValue());
}
}
}
return new AtlasMetricObserver(servoAtlasConfig, tags);
}
示例2: AtlasExporter
import com.netflix.servo.publish.atlas.AtlasMetricObserver; //导入依赖的package包/类
public AtlasExporter(AtlasMetricObserver observer, MetricPoller poller, Long delay) {
this.observer = observer;
this.poller = poller;
this.delay = delay;
}
示例3: exporter
import com.netflix.servo.publish.atlas.AtlasMetricObserver; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(Exporter.class)
public AtlasExporter exporter(AtlasMetricObserver observer, MetricPoller poller, AtlasProperties properties) {
return new AtlasExporter(observer, poller, properties.getPublishDelay());
}
示例4: createAtlasObserver
import com.netflix.servo.publish.atlas.AtlasMetricObserver; //导入依赖的package包/类
private static MetricObserver createAtlasObserver() {
final ServoAtlasConfig cfg = Config.getAtlasConfig();
final TagList common = getCommonTags();
return rateTransform(async("atlas", new AtlasMetricObserver(cfg, common)));
}