-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
declarative config 0.3+ support #1452
base: main
Are you sure you want to change the base?
Conversation
since open-telemetry/opentelemetry-specification#4269 empty keys are allows, and NULL is no longer equivalent to unset
some of the components in the kitchen-sink config are not implemented, or are implemented in a different repo. for now, implement no-op versions and log a warning if they're used. as of this commit, we can fully parse the kitchen-sink.yaml config, which will become v0.4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some dummy/noop implementations of metrics components which are configurable but not implemented in our SDK
I'm not sure whether we should add not (yet) supported component providers (personally would prefer failing fast). Sadly the spec doesn't define the behavior yet ("TODO: define behavior if some portion of configuration model is not supported").
added noop support for xray and ottrace propagators (xray could be migrated into core from contrib?)
We could add a component provider with a PackageDependency
on open-telemetry/contrib-aws
, similar to other propagators that are also published in different packages (e.g. the B3 propagators).
src/Config/SDK/ComponentProvider/Logs/LogRecordExporterConsole.php
Outdated
Show resolved
Hide resolved
src/Config/SDK/ComponentProvider/Metrics/AggregationResolverExplicitBucketHistogram.php
Outdated
Show resolved
Hide resolved
|
||
public function defaultValue(mixed $value): static | ||
{ | ||
$this->validate()->ifNull()->then(static function () use ($value): mixed { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where I implemented "null/empty values with a default should use the default"
I was unable to implement 0.3.0 per-spec due to complexity in the metric reader section, which has since been fixed in open-telemetry/opentelemetry-configuration#148 so this updates to commit open-telemetry/opentelemetry-configuration@1645262 which is somewhere between 0.3 and 0.4
We can now parse the full kitchen-sink example (except for a warning about merging different schema versions).
Some dummy/placeholder component providers have been added to tests/Integration to cover components that are referenced in kitchen-sink.yaml but not implemented in our SDK.