MrAlias / otel-schema

Playground to prototype and investigate configuration schema proposals for OpenTelemetry
Apache License 2.0
2 stars 7 forks source link

How is validation implemented for instrumentations? #36

Open codeboten opened 1 year ago

codeboten commented 1 year ago

Instrumentations may need to define their own configuration options and validations. How can this be included? Should this just be a known limitation for this OTEP?

codeboten commented 1 year ago

After a follow up discussion, this is true for any custom component. For example a custom exporter may need to run its own validation on the configuration. The question is what does this look like for any component? Is there a generic Validateable interface that should be defined here?

srikanthccv commented 1 year ago

Can we say that optional components can register some validation callback or something with the SDK, and SDK will invoke that function while validating components known to it; otherwise, no validation will be performed for custom components?