Skip to content

Commit 2815e6e

Browse files
committed
Remove deprecated Humio's repository property
Closes gh-20808
1 parent 1f8ea54 commit 2815e6e

File tree

5 files changed

+10
-37
lines changed

5 files changed

+10
-37
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioProperties.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@
2222

2323
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
2424
import org.springframework.boot.context.properties.ConfigurationProperties;
25-
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
2625

2726
/**
2827
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Humio metrics
@@ -44,11 +43,6 @@ public class HumioProperties extends StepRegistryProperties {
4443
*/
4544
private Duration connectTimeout = Duration.ofSeconds(5);
4645

47-
/**
48-
* Name of the repository to publish metrics to.
49-
*/
50-
private String repository = "";
51-
5246
/**
5347
* Humio tags describing the data source in which metrics will be stored. Humio tags
5448
* are a distinct concept from Micrometer's tags. Micrometer's tags are used to divide
@@ -80,17 +74,6 @@ public void setConnectTimeout(Duration connectTimeout) {
8074
this.connectTimeout = connectTimeout;
8175
}
8276

83-
@Deprecated
84-
@DeprecatedConfigurationProperty(reason = "No longer used as repository is resolved from the api token.")
85-
public String getRepository() {
86-
return this.repository;
87-
}
88-
89-
@Deprecated
90-
public void setRepository(String repository) {
91-
this.repository = repository;
92-
}
93-
9477
public Map<String, String> getTags() {
9578
return this.tags;
9679
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioPropertiesConfigAdapter.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,12 +43,6 @@ public String uri() {
4343
return get(HumioProperties::getUri, HumioConfig.super::uri);
4444
}
4545

46-
@Override
47-
@Deprecated
48-
public String repository() {
49-
return get(HumioProperties::getRepository, HumioConfig.super::repository);
50-
}
51-
5246
@Override
5347
public Map<String, String> tags() {
5448
return get(HumioProperties::getTags, HumioConfig.super::tags);

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@
253253
"name": "management.metrics.export.influx.consistency",
254254
"defaultValue": "one"
255255
},
256+
{
257+
"name": "management.metrics.export.humio.repository",
258+
"deprecation": {
259+
"level": "error"
260+
}
261+
},
256262
{
257263
"name": "management.metrics.export.prometheus.enabled",
258264
"type": "java.lang.Boolean",

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioPropertiesConfigAdapterTests.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,14 +36,6 @@ void whenApiTokenIsSetAdapterApiTokenReturnsIt() {
3636
assertThat(new HumioPropertiesConfigAdapter(properties).apiToken()).isEqualTo("ABC123");
3737
}
3838

39-
@Test
40-
@Deprecated
41-
void whenPropertiesRepositoryIsSetAdapterRepositoryReturnsIt() {
42-
HumioProperties properties = new HumioProperties();
43-
properties.setRepository("test");
44-
assertThat(new HumioPropertiesConfigAdapter(properties).repository()).isEqualTo("test");
45-
}
46-
4739
@Test
4840
void whenPropertiesTagsIsSetAdapterTagsReturnsIt() {
4941
HumioProperties properties = new HumioProperties();

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/humio/HumioPropertiesTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,13 +31,11 @@
3131
class HumioPropertiesTests extends StepRegistryPropertiesTests {
3232

3333
@Test
34-
@SuppressWarnings("deprecation")
3534
void defaultValuesAreConsistent() {
3635
HumioProperties properties = new HumioProperties();
3736
HumioConfig config = (key) -> null;
3837
assertStepRegistryDefaultValues(properties, config);
3938
assertThat(properties.getApiToken()).isEqualTo(config.apiToken());
40-
assertThat(properties.getRepository()).isEqualTo(config.repository());
4139
assertThat(properties.getTags()).isEmpty();
4240
assertThat(config.tags()).isNull();
4341
assertThat(properties.getUri()).isEqualTo(config.uri());

0 commit comments

Comments
 (0)