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
If a user sets the following configuration, I would expect a configuration error to be returned:
I think it should return an error today.
Its a question of when the error should be returned. Today, a blank / empty string is a valid entry in propagator.composite, but when create is called it doesn't find any propagator called with blank / empty name and produces an error.
By adding an additional JSON schema constraint around the length, we arguably shift the error generation to when parse is called.
I say "arguably" because there's no consistency in how JSON schema tooling works. Some, like the tooling we use in opentelemetry-java, is great for generating bindings from the schema, but doesn't attempt to enforce the validation. So we implement all the validation when interpreting the in-memory model in create. But a language with JSON schema tooling which better incorporates the validation keywords might be able to produce an error in parse.
If a user sets the following configuration, I would expect a configuration error to be returned:
This would ensure that implementations follow the same pattern. The configuration above is currently valid as defined by the schema https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema/propagator.json, I suggest we add a NonEmptyString type and use that as the type for propagator configuration.
The text was updated successfully, but these errors were encountered: