Skip to content

Commit 28fe6c3

Browse files
authored
Add schema modeling guidance to use wildcard syntax instead of regex (#71)
* Add schema modeling guidance to use wildcard syntax instead of regex * Update guidance to include included, excluded properties
1 parent a87ec9e commit 28fe6c3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ Allowable changes:
3131
- For major versions: All changes are permitted.
3232
- For minor versions: TBD
3333

34-
## Naming guidelines
34+
## Schema Modeling Guidelines
3535

36-
The following defines guidelines used to produce configuration schema:
36+
The following guidelines are used to model the configuration schema:
3737

38-
1. To remove redundant information from the configuration file, prefixes for data produced by each of the providers
39-
will be removed from configuration options. For example, under the `meter_provider` configuration, metric readers will be
40-
identified by the word `readers` rather than by `metric_readers`. Similarly, the prefix `span_` will be dropped for tracer
41-
provider configuration, and `logrecord` for logger provider.
38+
* To remove redundant information from the configuration file, prefixes for data produced by each of the providers will be removed from configuration options. For example, under the `meter_provider` configuration, metric readers will be identified by the word `readers` rather than by `metric_readers`. Similarly, the prefix `span_` will be dropped for tracer provider configuration, and `logrecord` for logger provider.
39+
* Use wildcard `*` (match any number of any character, including none) and `?` (match any single character) instead of regex. If a single property with wildcards is likely to be insufficient, accept `included` and `excluded` properties, each with an array of strings with wildcard entries. The wildcard entries should be joined with a logical OR. If `included` is not specified, assume that all entries are included. Apply `excluded` after applying `included`. Examples:
40+
* Given `excluded: ["a*"]`: Match all except values starting with `a`.
41+
* Given `included: ["a*", "b*"]`, `excluded: ["ab*"]`: Match any value starting with `a` or `b`, excluding values starting with `ab`.
42+
* Given `included: ["a", "b"]`, `excluded: ["a"]`: Match values equal to `b`.

0 commit comments

Comments
 (0)