Skip to content

Conversation

@brettmc
Copy link
Contributor

@brettmc brettmc commented Dec 12, 2024

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.

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
@codecov
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 5.42373% with 279 lines in your changes missing coverage. Please review.

Project coverage is 72.39%. Comparing base (4b575e6) to head (04476d9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nfiguration/Internal/ComponentProviderRegistry.php 0.00% 59 Missing ⚠️
.../Config/SDK/ComponentProvider/OpenTelemetrySdk.php 0.00% 42 Missing ⚠️
...nfig/SDK/Configuration/Internal/Node/NodeTrait.php 0.00% 24 Missing ⚠️
...on/Internal/NodeDefinition/ArrayNodeDefinition.php 0.00% 17 Missing ⚠️
...nfig/SDK/Configuration/Internal/Node/ArrayNode.php 0.00% 16 Missing ⚠️
...onfiguration/Internal/Node/PrototypedArrayNode.php 0.00% 16 Missing ⚠️
...fig/SDK/Configuration/Internal/Node/StringNode.php 0.00% 8 Missing ⚠️
...on/Internal/NodeDefinition/NodeDefinitionTrait.php 0.00% 8 Missing ⚠️
src/Config/SDK/Configuration/Validation.php 0.00% 8 Missing ⚠️
...der/Instrumentation/General/HttpConfigProvider.php 0.00% 6 Missing ⚠️
... and 33 more
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1452      +/-   ##
============================================
- Coverage     73.26%   72.39%   -0.87%     
- Complexity     2686     2730      +44     
============================================
  Files           390      401      +11     
  Lines          8026     8148     +122     
============================================
+ Hits           5880     5899      +19     
- Misses         2146     2249     +103     
Flag Coverage Δ
8.1 72.00% <5.42%> (-0.91%) ⬇️
8.2 72.15% <5.42%> (-0.91%) ⬇️
8.3 72.15% <5.42%> (-1.03%) ⬇️
8.4 72.14% <5.42%> (-1.01%) ⬇️
8.5 72.27% <5.42%> (-0.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../Config/SDK/Configuration/ConfigurationFactory.php 100.00% <100.00%> (ø)
...guration/Internal/EnvSubstitutionNormalization.php 0.00% <ø> (ø)
src/SDK/Metrics/Stream/DeltaStorage.php 100.00% <ø> (ø)
...Provider/Propagator/TextMapPropagatorComposite.php 0.00% <0.00%> (ø)
...der/Instrumentation/General/PeerConfigProvider.php 0.00% <0.00%> (ø)
...omponentProvider/Logs/LogRecordExporterConsole.php 0.00% <0.00%> (ø)
...ComponentProvider/Logs/LogRecordProcessorBatch.php 0.00% <0.00%> (ø)
...omponentProvider/Logs/LogRecordProcessorSimple.php 0.00% <0.00%> (ø)
...entProvider/Metrics/AggregationResolverDefault.php 0.00% <0.00%> (ø)
...omponentProvider/Metrics/MetricExporterConsole.php 0.00% <0.00%> (ø)
... and 36 more

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b575e6...04476d9. Read the comment docs.

@brettmc brettmc marked this pull request as ready for review December 12, 2024 05:26
@brettmc brettmc requested a review from a team as a code owner December 12, 2024 05:26
Copy link
Contributor

@Nevay Nevay left a 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).

@bobstrecansky bobstrecansky marked this pull request as draft December 18, 2024 13:04

public function defaultValue(mixed $value): static
{
$this->validate()->ifNull()->then(static function () use ($value): mixed {
Copy link
Contributor Author

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"

@brettmc brettmc marked this pull request as ready for review December 19, 2024 04:56
@brettmc
Copy link
Contributor Author

brettmc commented Dec 23, 2024

@open-telemetry/php-approvers ready for review :)

@brettmc
Copy link
Contributor Author

brettmc commented Dec 23, 2024

...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.

@Nevay
Copy link
Contributor

Nevay commented Dec 24, 2024

Symfony ^5.4 and ^6.4 are compatible with PHP 8.1.
It should be possible to make the code compatible with the LTS releases while keeping compatibility with Symfony ^7.1 / the psalm errors seem easily fixable.

@brettmc
Copy link
Contributor Author

brettmc commented Jan 6, 2025

It should be possible to make the code compatible with the LTS releases while keeping compatibility with Symfony ^7.1 / the psalm errors seem easily fixable.

modified to work with LTS symfony/config + php8.1

Copy link
Contributor

@bobstrecansky bobstrecansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General implementation of the Symfony NodeBuilder. LGTM, thanks for this @brettmc !

@brettmc brettmc merged commit 83cddd9 into open-telemetry:main Jan 9, 2025
10 of 11 checks passed
@brettmc brettmc deleted the config-0.3 branch January 29, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants