parent
6d372f60d9
commit
b6e4c0f012
|
|
@ -51,6 +51,12 @@ public class DynatraceProperties extends StepRegistryProperties {
|
||||||
*/
|
*/
|
||||||
private String uri;
|
private String uri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Group for exported metrics. Used to specify custom device group name in the
|
||||||
|
* Dynatrace UI.
|
||||||
|
*/
|
||||||
|
private String group;
|
||||||
|
|
||||||
public String getApiToken() {
|
public String getApiToken() {
|
||||||
return this.apiToken;
|
return this.apiToken;
|
||||||
}
|
}
|
||||||
|
|
@ -83,4 +89,12 @@ public class DynatraceProperties extends StepRegistryProperties {
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGroup() {
|
||||||
|
return this.group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroup(String group) {
|
||||||
|
this.group = group;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,4 +52,9 @@ class DynatracePropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapt
|
||||||
return get(DynatraceProperties::getUri, DynatraceConfig.super::uri);
|
return get(DynatraceProperties::getUri, DynatraceConfig.super::uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String group() {
|
||||||
|
return get(DynatraceProperties::getGroup, DynatraceConfig.super::group);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,4 +55,11 @@ class DynatracePropertiesConfigAdapterTests {
|
||||||
assertThat(new DynatracePropertiesConfigAdapter(properties).technologyType()).isEqualTo("tech-1");
|
assertThat(new DynatracePropertiesConfigAdapter(properties).technologyType()).isEqualTo("tech-1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void whenPropertiesGroupIsSetAdapterGroupReturnsIt() {
|
||||||
|
DynatraceProperties properties = new DynatraceProperties();
|
||||||
|
properties.setGroup("group-1");
|
||||||
|
assertThat(new DynatracePropertiesConfigAdapter(properties).group()).isEqualTo("group-1");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue