You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/add_new_configurations.md
+29-9Lines changed: 29 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,20 +32,40 @@ In order to properly add a new configuration in the library, follow the below st
32
32
1. This field should be final and not changed during runtime. If the value of a configuration needs to be changed, it can be done through a Snapshot with Dynamic Configuration. See [DynamicConfig.java](../internal-api/src/main/java/datadog/trace/api/DynamicConfig.java).
33
33
5. Create a getter for the field in `Config.java` to allow other classes to access the value of the configuration.
34
34
6. Add the configuration to the `toString()` method of `Config.java` for logging purposes.
35
-
7. Add the Environment Variable name of the configuration to the `supportedConfigurations` key of `metadata/supported-configurations.json` in the format of `ENV_VAR: ["VERSION", ...]`. If the configuration already existed in another library, add the version listed on the Feature Parity Dashboard. If introducing a new configuration, provide a version of `A`.
36
-
1. If there are aliases of the Environment Variable, add them to the `aliases` key of the file.
35
+
7. Add the Environment Variable name of the configuration to the `supportedConfigurations` key of `metadata/supported-configurations.json`.
36
+
1. The key is the Environment Variable name, and the value is an array of objects with the following fields:
37
+
1. Version.
38
+
1. If introducing a new configuration, provide a version of `A`.
39
+
2. If the configuration already exists in the Feature Parity Dashboard and has the same implementation details as an existing Configuration Version, add the version listed on the Feature Parity Dashboard. Else, introduce a new Configuration Version, fill in the proper documentation, and use the version provided.
40
+
2. Type. This is a _mandatory_ field and has the options of boolean, int, decimal, string, map, array. If the configuration is eventually converted to an Enum or other class, use type String.
41
+
3. Default. This is a _mandatory_ field and accepts null as a valid value.
42
+
4. Aliases. This is a _mandatory_ field. If there are no aliases for the configuration, use an empty array as the value.
43
+
5. PropertyKeys. This is an _optional_ field that should only be used if there are additional telemetry keys being sent from the tracer (that are not the environment variable itself).
37
44
38
-
See below for the format of the `supported-configurations.json` file.
45
+
See below for an example of the `supported-configurations.json` file.
39
46
```
40
47
{
41
48
"supportedConfigurations": {
42
-
"DD_ENV_VAR": ["A"],
43
-
"DD_TEST_VAR": ["A"]
44
-
},
45
-
"aliases": {
46
-
"DD_ENV_VAR": ["DD_ENV_ALIAS"]
47
-
},
49
+
"DD_SERVICE": [
50
+
{
51
+
"version": "D", // Mandatory, generated by Feature Parity Dashboard
0 commit comments