declarative config 0.3+ support#1452
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
Nevay
left a comment
There was a problem hiding this comment.
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.
this is where I implemented "null/empty values with a default should use the default"
|
@open-telemetry/php-approvers ready for review :) |
|
...just realised this is not compatible with php8.1 due to symfony/config. This might be a time to start talking about branching for a v2 release, which I've started a PR to work on. |
|
Symfony |
modified to work with LTS symfony/config + php8.1 |
bobstrecansky
left a comment
There was a problem hiding this comment.
General implementation of the Symfony NodeBuilder. LGTM, thanks for this @brettmc !
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.