-
Notifications
You must be signed in to change notification settings - Fork 845
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for missing list properties in spring starter (#12434)
Co-authored-by: Jean Bisutti <jean.bisutti@gmail.com>
- Loading branch information
1 parent
780cdf4
commit 9e83898
Showing
12 changed files
with
386 additions
and
51 deletions.
There are no files selected for viewing
5 changes: 4 additions & 1 deletion
5
docs/apidiffs/current_vs_latest/opentelemetry-spring-boot-autoconfigure.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
Comparing source compatibility of opentelemetry-spring-boot-autoconfigure-2.9.0-SNAPSHOT.jar against opentelemetry-spring-boot-autoconfigure-2.8.0.jar | ||
No changes. | ||
=== UNCHANGED CLASS: PUBLIC io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration (not serializable) | ||
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0 | ||
*** MODIFIED ANNOTATION: org.springframework.boot.context.properties.EnableConfigurationProperties | ||
*** MODIFIED ELEMENT: value=io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtlpExporterProperties,io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelResourceProperties,io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelSpringProperties (<- io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtlpExporterProperties,io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelResourceProperties,io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.PropagationProperties) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
243 changes: 243 additions & 0 deletions
243
...emetry/instrumentation/spring/autoconfigure/internal/properties/OtelSpringProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,243 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
* any time. | ||
*/ | ||
// yaml lists only work if you create a @ConfigurationProperties object | ||
@ConfigurationProperties(prefix = "otel") | ||
public final class OtelSpringProperties { | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
* any time. | ||
*/ | ||
public static final class Java { | ||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
public static final class Enabled { | ||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can | ||
* change at any time. | ||
*/ | ||
public static final class Resource { | ||
private List<String> providers = Collections.emptyList(); | ||
|
||
public List<String> getProviders() { | ||
return providers; | ||
} | ||
|
||
public void setProviders(List<String> providers) { | ||
this.providers = providers; | ||
} | ||
} | ||
|
||
private Enabled.Resource resource = new Enabled.Resource(); | ||
|
||
public Enabled.Resource getResource() { | ||
return resource; | ||
} | ||
|
||
public void setResource(Enabled.Resource resource) { | ||
this.resource = resource; | ||
} | ||
} | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
public static final class Disabled { | ||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can | ||
* change at any time. | ||
*/ | ||
public static final class Resource { | ||
private List<String> providers = Collections.emptyList(); | ||
|
||
public List<String> getProviders() { | ||
return providers; | ||
} | ||
|
||
public void setProviders(List<String> providers) { | ||
this.providers = providers; | ||
} | ||
} | ||
|
||
private Disabled.Resource resource = new Disabled.Resource(); | ||
|
||
public Disabled.Resource getResource() { | ||
return resource; | ||
} | ||
|
||
public void setResource(Disabled.Resource resource) { | ||
this.resource = resource; | ||
} | ||
} | ||
|
||
private Enabled enabled = new Enabled(); | ||
private Java.Disabled disabled = new Java.Disabled(); | ||
|
||
public Enabled getEnabled() { | ||
return enabled; | ||
} | ||
|
||
public void setEnabled(Enabled enabled) { | ||
this.enabled = enabled; | ||
} | ||
|
||
public Java.Disabled getDisabled() { | ||
return disabled; | ||
} | ||
|
||
public void setDisabled(Java.Disabled disabled) { | ||
this.disabled = disabled; | ||
} | ||
} | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
* any time. | ||
*/ | ||
public static final class Experimental { | ||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
public static final class Metrics { | ||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can | ||
* change at any time. | ||
*/ | ||
public static final class View { | ||
private List<String> config = Collections.emptyList(); | ||
|
||
public List<String> getConfig() { | ||
return config; | ||
} | ||
|
||
public void setConfig(List<String> config) { | ||
this.config = config; | ||
} | ||
} | ||
|
||
private View view = new View(); | ||
|
||
public View getView() { | ||
return view; | ||
} | ||
|
||
public void setView(View view) { | ||
this.view = view; | ||
} | ||
} | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
public static final class Resource { | ||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can | ||
* change at any time. | ||
*/ | ||
public static final class Disabled { | ||
private List<String> keys = Collections.emptyList(); | ||
|
||
public List<String> getKeys() { | ||
return keys; | ||
} | ||
|
||
public void setKeys(List<String> keys) { | ||
this.keys = keys; | ||
} | ||
} | ||
|
||
private Resource.Disabled disabled = new Resource.Disabled(); | ||
|
||
public Resource.Disabled getDisabled() { | ||
return disabled; | ||
} | ||
|
||
public void setDisabled(Resource.Disabled disabled) { | ||
this.disabled = disabled; | ||
} | ||
} | ||
|
||
private Metrics metrics = new Metrics(); | ||
private Resource resource = new Resource(); | ||
|
||
public Metrics getMetrics() { | ||
return metrics; | ||
} | ||
|
||
public void setMetrics(Metrics metrics) { | ||
this.metrics = metrics; | ||
} | ||
|
||
public Resource getResource() { | ||
return resource; | ||
} | ||
|
||
public void setResource(Resource resource) { | ||
this.resource = resource; | ||
} | ||
} | ||
|
||
private List<String> propagators = Collections.emptyList(); | ||
|
||
private Java java = new Java(); | ||
|
||
private Experimental experimental = new Experimental(); | ||
|
||
public List<String> getPropagators() { | ||
return propagators; | ||
} | ||
|
||
public void setPropagators(List<String> propagators) { | ||
this.propagators = propagators; | ||
} | ||
|
||
public Java getJava() { | ||
return java; | ||
} | ||
|
||
public void setJava(Java java) { | ||
this.java = java; | ||
} | ||
|
||
public Experimental getExperimental() { | ||
return experimental; | ||
} | ||
|
||
public void setExperimental(Experimental experimental) { | ||
this.experimental = experimental; | ||
} | ||
|
||
public List<String> getJavaEnabledResourceProviders() { | ||
return java.getEnabled().getResource().getProviders(); | ||
} | ||
|
||
public List<String> getJavaDisabledResourceProviders() { | ||
return java.getDisabled().getResource().getProviders(); | ||
} | ||
|
||
public List<String> getExperimentalMetricsViewConfig() { | ||
return experimental.getMetrics().getView().getConfig(); | ||
} | ||
|
||
public List<String> getExperimentalResourceDisabledKeys() { | ||
return experimental.getResource().getDisabled().getKeys(); | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
...metry/instrumentation/spring/autoconfigure/internal/properties/PropagationProperties.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.