Skip to content

Commit c7a708a

Browse files
committed
Use 0.4 file_format
1 parent e5fb69a commit c7a708a

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/DeclarativeConfigurationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DeclarativeConfigurationTest {
2323
@Test
2424
void configFile(@TempDir Path tempDir) throws IOException {
2525
String yaml =
26-
"file_format: \"0.3\"\n"
26+
"file_format: \"0.4\"\n"
2727
+ "resource:\n"
2828
+ " attributes:\n"
2929
+ " - name: service.name\n"

sdk-extensions/autoconfigure/src/testIncubating/java/io/opentelemetry/sdk/autoconfigure/DeclarativeConfigurationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class DeclarativeConfigurationTest {
6262
@BeforeEach
6363
void setup() throws IOException {
6464
String yaml =
65-
"file_format: \"0.3\"\n"
65+
"file_format: \"0.4\"\n"
6666
+ "resource:\n"
6767
+ " attributes:\n"
6868
+ " - name: service.name\n"
@@ -199,7 +199,7 @@ void configFile_setResultAsGlobalTrue() {
199199
@Test
200200
void configFile_Error(@TempDir Path tempDir) throws IOException {
201201
String yaml =
202-
"file_format: \"0.3\"\n"
202+
"file_format: \"0.4\"\n"
203203
+ "resource:\n"
204204
+ " attributes:\n"
205205
+ " - name: service.name\n"

sdk-extensions/incubator/src/main/java/io/opentelemetry/sdk/extension/incubator/fileconfig/OpenTelemetryConfigurationFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ static OpenTelemetryConfigurationFactory getInstance() {
3131
public OpenTelemetrySdk create(
3232
OpenTelemetryConfigurationModel model, SpiHelper spiHelper, List<Closeable> closeables) {
3333
OpenTelemetrySdkBuilder builder = OpenTelemetrySdk.builder();
34-
if (!"0.3".equals(model.getFileFormat())) {
34+
if (!"0.4".equals(model.getFileFormat())) {
3535
throw new DeclarativeConfigException(
36-
"Unsupported file format. Supported formats include: 0.3");
36+
"Unsupported file format. Supported formats include: 0.4");
3737
}
3838

3939
if (Objects.equals(Boolean.TRUE, model.getDisabled())) {

sdk-extensions/incubator/src/test/java/io/opentelemetry/sdk/extension/incubator/fileconfig/DeclarativeConfigurationCreateTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void parseAndCreate_Exception_CleansUpPartials() {
106106
// exporter with OTLP exporter, following by invalid batch exporter which references invalid
107107
// exporter "foo".
108108
String yaml =
109-
"file_format: \"0.3\"\n"
109+
"file_format: \"0.4\"\n"
110110
+ "logger_provider:\n"
111111
+ " processors:\n"
112112
+ " - batch:\n"
@@ -133,7 +133,7 @@ void parseAndCreate_Exception_CleansUpPartials() {
133133
@Test
134134
void parseAndCreate_EmptyComponentProviderConfig() {
135135
String yaml =
136-
"file_format: \"0.3\"\n"
136+
"file_format: \"0.4\"\n"
137137
+ "logger_provider:\n"
138138
+ " processors:\n"
139139
+ " - test:\n"
@@ -151,7 +151,7 @@ void parseAndCreate_EmptyComponentProviderConfig() {
151151
@Test
152152
void create_ModelCustomizer() {
153153
OpenTelemetryConfigurationModel model = new OpenTelemetryConfigurationModel();
154-
model.withFileFormat("0.3");
154+
model.withFileFormat("0.4");
155155
model.withTracerProvider(
156156
new TracerProviderModel()
157157
.withProcessors(

sdk-extensions/incubator/src/test/java/io/opentelemetry/sdk/extension/incubator/fileconfig/DeclarativeConfigurationParseTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void parse_BadInputStream() {
113113
void parse_KitchenSinkExampleFile() throws IOException {
114114
OpenTelemetryConfigurationModel expected = new OpenTelemetryConfigurationModel();
115115

116-
expected.withFileFormat("0.3");
116+
expected.withFileFormat("0.4");
117117
expected.withDisabled(false);
118118
expected.withLogLevel("info");
119119

@@ -705,7 +705,7 @@ void parse_KitchenSinkExampleFile() throws IOException {
705705
OpenTelemetryConfigurationModel config = DeclarativeConfiguration.parse(configExampleFile);
706706

707707
// General config
708-
assertThat(config.getFileFormat()).isEqualTo("0.3");
708+
assertThat(config.getFileFormat()).isEqualTo("0.4");
709709
assertThat(config.getResource()).isEqualTo(resource);
710710
assertThat(config.getAttributeLimits()).isEqualTo(attributeLimits);
711711
assertThat(config.getPropagator()).isEqualTo(propagator);
@@ -770,7 +770,7 @@ void parse_KitchenSinkExampleFile() throws IOException {
770770
@Test
771771
void parse_nullValuesParsedToEmptyObjects() {
772772
String objectPlaceholderString =
773-
"file_format: \"0.3\"\n"
773+
"file_format: \"0.4\"\n"
774774
+ "tracer_provider:\n"
775775
+ " processors:\n"
776776
+ " - batch:\n"
@@ -788,7 +788,7 @@ void parse_nullValuesParsedToEmptyObjects() {
788788
new ByteArrayInputStream(objectPlaceholderString.getBytes(StandardCharsets.UTF_8)));
789789

790790
String noOjbectPlaceholderString =
791-
"file_format: \"0.3\"\n"
791+
"file_format: \"0.4\"\n"
792792
+ "tracer_provider:\n"
793793
+ " processors:\n"
794794
+ " - batch:\n"
@@ -961,7 +961,7 @@ private static Map<String, Object> mapOf(Map.Entry<String, ?>... entries) {
961961
@Test
962962
void read_WithEnvironmentVariables() {
963963
String yaml =
964-
"file_format: \"0.3\"\n"
964+
"file_format: \"0.4\"\n"
965965
+ "tracer_provider:\n"
966966
+ " processors:\n"
967967
+ " - batch:\n"
@@ -980,7 +980,7 @@ void read_WithEnvironmentVariables() {
980980
assertThat(model)
981981
.isEqualTo(
982982
new OpenTelemetryConfigurationModel()
983-
.withFileFormat("0.3")
983+
.withFileFormat("0.4")
984984
.withTracerProvider(
985985
new TracerProviderModel()
986986
.withProcessors(

sdk-extensions/incubator/src/test/java/io/opentelemetry/sdk/extension/incubator/fileconfig/OpenTelemetryConfigurationFactoryTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void create_InvalidFileFormat() {
8787
OpenTelemetryConfigurationFactory.getInstance()
8888
.create(testCase, spiHelper, closeables))
8989
.isInstanceOf(DeclarativeConfigException.class)
90-
.hasMessage("Unsupported file format. Supported formats include: 0.3");
90+
.hasMessage("Unsupported file format. Supported formats include: 0.4");
9191
cleanup.addCloseables(closeables);
9292
}
9393
}
@@ -101,7 +101,7 @@ void create_Defaults() {
101101
OpenTelemetrySdk sdk =
102102
OpenTelemetryConfigurationFactory.getInstance()
103103
.create(
104-
new OpenTelemetryConfigurationModel().withFileFormat("0.3"), spiHelper, closeables);
104+
new OpenTelemetryConfigurationModel().withFileFormat("0.4"), spiHelper, closeables);
105105
cleanup.addCloseable(sdk);
106106
cleanup.addCloseables(closeables);
107107

@@ -118,7 +118,7 @@ void create_Disabled() {
118118
OpenTelemetryConfigurationFactory.getInstance()
119119
.create(
120120
new OpenTelemetryConfigurationModel()
121-
.withFileFormat("0.3")
121+
.withFileFormat("0.4")
122122
.withDisabled(true)
123123
// Logger provider configuration should be ignored since SDK is disabled
124124
.withLoggerProvider(
@@ -213,7 +213,7 @@ void create_Configured() {
213213
OpenTelemetryConfigurationFactory.getInstance()
214214
.create(
215215
new OpenTelemetryConfigurationModel()
216-
.withFileFormat("0.3")
216+
.withFileFormat("0.4")
217217
.withPropagator(
218218
new PropagatorModel()
219219
.withCompositeList("tracecontext,baggage,ottrace,b3multi,b3,jaeger"))

sdk-extensions/incubator/src/test/java/io/opentelemetry/sdk/extension/incubator/fileconfig/YamlDeclarativeConfigPropertiesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class YamlDeclarativeConfigPropertiesTest {
2323

2424
private static final String extendedSchema =
25-
"file_format: \"0.3\"\n"
25+
"file_format: \"0.4\"\n"
2626
+ "disabled: false\n"
2727
+ "\n"
2828
+ "resource:\n"
@@ -69,7 +69,7 @@ void setup() {
6969
@Test
7070
void configurationSchema() {
7171
// Validate can read declarative configuration schema properties
72-
assertThat(structuredConfigProps.getString("file_format")).isEqualTo("0.3");
72+
assertThat(structuredConfigProps.getString("file_format")).isEqualTo("0.4");
7373
DeclarativeConfigProperties resourceProps = structuredConfigProps.getStructured("resource");
7474
assertThat(resourceProps).isNotNull();
7575
List<DeclarativeConfigProperties> resourceAttributesList =

0 commit comments

Comments
 (0)