Support micrometer Graphite tagsAsPrefix property
Fixes gh-11797
This commit is contained in:
committed by
Phillip Webb
parent
a3c6e72ec6
commit
b254761c5e
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -67,6 +67,12 @@ public class GraphiteProperties {
|
||||
*/
|
||||
private GraphiteProtocol protocol;
|
||||
|
||||
/**
|
||||
* For the default naming convention, turn the specified tag keys into part of the
|
||||
* metric prefix.
|
||||
*/
|
||||
private String[] tagsAsPrefix;
|
||||
|
||||
public Boolean getEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
@@ -123,4 +129,12 @@ public class GraphiteProperties {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
public String[] getTagsAsPrefix() {
|
||||
return this.tagsAsPrefix;
|
||||
}
|
||||
|
||||
public void setTagsAsPrefix(String[] tagsAsPrefix) {
|
||||
this.tagsAsPrefix = tagsAsPrefix;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -78,4 +78,10 @@ class GraphitePropertiesConfigAdapter extends PropertiesConfigAdapter<GraphitePr
|
||||
return get(GraphiteProperties::getProtocol, GraphiteConfig.super::protocol);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] tagsAsPrefix() {
|
||||
return get(GraphiteProperties::getTagsAsPrefix,
|
||||
GraphiteConfig.super::tagsAsPrefix);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user