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
2815e6ee
Commit
2815e6ee
authored
Apr 02, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated Humio's repository property
Closes gh-20808
parent
1f8ea54c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
37 deletions
+10
-37
HumioProperties.java
...e/autoconfigure/metrics/export/humio/HumioProperties.java
+1
-18
HumioPropertiesConfigAdapter.java
...re/metrics/export/humio/HumioPropertiesConfigAdapter.java
+1
-7
additional-spring-configuration-metadata.json
...es/META-INF/additional-spring-configuration-metadata.json
+6
-0
HumioPropertiesConfigAdapterTests.java
...trics/export/humio/HumioPropertiesConfigAdapterTests.java
+1
-9
HumioPropertiesTests.java
...oconfigure/metrics/export/humio/HumioPropertiesTests.java
+1
-3
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioProperties.java
View file @
2815e6ee
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -22,7 +22,6 @@ import java.util.Map;
import
org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.DeprecatedConfigurationProperty
;
/**
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Humio metrics
...
...
@@ -44,11 +43,6 @@ public class HumioProperties extends StepRegistryProperties {
*/
private
Duration
connectTimeout
=
Duration
.
ofSeconds
(
5
);
/**
* Name of the repository to publish metrics to.
*/
private
String
repository
=
""
;
/**
* Humio tags describing the data source in which metrics will be stored. Humio tags
* are a distinct concept from Micrometer's tags. Micrometer's tags are used to divide
...
...
@@ -80,17 +74,6 @@ public class HumioProperties extends StepRegistryProperties {
this
.
connectTimeout
=
connectTimeout
;
}
@Deprecated
@DeprecatedConfigurationProperty
(
reason
=
"No longer used as repository is resolved from the api token."
)
public
String
getRepository
()
{
return
this
.
repository
;
}
@Deprecated
public
void
setRepository
(
String
repository
)
{
this
.
repository
=
repository
;
}
public
Map
<
String
,
String
>
getTags
()
{
return
this
.
tags
;
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioPropertiesConfigAdapter.java
View file @
2815e6ee
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -43,12 +43,6 @@ class HumioPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<H
return
get
(
HumioProperties:
:
getUri
,
HumioConfig
.
super
::
uri
);
}
@Override
@Deprecated
public
String
repository
()
{
return
get
(
HumioProperties:
:
getRepository
,
HumioConfig
.
super
::
repository
);
}
@Override
public
Map
<
String
,
String
>
tags
()
{
return
get
(
HumioProperties:
:
getTags
,
HumioConfig
.
super
::
tags
);
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
View file @
2815e6ee
...
...
@@ -253,6 +253,12 @@
"name"
:
"management.metrics.export.influx.consistency"
,
"defaultValue"
:
"one"
},
{
"name"
:
"management.metrics.export.humio.repository"
,
"deprecation"
:
{
"level"
:
"error"
}
},
{
"name"
:
"management.metrics.export.prometheus.enabled"
,
"type"
:
"java.lang.Boolean"
,
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioPropertiesConfigAdapterTests.java
View file @
2815e6ee
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -36,14 +36,6 @@ class HumioPropertiesConfigAdapterTests {
assertThat
(
new
HumioPropertiesConfigAdapter
(
properties
).
apiToken
()).
isEqualTo
(
"ABC123"
);
}
@Test
@Deprecated
void
whenPropertiesRepositoryIsSetAdapterRepositoryReturnsIt
()
{
HumioProperties
properties
=
new
HumioProperties
();
properties
.
setRepository
(
"test"
);
assertThat
(
new
HumioPropertiesConfigAdapter
(
properties
).
repository
()).
isEqualTo
(
"test"
);
}
@Test
void
whenPropertiesTagsIsSetAdapterTagsReturnsIt
()
{
HumioProperties
properties
=
new
HumioProperties
();
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioPropertiesTests.java
View file @
2815e6ee
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -31,13 +31,11 @@ import static org.assertj.core.api.Assertions.assertThat;
class
HumioPropertiesTests
extends
StepRegistryPropertiesTests
{
@Test
@SuppressWarnings
(
"deprecation"
)
void
defaultValuesAreConsistent
()
{
HumioProperties
properties
=
new
HumioProperties
();
HumioConfig
config
=
(
key
)
->
null
;
assertStepRegistryDefaultValues
(
properties
,
config
);
assertThat
(
properties
.
getApiToken
()).
isEqualTo
(
config
.
apiToken
());
assertThat
(
properties
.
getRepository
()).
isEqualTo
(
config
.
repository
());
assertThat
(
properties
.
getTags
()).
isEmpty
();
assertThat
(
config
.
tags
()).
isNull
();
assertThat
(
properties
.
getUri
()).
isEqualTo
(
config
.
uri
());
...
...
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