Skip to content

Commit 478148c

Browse files
Suppress logging of deprecated config alternatives
The extension should only recommend usage of non-deprecated config parameters. There is a small number of deprecated parameters that have their own deprecated fall-backs. But since they had no default value, the check to print the deprecation message was positive even when the property was not set explicitly. Adding the default values removes the deprecation message. This is correct when it is not explicitly given. Signed-off-by: Karsten Schnitter <k.schnitter@sap.com>
1 parent 3a50e06 commit 478148c

File tree

1 file changed

+3
-1
lines changed
  • cf-java-logging-support-opentelemetry-agent-extension/src/main/java/com/sap/hcf/cf/logging/opentelemetry/agent/ext/config

1 file changed

+3
-1
lines changed

cf-java-logging-support-opentelemetry-agent-extension/src/main/java/com/sap/hcf/cf/logging/opentelemetry/agent/ext/config/ExtensionConfigurations.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ interface CLOUD_LOGGING {
297297
ConfigProperty<String> LABEL_OTEL = stringValued(
298298
"otel.javaagent.extension.sap.cf.binding.cloud-logging.label").setDeprecated(true)
299299
.withFallback(LABEL_SAP)
300+
.withDefaultValue(
301+
"cloud-logging")
300302
.build();
301303
ConfigProperty<String> TAG_SAP =
302304
stringValued("com.sap.otel.extension.cloud-logging.tag").setDeprecated(true)
@@ -305,7 +307,7 @@ interface CLOUD_LOGGING {
305307
.build();
306308
ConfigProperty<String> TAG_OTEL =
307309
stringValued("otel.javaagent.extension.sap.cf.binding.cloud-logging.tag").setDeprecated(
308-
true).withFallback(TAG_SAP).build();
310+
true).withDefaultValue("Cloud Logging").withFallback(TAG_SAP).build();
309311
}
310312

311313
interface DYNATRACE {

0 commit comments

Comments
 (0)