Skip to content

implement declarative config 1.0 - #2068

Merged
brettmc merged 14 commits into
open-telemetry:mainfrom
brettmc:decl-config-1.0
Oct 12, 2026
Merged

brettmc merged 14 commits into
open-telemetry:mainfrom
brettmc:decl-config-1.0

Conversation

@brettmc

@brettmc brettmc commented Oct 2, 2026

Copy link
Copy Markdown
Contributor
  • Implements file_format: "1.0"
  • Remove zipkin and ottrace component providers, as they have been removed from config from v1.0.0
  • reorganise sdk-config test fixtures to use the snippets and examples defined upstream
  • provide a bash script under script/config-snippets to sync upstream snippets and example yaml into our repo
  • split config yaml into "ours" and "upstream" in tests

Assisted-By: Claude Opus 4.5

- Implements [file_format: "1.0"](https://github.com/open-telemetry/opentelemetry-configuration/tree/v1.0.0)
- Remove zipkin and ottrace component providers, as they have been removed from config from v1.0.0
- reorganise sdk-config test fixtures to use the [snippets](https://github.com/open-telemetry/opentelemetry-configuration/tree/v1.0.0/snippets) and examples defined upstream
- provide a bash script under `script/config-snippets` to sync upstream snippets and example yaml into our repo
- split config yaml into "ours" and "upstream" in tests

Assisted-By: Claude Opus 4.5
@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.59621% with 293 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.95%. Comparing base (fe8f427) to head (7f00e3b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../Config/SDK/ComponentProvider/OpenTelemetrySdk.php 0.00% 88 Missing ⚠️
...omponentProvider/Metrics/MetricExporterConsole.php 0.00% 21 Missing ⚠️
...mponentProvider/Metrics/MetricExporterOtlpGrpc.php 0.00% 20 Missing ⚠️
...nfiguration/Internal/ComponentProviderRegistry.php 0.00% 20 Missing ⚠️
...mponentProvider/Logs/LogRecordExporterOtlpGrpc.php 0.00% 17 Missing ⚠️
...mponentProvider/Metrics/MetricExporterOtlpHttp.php 0.00% 17 Missing ⚠️
...K/ComponentProvider/Trace/SpanExporterOtlpGrpc.php 0.00% 17 Missing ⚠️
...mponentProvider/Logs/LogRecordExporterOtlpHttp.php 0.00% 14 Missing ⚠️
...K/ComponentProvider/Trace/SpanExporterOtlpHttp.php 0.00% 14 Missing ⚠️
.../Configuration/Internal/SkippedComponentPlugin.php 0.00% 9 Missing ⚠️
... and 12 more
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2068      +/-   ##
============================================
- Coverage     67.67%   66.95%   -0.72%     
- Complexity     3076     3130      +54     
============================================
  Files           455      456       +1     
  Lines          9035     9212     +177     
============================================
+ Hits           6114     6168      +54     
- Misses         2921     3044     +123     
Flag Coverage Δ
8.1 66.69% <20.59%> (-0.68%) ⬇️
8.2 66.87% <20.59%> (-0.66%) ⬇️
8.3 66.85% <20.59%> (-0.75%) ⬇️
8.4 66.89% <20.59%> (-0.67%) ⬇️
8.5 66.85% <20.59%> (-0.70%) ⬇️
8.6 66.88% <20.59%> (-0.67%) ⬇️

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

Files with missing lines Coverage Δ
src/API/Logs/Severity.php 100.00% <100.00%> (ø)
.../Config/SDK/Configuration/ConfigurationFactory.php 100.00% <100.00%> (ø)
src/Contrib/Otlp/LogsExporterFactory.php 96.07% <100.00%> (+12.44%) ⬆️
src/Contrib/Otlp/MetricExporterFactory.php 96.66% <100.00%> (+10.72%) ⬆️
src/Contrib/Otlp/SpanExporterFactory.php 95.74% <100.00%> (+13.39%) ⬆️
src/SDK/Common/Distribution/SdkDistribution.php 0.00% <ø> (ø)
...gEnv/Distribution/DistributionConfigurationSdk.php 80.00% <100.00%> (+80.00%) ⬆️
src/SDK/SdkAutoloader.php 92.10% <100.00%> (ø)
src/SDK/SdkBuilder.php 100.00% <100.00%> (ø)
...tProvider/InstrumentationConfigurationRegistry.php 0.00% <0.00%> (ø)
... and 21 more

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brettmc
brettmc marked this pull request as ready for review October 2, 2026 03:58
@brettmc
brettmc requested a review from a team as a code owner October 2, 2026 03:58
…ders

- honour `tls.insecure` in the OTLP gRPC component providers by prepending
  a scheme to scheme-less endpoints, which is how GrpcTransportFactory
  selects secure vs insecure channel credentials
- extract the shared scheme/insecure logic into OtlpUtil::applyScheme(),
  replacing the copy in each of the three env-based exporter factories
- log unknown providers at warning, not info, per the configuration spec's
  "warn and skip" behaviour
`log_level` is recorded on SdkBuilder at parse time and applied to the
internal logger only by buildAndRegisterGlobal(), so parsing a config file
no longer mutates process-global logging state.

Adds Severity::fromName() and Severity::toPsr3(): the config enum uses OTel
severity names but the internal logger is PSR-3, and Logging::level('warn')
silently falls back to 'info', so the setting needs mapping rather than
passing through. The spec's example mappings pin only some cases; the rest
map to the nearest pinned case at or below them, which keeps the mapping
monotonic for use as a threshold.
enables env var substitution in composite_list
Extend the IgnoresUnknownProviders opt-in from componentMap to componentList
and set it on `detectors`, so an unrecognised detector warns and is skipped
instead of failing startup. Skipped prototype entries finalize to null and are
filtered out of the list, leaving the remaining detectors to run.

Resource detectors are the only component the spec marks "warn and skip";
tests cover both that and a span processor still erroring.
Unknown providers were warned about during parsing, through the global
LogsMessagesTrait, so a configured log_level could never apply: it is not set
globally until buildAndRegisterGlobal(), long after parsing.

Skipped entries now resolve to a SkippedComponentPlugin which warns through
Context::$logger when created, and consumers filter the resulting nulls.
OpenTelemetrySdk::createPlugin() binds a ConfiguredLogger carrying the
configured level, so the warning is filtered without touching global state.

Adds Context::withLogger(); the default logger changes from NullLogger to a
ConfiguredLogger deferring to the global level, so unconfigured runs still warn.
phpstan 2.3.0 complains about this
@brettmc
brettmc requested review from Nevay and a balanced review from Copilot and removed request for Nevay October 9, 2026 01:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Valid 1.0 metric temporality and propagator configurations are currently rejected by the implementation and example.

5 open findings
What changed in this PR

Implements declarative configuration format 1.0 across SDK configuration parsing, component providers, examples, and tests.

Changes:

  • Adds 1.0 schema handling, logging configuration, TLS fields, and environment substitution improvements.
  • Removes obsolete Zipkin, peer, and OTTrace providers.
  • Synchronizes and validates upstream 1.0 examples and snippets.
File Description
tests/​Unit/​SDK/​SdkBuilderTest.php Tests configured log levels.
tests/​Unit/​SDK/​fixtures/​otel-sdk.yaml Updates fixture to 1.0.
tests/​Unit/​Config/​SDK/​Configuration/​SubstitutionTest.php Tests node-level substitution.
tests/​Unit/​Config/​SDK/​Configuration/​configurations/​kitchen-sink.yaml Removes obsolete Zipkin config.
tests/​Unit/​Config/​SDK/​Configuration/​ConfigurationFactoryTest.php Expands substitution coverage.
tests/​Unit/​Config/​SDK/​ComponentProvider/​OtlpExporterTlsTest.php Tests OTLP TLS wiring.
tests/​Unit/​API/​Logs/​SeverityTest.php Tests severity conversions.
tests/​TestState.php Restores $_SERVER test state.
tests/​Integration/​Config/​ConfigurationTest.php Expands 1.0 integration coverage.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​View_override_default_histogram_buckets.yaml Adds upstream view snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​View_kitchen_sink.yaml Adds comprehensive view snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​SpanLimits_kitchen_sink.yaml Adds span-limit snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​Sampler_rule_based_kitchen_sink.yaml Adds rule sampler snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​Sampler_probability_kitchen_sink.yaml Adds probability sampler snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​Sampler_parent_based_typical.yaml Adds parent sampler snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​Resource_kitchen_sink.yaml Adds resource snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​Propagator_kitchen_sink.yaml Adds propagator snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​OtlpHttpMetricExporter_use_base2_exponential_histogram.yaml Adds histogram exporter snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​OtlpHttpMetricExporter_metrics_kitchen_sink.yaml Adds HTTP metric exporter snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​OtlpHttpExporter_traces_kitchen_sink.yaml Adds HTTP trace exporter snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​OtlpHttpExporter_logs_kitchen_sink.yaml Adds HTTP log exporter snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​OtlpGrpcMetricExporter_metrics_kitchen_sink.yaml Adds gRPC metric snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​OtlpGrpcExporter_traces_kitchen_sink.yaml Adds gRPC trace snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​OtlpGrpcExporter_logs_kitchen_sink.yaml Adds gRPC log snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​LogRecordLimits_kitchen_sink.yaml Adds log-limit snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalTracerConfigurator_kitchen_sink.yaml Adds tracer configurator snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalPrometheusMetricExporter_kitchen_sink.yaml Adds Prometheus snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalOtlpFileMetricExporter_metrics_stdout.yaml Adds stdout metric snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalOtlpFileMetricExporter_metrics_file.yaml Adds file metric snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalOtlpFileExporter_traces_stdout.yaml Adds stdout trace snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalOtlpFileExporter_traces_file.yaml Adds file trace snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalOtlpFileExporter_logs_stdout.yaml Adds stdout log snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalOtlpFileExporter_logs_file.yaml Adds file log snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalMeterConfigurator_kitchen_sink.yaml Adds meter configurator snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalLoggerConfigurator_kitchen_sink.yaml Adds logger configurator snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalInstrumentation_kitchen_sink.yaml Adds instrumentation snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ExperimentalGeneralInstrumentation_semconv_stability_opt_in.yaml Adds semconv snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ConsoleMetricExporter_traces_kitchen_sink.yaml Adds console metric snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ConsoleExporter_traces_kitchen_sink.yaml Adds console trace snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​ConsoleExporter_logs_kitchen_sink.yaml Adds console log snippet.
tests/​Integration/​Config/​configurations/​upstream/​snippets/​CardinalityLimits_kitchen_sink.yaml Adds cardinality snippet.
tests/​Integration/​Config/​configurations/​upstream/​README.md Documents synced fixtures.
tests/​Integration/​Config/​configurations/​upstream/​examples/​otel-sdk-migration-config.yaml Adds migration example.
tests/​Integration/​Config/​configurations/​upstream/​examples/​otel-sdk-config.yaml Adds comprehensive example.
tests/​Integration/​Config/​configurations/​upstream/​examples/​otel-getting-started.yaml Adds starter example.
tests/​Integration/​Config/​configurations/​resource.yaml Updates format version.
tests/​Integration/​Config/​configurations/​resource-include-exclude.yaml Updates format version.
tests/​Integration/​Config/​configurations/​resource-default.yaml Updates format version.
tests/​Integration/​Config/​configurations/​README.md Documents owned fixtures.
tests/​Integration/​Config/​configurations/​propagators-env-substitution.yaml Adds substitution fixture.
tests/​Integration/​Config/​configurations/​propagators-duplicate.yaml Updates format version.
tests/​Integration/​Config/​configurations/​php-specific.yaml Updates PHP fixture.
tests/​Integration/​Config/​configurations/​minimal.yaml Updates minimal fixture.
tests/​Integration/​Config/​configurations/​kitchen-sink.yaml Removes superseded fixture.
tests/​Integration/​Config/​configurations/​experimental-response-propagators-duplicate.yaml Updates response fixture.
tests/​Integration/​Config/​configurations/​empty-tracer-config.yaml Updates tracer fixture.
tests/​Integration/​Config/​configurations/​distribution.yaml Adds distribution fixture.
tests/​Integration/​Config/​configurations/​configurators.yaml Migrates configurator syntax.
tests/​Integration/​Config/​configurations/​anchors.yaml Migrates anchored TLS config.
tests/​Integration/​Config/​ComponentProvider/​Trace/​SamplerProbability.php Adds test probability provider.
tests/​Integration/​Config/​ComponentProvider/​Trace/​SamplerComposite.php Adds composite sampler bridge.
tests/​Integration/​Config/​ComponentProvider/​Trace/​NoopComposableSampler.php Adds no-op sampler implementation.
tests/​Integration/​Config/​ComponentProvider/​Trace/​ComposableSamplerRuleBased.php Models rule-based config.
tests/​Integration/​Config/​ComponentProvider/​Trace/​ComposableSamplerProbability.php Models nested probability config.
tests/​Integration/​Config/​ComponentProvider/​Trace/​ComposableSamplerParentThreshold.php Models parent-threshold config.
tests/​Integration/​Config/​ComponentProvider/​Trace/​ComposableSamplerInterface.php Defines sampler marker type.
tests/​Integration/​Config/​ComponentProvider/​Trace/​ComposableSamplerAlwaysOn.php Adds always-on provider.
tests/​Integration/​Config/​ComponentProvider/​Trace/​ComposableSamplerAlwaysOff.php Adds always-off provider.
tests/​Integration/​Config/​ComponentProvider/​Propagator/​TextMapPropagatorOtTrace.php Removes obsolete OTTrace provider.
tests/​Integration/​Config/​ComponentProvider/​Metrics/​MetricReaderPull.php Completes reader interfaces.
tests/​Integration/​Config/​ComponentProvider/​Metrics/​MetricExporterPrometheus.php Migrates Prometheus schema.
src/​SDK/​SdkBuilder.php Applies configured global logging.
src/​Contrib/​Otlp/​SpanExporterFactory.php Reuses endpoint scheme logic.
src/​Contrib/​Otlp/​OtlpUtil.php Adds scheme application helper.
src/​Contrib/​Otlp/​MetricExporterFactory.php Reuses endpoint scheme logic.
src/​Contrib/​Otlp/​LogsExporterFactory.php Reuses endpoint scheme logic.
src/​Config/​SDK/​README.md Documents 1.0 compatibility.
src/​Config/​SDK/​Configuration/​Internal/​SkippedComponentPlugin.php Warns and skips unknown plugins.
src/​Config/​SDK/​Configuration/​Internal/​NormalizationsAware.php Defines normalization injection.
src/​Config/​SDK/​Configuration/​Internal/​Normalization.php Revises normalization contract.
src/​Config/​SDK/​Configuration/​Internal/​NodeDefinition/​ArrayNodeDefinition.php Tracks unknown-provider policy.
src/​Config/​SDK/​Configuration/​Internal/​Node/​ArrayNode.php Runs pre-normalizations.
src/​Config/​SDK/​Configuration/​Internal/​EnvSubstitutionNormalization.php Recursively substitutes node values.
src/​Config/​SDK/​Configuration/​Internal/​ComponentProviderRegistry.php Supports skippable providers.
src/​Config/​SDK/​Configuration/​IgnoresUnknownProviders.php Defines provider-skip opt-in.
src/​Config/​SDK/​Configuration/​ConfigurationFactory.php Registers custom enum nodes.
src/​Config/​SDK/​composer.json Removes obsolete SPI providers.
src/​Config/​SDK/​ComponentProvider/​Trace/​SpanExporterZipkin.php Removes Zipkin config provider.
src/​Config/​SDK/​ComponentProvider/​Trace/​SpanExporterOtlpHttp.php Migrates HTTP trace TLS.
src/​Config/​SDK/​ComponentProvider/​Trace/​SpanExporterOtlpGrpc.php Migrates gRPC trace TLS.
src/​Config/​SDK/​ComponentProvider/​OpenTelemetrySdk.php Implements core 1.0 model.
src/​Config/​SDK/​ComponentProvider/​Metrics/​MetricExporterOtlpHttp.php Migrates HTTP metric config.
src/​Config/​SDK/​ComponentProvider/​Metrics/​MetricExporterOtlpGrpc.php Migrates gRPC metric config.
src/​Config/​SDK/​ComponentProvider/​Metrics/​MetricExporterOtlpFile.php Documents unsupported aggregation.
src/​Config/​SDK/​ComponentProvider/​Metrics/​MetricExporterConsole.php Adds metric exporter options.
src/​Config/​SDK/​ComponentProvider/​Logs/​LogRecordExporterOtlpHttp.php Migrates HTTP log TLS.
src/​Config/​SDK/​ComponentProvider/​Logs/​LogRecordExporterOtlpGrpc.php Migrates gRPC log TLS.
src/​Config/​SDK/​ComponentProvider/​InstrumentationConfigurationRegistry.php Notes semconv support gap.
src/​Config/​SDK/​ComponentProvider/​Instrumentation/​General/​PeerConfigProvider.php Removes obsolete peer provider.
src/​Config/​SDK/​ComponentProvider/​Instrumentation/​General/​HttpConfigProvider.php Adds known HTTP methods.
src/​API/​Logs/​Severity.php Adds severity-name conversions.
src/​API/​Configuration/​Context.php Adds configurable logger context.
src/​API/​Behavior/​Internal/​Logging.php Adds explicit log-level setter.
src/​API/​Behavior/​Internal/​ConfiguredLogger.php Adds instance-filtered logger.
script/​semantic-conventions/​README.md Updates fixture instructions.
script/​config-snippets/​sync.sh Adds upstream synchronization.
script/​config-snippets/​README.md Documents synchronization workflow.
examples/​load_config.yaml Migrates static example.
examples/​load_config_env.yaml Migrates environment example.
examples/​load_config_env.php Updates example environment.
examples/​instrumentation/​otel-sdk.yaml Migrates instrumentation example.
composer.json Updates root SPI registrations.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread examples/load_config_env.yaml Resolved
Comment thread script/config-snippets/README.md Resolved
Comment thread script/config-snippets/sync.sh Resolved
File format 1.0 spells the metrics temporality enum `low_memory`; the
declarative config providers accepted `lowmemory`, rejecting schema-valid
configuration. The env-var path keeps `lowmemory`, which matches the env spec.

Also fixes examples/load_config_env.yaml, whose flow-list propagator was not
the component-map form 1.0 requires, and corrects three references to a
nonexistent ConfigurationTest::knownParseFailures().

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The default declarative log level is incorrect, and scoped SDK registration leaks its log threshold globally after detachment.

0 open findings

5 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Resolve omitted log_level to schema default instead of ambient environment

src/​Config/​SDK/​ComponentProvider/​OpenTelemetrySdk.php:480

The 1.0 schema defines log_level's default as INFO, but defaultNull() leaves the builder unset and therefore lets OTEL_LOG_LEVEL control a declaratively configured SDK. Since ambient environment variables are ignored unless explicitly substituted, an omitted or null log_level must resolve to info.

Medium severity Restore logging state when SDK registration scope detaches or fails

src/​SDK/​SdkBuilder.php:140

This mutates process-global logging outside the lifetime of the returned registration scope. After a nested/global SDK scope is detached, providers revert to the previous context but the newer SDK's threshold remains, and a failed registration also leaks it. Restore the previous logging state when the returned scope detaches (and on failure), so the level has the same lifetime as the global registration.

🧠 Review effort: Balanced

@Nevay Nevay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall this PR looks good to me, but I think we should resolve at least the four issues below before releasing 1.0. Additionally we should include .instrumentation in \OpenTelemetry\Config\SDK\Configuration and deprecate \OpenTelemetry\Config\SDK\Instrumentation (which would resolve 3.).


AI-assisted review, most relevant untracked TODOs:

Tested against #8c9d47c
diff --git a/composer.json b/composer.json
index 222062ae..ee175f7d 100644
--- a/composer.json
+++ b/composer.json
@@ -44,2 +44,2 @@
-        "open-telemetry/api": "1.0.x-dev",
-        "open-telemetry/context": "1.0.x-dev",
+        "open-telemetry/api": "1.10.x-dev",
+        "open-telemetry/context": "1.5.x-dev",
@@ -48 +48 @@
-        "open-telemetry/extension-propagator-b3": "1.0.x-dev",
+        "open-telemetry/extension-propagator-b3": "1.2.x-dev",
@@ -50 +50 @@
-        "open-telemetry/gen-otlp-protobuf": "1.0.x-dev",
+        "open-telemetry/gen-otlp-protobuf": "1.10.x-dev",
@@ -106 +106 @@
-        "phpunit/phpunit": "^10 || ^11",
+        "phpunit/phpunit": "^10 || ^11 || ^13",
@@ -110 +110,2 @@
-        "symfony/yaml": "^5.4 || ^6.4 || ^7.0 || ^8.0"
+        "symfony/yaml": "^5.4 || ^6.4 || ^7.0 || ^8.0",
+        "tbachert/otel-integration-tests": "dev-main"
@@ -111,0 +113,6 @@
+    "repositories": [
+        {
+            "type": "vcs",
+            "url": "https://github.com/Nevay/otel-sdk-integration-tests.git"
+        }
+    ],
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 970b553e..a7173941 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -21 +21 @@
-    requireCoverageMetadata="true">
+    requireCoverageMetadata="false">
PHP_VERSION=8.4 docker compose run --rm php vendor/bin/phpunit \
 --group spec --group official \
 --exclude-group async --exclude-group jaeger --exclude-group prometheus --exclude-group entities \
 vendor/tbachert/otel-integration-tests/tests

(21 of the file-config failures are related to file_format 1.0->1.2 changes and can be ignored.)

# Insert at TODO text Tests
1 src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php:693-700 (enumNode('instrument_type')->values([...])), the match at :301, docblock :165 TODO v1.0.0 InstrumentType includes "gauge" (synchronous gauge); missing here 1
2 array_column($properties['headers'], 'value', 'name') in all 6 OTLP providers (MetricExporterOtlpHttp.php:48, MetricExporterOtlpGrpc.php:53, SpanExporterOtlpHttp.php:45, SpanExporterOtlpGrpc.php:49, LogRecordExporterOtlpHttp.php:45, LogRecordExporterOtlpGrpc.php:49) TODO a headers entry with a null value must be ignored (v1.0.0: "If an entry's .value is null, the entry is ignored"). The schema accepts it (scalarNode('value')->defaultNull() + Validation::ensureString() skips null) and array_column() keeps it, so it reaches PsrTransport::send() -> nyholm/psr7 MessageTrait::validateAndTrimHeader() -> fatal "Header values must be RFC 7230 compatible strings" (exit 255) 1
3 src/SDK/SdkAutoloader.php:178 TODO a missing OTEL_CONFIG_FILE must be reported as an initialization error, not an uncaught FileLocatorFileNotFoundException (exit 255) 1
4 OpenTelemetrySdk.php:422, 451 (meterProvider passed to tracer/logger providers) TODO self-observability metrics should be opt-in, not always-on in config mode 1

Covers 5 of 6 suggested fixes from the copilot and Nevay: gauge in the view
selector enum, null-valued headers, opt-in self-observability, the
schema log_level default, and restoring the log level on detach.
@brettmc

brettmc commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

addressed remaining feedback, except for a missing OTEL_CONFIG_FILE must be reported as an initialization error, not an uncaught FileLocatorFileNotFoundException (exit 255) - that requires a small code restructure so I'll do that in a follow-up PR

Comment thread tests/Unit/SDK/SdkBuilderTest.php Resolved
@brettmc
brettmc merged commit fa9ce32 into open-telemetry:main Oct 12, 2026
14 of 15 checks passed
brettmc added a commit that referenced this pull request Nov 2, 2026
Each split package gets a CHANGELOG.md in the format the
sdk-configuration changelog already uses. The Unreleased section
covers everything since the package's latest tag, so the api 1.11
and sdk 1.16 releases have notes ready, and earlier releases link to
the package's GitHub releases.

CONTRIBUTING.md and AGENTS.md ask for an entry when a change affects
a package's users. A new Changelog workflow runs script/check_changelog.sh
on pull requests and flags packages that changed without a changelog entry.
The skip-changelog label turns it off for changes users won't notice.

sdk now requires api ^1.11. It has called Logging::setLogLevel()
since #2068, which api 1.10 doesn't have.

Assisted-By: Claude Code
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.

4 participants