Skip to content

Commit

Permalink
Merge branch '2.2.x'
Browse files Browse the repository at this point in the history
Closes gh-19375
  • Loading branch information
snicoll committed Dec 15, 2019
2 parents ef2eb2f + c076b62 commit bb3b6db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Expand Up @@ -51,6 +51,12 @@ public class DynatraceProperties extends StepRegistryProperties {
*/
private String uri;

/**
* Group for exported metrics. Used to specify custom device group name in the
* Dynatrace UI.
*/
private String group;

public String getApiToken() {
return this.apiToken;
}
Expand Down Expand Up @@ -83,4 +89,12 @@ public void setUri(String uri) {
this.uri = uri;
}

public String getGroup() {
return this.group;
}

public void setGroup(String group) {
this.group = group;
}

}
Expand Up @@ -52,4 +52,9 @@ public String uri() {
return get(DynatraceProperties::getUri, DynatraceConfig.super::uri);
}

@Override
public String group() {
return get(DynatraceProperties::getGroup, DynatraceConfig.super::group);
}

}
Expand Up @@ -55,4 +55,11 @@ void whenPropertiesTechnologyTypeIsSetAdapterTechnologyTypeReturnsIt() {
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");
}

}

0 comments on commit bb3b6db

Please sign in to comment.