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
d3503457
Commit
d3503457
authored
Jun 01, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13324 from izeye:metrics-properties-final
* pr/13324: Make MetricsProperties fields final if possible
parents
77dcbdb1
5d5a14e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
25 deletions
+4
-25
MetricsProperties.java
...boot/actuate/autoconfigure/metrics/MetricsProperties.java
+4
-25
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/MetricsProperties.java
View file @
d3503457
...
...
@@ -20,7 +20,6 @@ import java.util.LinkedHashMap;
import
java.util.Map
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.util.Assert
;
/**
* {@link ConfigurationProperties} for configuring Micrometer-based metrics.
...
...
@@ -42,7 +41,7 @@ public class MetricsProperties {
* Whether meter IDs starting-with the specified name should be enabled. The longest
* match wins, the key `all` can also be used to configure all meters.
*/
private
Map
<
String
,
Boolean
>
enable
=
new
LinkedHashMap
<>();
private
final
Map
<
String
,
Boolean
>
enable
=
new
LinkedHashMap
<>();
/**
* Common tags that are applied to every meter.
...
...
@@ -65,11 +64,6 @@ public class MetricsProperties {
return
this
.
enable
;
}
public
void
setEnable
(
Map
<
String
,
Boolean
>
enable
)
{
Assert
.
notNull
(
enable
,
"enable must not be null"
);
this
.
enable
=
enable
;
}
public
Map
<
String
,
String
>
getTags
()
{
return
this
.
tags
;
}
...
...
@@ -172,14 +166,14 @@ public class MetricsProperties {
* this has no effect. The longest match wins, the key `all` can also be used to
* configure all meters.
*/
private
Map
<
String
,
Boolean
>
percentilesHistogram
=
new
LinkedHashMap
<>();
private
final
Map
<
String
,
Boolean
>
percentilesHistogram
=
new
LinkedHashMap
<>();
/**
* Specific computed non-aggregable percentiles to ship to the backend for meter
* IDs starting-with the specified name. The longest match wins, the key `all` can
* also be used to configure all meters.
*/
private
Map
<
String
,
double
[]>
percentiles
=
new
LinkedHashMap
<>();
private
final
Map
<
String
,
double
[]>
percentiles
=
new
LinkedHashMap
<>();
/**
* Specific SLA boundaries for meter IDs starting-with the specified name. The
...
...
@@ -188,35 +182,20 @@ public class MetricsProperties {
* as a long or as a Duration value (for timer meters, defaulting to ms if no unit
* specified).
*/
private
Map
<
String
,
ServiceLevelAgreementBoundary
[]>
sla
=
new
LinkedHashMap
<>();
private
final
Map
<
String
,
ServiceLevelAgreementBoundary
[]>
sla
=
new
LinkedHashMap
<>();
public
Map
<
String
,
Boolean
>
getPercentilesHistogram
()
{
return
this
.
percentilesHistogram
;
}
public
void
setPercentilesHistogram
(
Map
<
String
,
Boolean
>
percentilesHistogram
)
{
Assert
.
notNull
(
percentilesHistogram
,
"PercentilesHistogram must not be null"
);
this
.
percentilesHistogram
=
percentilesHistogram
;
}
public
Map
<
String
,
double
[]>
getPercentiles
()
{
return
this
.
percentiles
;
}
public
void
setPercentiles
(
Map
<
String
,
double
[]>
percentiles
)
{
Assert
.
notNull
(
percentiles
,
"Percentiles must not be null"
);
this
.
percentiles
=
percentiles
;
}
public
Map
<
String
,
ServiceLevelAgreementBoundary
[]>
getSla
()
{
return
this
.
sla
;
}
public
void
setSla
(
Map
<
String
,
ServiceLevelAgreementBoundary
[]>
sla
)
{
Assert
.
notNull
(
sla
,
"SLA must not be null"
);
this
.
sla
=
sla
;
}
}
}
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