From bfd845a8cbba5fde56a58aec7a4425177facb3c8 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Tue, 20 Aug 2024 15:49:04 -0600 Subject: [PATCH] validator: update readme docs for -s/--schema option --- validator/README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/validator/README.md b/validator/README.md index 86e33a2..f4c88e7 100644 --- a/validator/README.md +++ b/validator/README.md @@ -1,8 +1,10 @@ ## OpenTelemetry SDK Configuration Validator -This application will replace environment variables in values of valid yaml files, following the rules of [file configuration environment variable +This application will replace environment variables in values of valid yaml +files, following the rules of [file configuration environment variable substitution](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#environment-variable-substitution), -before validating that result against the [OpenTelemetry SDK Configuration +before validating that result against a version of the [OpenTelemetry SDK +Configuration schema](https://github.com/open-telemetry/opentelemetry-configuration/). ### Build @@ -21,6 +23,10 @@ Same is true for building the docker image: $ make validator-docker ``` +The schema in the `schema` directory is the default that will be used when +running the validator. To use a different schema a directory containing the +schema can be passed with `-s`/`--schema`. + ### Usage The command `otel_config_validator` takes one argument, the path to the yaml @@ -49,6 +55,15 @@ Environment variable substitution is supported with the syntax `${VARIABLE}` or `${env:VARIABLE}`. Default values are supported in the form `${VARIABLE:-default}`. +#### Using a Different Schema Version + +To use a version of of the schema other than the one builtin to the +`otel_config_validator` executable pass the `-s ` option: + +``` +$ ./otel_config_validator -o out.json -s .../some/path/opentelemetry-configuration-0.1.0/ ../examples/kitchen-sink.yaml +``` + ### Testing Run the Go unit tests: