Commit b254761c authored by Jon Schneider's avatar Jon Schneider Committed by Phillip Webb

Support micrometer Graphite tagsAsPrefix property

Fixes gh-11797
parent a3c6e72e
/*
* 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;
}
}
/*
* 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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment