Skip to content

Commit 3a86394

Browse files
committed
adapted from feedback
1 parent c69e75b commit 3a86394

11 files changed

Lines changed: 130 additions & 371 deletions

File tree

api/incubator/src/main/java/io/opentelemetry/api/incubator/config/ConfigProvider.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ default ConfigChangeRegistration addConfigChangeListener(
9999
*
100100
* @param path the declarative configuration path to update
101101
* @param newSubtree the new configuration subtree to set at the path
102+
* @throws DeclarativeConfigException if an intermediate segment of the path resolves to a
103+
* non-mapping value (e.g., a scalar or list), indicating a schema conflict
102104
*/
103105
default void updateConfig(String path, DeclarativeConfigProperties newSubtree) {}
104106

@@ -116,6 +118,8 @@ default void updateConfig(String path, DeclarativeConfigProperties newSubtree) {
116118
* @param key the property key within the path
117119
* @param value the new value for the property (must be a scalar: String, Boolean, Long, Double,
118120
* Integer, or a List of scalars)
121+
* @throws DeclarativeConfigException if an intermediate segment of the path resolves to a
122+
* non-mapping value (e.g., a scalar or list), indicating a schema conflict
119123
*/
120124
default void setConfigProperty(String path, String key, Object value) {}
121125

api/incubator/src/main/java/io/opentelemetry/api/incubator/config/DeclarativeConfigProperties.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@ static Map<String, Object> toMap(DeclarativeConfigProperties declarativeConfigPr
4343
return DeclarativeConfigPropertyUtil.toMap(declarativeConfigProperties);
4444
}
4545

46-
/**
47-
* Create a {@link DeclarativeConfigProperties} from a {@code Map<String, Object>}.
48-
*
49-
* <p>This is the inverse of {@link #toMap(DeclarativeConfigProperties)}. Values in the map are
50-
* expected to follow the same conventions: scalars, lists of scalars, nested maps, and lists of
51-
* maps.
52-
*
53-
* @param map the map to wrap
54-
* @param componentLoader the component loader to use
55-
* @return a {@link DeclarativeConfigProperties} backed by the map
56-
*/
57-
static DeclarativeConfigProperties fromMap(
58-
Map<String, Object> map, ComponentLoader componentLoader) {
59-
return new MapBackedDeclarativeConfigProperties(map, componentLoader);
60-
}
61-
6246
/**
6347
* Returns a {@link String} configuration property.
6448
*

api/incubator/src/main/java/io/opentelemetry/api/incubator/config/MapBackedDeclarativeConfigProperties.java

Lines changed: 0 additions & 146 deletions
This file was deleted.

api/incubator/src/test/java/io/opentelemetry/api/incubator/config/InstrumentationConfigUtilTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import com.google.common.collect.ImmutableMap;
1111
import io.opentelemetry.sdk.extension.incubator.fileconfig.DeclarativeConfiguration;
12-
import io.opentelemetry.sdk.extension.incubator.fileconfig.YamlDeclarativeConfigProperties;
12+
import io.opentelemetry.sdk.internal.YamlDeclarativeConfigProperties;
1313
import io.opentelemetry.sdk.internal.SdkConfigProvider;
1414
import java.io.ByteArrayInputStream;
1515
import java.nio.charset.StandardCharsets;

api/incubator/src/test/java/io/opentelemetry/api/incubator/config/MapBackedDeclarativeConfigPropertiesTest.java

Lines changed: 0 additions & 165 deletions
This file was deleted.

0 commit comments

Comments
 (0)