Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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;
}

}
Original file line number Diff line number Diff line change
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);
}

}
Original file line number Diff line number Diff line change
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");
}

}