@@ -15,6 +15,8 @@ linkTitle: File
1515- [ SDK Configuration] ( #sdk-configuration )
1616 * [ In-Memory Configuration Model] ( #in-memory-configuration-model )
1717 * [ Operations] ( #operations )
18+ + [ Parse] ( #parse )
19+ + [ Create] ( #create )
1820- [ References] ( #references )
1921
2022<!-- tocstop -->
@@ -66,10 +68,54 @@ name `Configuration` is RECOMMENDED.
6668
6769### Operations
6870
69- TODO: define how to parse configuration file to configuration model
71+ SDK implementations of configuration MUST provide the following operations.
7072
71- TODO: define how to apply configuration model to produce configured sdk
72- components
73+ Note: Because these operations are stateless pure functions, they are not
74+ defined as part of any type, class, interface, etc. SDKs may organize them in
75+ whatever manner is idiomatic for the language.
76+
77+ TODO: Add operation to update SDK components with new configuration for usage
78+ with OpAmp
79+
80+ #### Parse
81+
82+ Parse and validate a [ configuration file] ( #configuration-file ) .
83+
84+ ** Parameters:**
85+
86+ * ` file ` : The [ configuration file] ( #configuration-file ) to parse. This MAY be a
87+ file path, or language specific file data structure, or a stream of a file's content.
88+
89+ ** Returns:** [ configuration model] ( #in-memory-configuration-model )
90+
91+ This SHOULD return an error if:
92+
93+ * The ` file ` doesn't exist or is invalid
94+ * The parsed ` file ` content does not conform to
95+ the [ configuration model] ( #configuration-model ) schema.
96+
97+ TODO: define behavior if some portion of configuration model is not supported
98+
99+ #### Create
100+
101+ Interpret [ configuration model] ( #in-memory-configuration-model ) and return SDK components.
102+
103+ ** Parameters:**
104+
105+ * ` configuration ` - The configuration model.
106+
107+ ** Returns:** Top level SDK components:
108+
109+ * ` TracerProvider `
110+ * ` MeterProvider `
111+ * ` LoggerProvider `
112+ * ` Propagators `
113+
114+ The multiple responses MAY be returned using a tuple, or some other data
115+ structure encapsulating the components.
116+
117+ This SHOULD return an error if it encounters an error in ` configuration ` (i.e.
118+ fail fast).
73119
74120## References
75121
0 commit comments