Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
b6e4c0f0
Commit
b6e4c0f0
authored
Dec 13, 2019
by
dreis2211
Committed by
Stephane Nicoll
Dec 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add group property to DynatraceProperties
See gh-19369
parent
6d372f60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
DynatraceProperties.java
...nfigure/metrics/export/dynatrace/DynatraceProperties.java
+14
-0
DynatracePropertiesConfigAdapter.java
...cs/export/dynatrace/DynatracePropertiesConfigAdapter.java
+5
-0
DynatracePropertiesConfigAdapterTests.java
...port/dynatrace/DynatracePropertiesConfigAdapterTests.java
+7
-0
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/dynatrace/DynatraceProperties.java
View file @
b6e4c0f0
...
...
@@ -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
;
}
...
...
@@ -83,4 +89,12 @@ public class DynatraceProperties extends StepRegistryProperties {
this
.
uri
=
uri
;
}
public
String
getGroup
()
{
return
this
.
group
;
}
public
void
setGroup
(
String
group
)
{
this
.
group
=
group
;
}
}
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/dynatrace/DynatracePropertiesConfigAdapter.java
View file @
b6e4c0f0
...
...
@@ -52,4 +52,9 @@ class DynatracePropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapt
return
get
(
DynatraceProperties:
:
getUri
,
DynatraceConfig
.
super
::
uri
);
}
@Override
public
String
group
()
{
return
get
(
DynatraceProperties:
:
getGroup
,
DynatraceConfig
.
super
::
group
);
}
}
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/dynatrace/DynatracePropertiesConfigAdapterTests.java
View file @
b6e4c0f0
...
...
@@ -55,4 +55,11 @@ class DynatracePropertiesConfigAdapterTests {
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"
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment