Skip to content

Commit

Permalink
validator: update readme docs for -s/--schema option
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed Aug 20, 2024
1 parent 772de78 commit bfd845a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions validator/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 <directory>` 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:
Expand Down

0 comments on commit bfd845a

Please sign in to comment.