Skip to content

sdk autoloading#854

Merged
brettmc merged 10 commits into
open-telemetry:mainfrom
brettmc:sdk_autoload
Nov 13, 2022
Merged

sdk autoloading#854
brettmc merged 10 commits into
open-telemetry:mainfrom
brettmc:sdk_autoload

Conversation

@brettmc

@brettmc brettmc commented Nov 2, 2022

Copy link
Copy Markdown
Contributor

Enable autoloading/creating a global SDK from environment variables, which can be used by auto-instrumentation.
This should allow auto-instrumentation without any code (with env vars). Note the addition of a new env var, OTEL_PHP_AUTOLOAD_ENABLED - it must be enabled to allow autoloading.

@codecov

codecov Bot commented Nov 2, 2022

Copy link
Copy Markdown

Codecov Report

Merging #854 (db1e438) into main (f083b10) will decrease coverage by 0.58%.
The diff coverage is 54.16%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #854      +/-   ##
============================================
- Coverage     81.25%   80.67%   -0.59%     
- Complexity     1971     2011      +40     
============================================
  Files           250      255       +5     
  Lines          5165     5279     +114     
============================================
+ Hits           4197     4259      +62     
- Misses          968     1020      +52     
Flag Coverage Δ
7.4 80.17% <54.16%> (-0.58%) ⬇️
8.0 80.67% <54.16%> (-0.59%) ⬇️
8.1 80.81% <54.16%> (-0.59%) ⬇️

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

Impacted Files Coverage Δ
src/Contrib/Otlp/MetricExporterFactory.php 0.00% <0.00%> (ø)
src/Contrib/Otlp/Protocols.php 0.00% <ø> (ø)
src/SDK/Metrics/MeterProviderBuilder.php 0.00% <0.00%> (ø)
.../SDK/Metrics/MetricExporter/NoopMetricExporter.php 0.00% <0.00%> (ø)
src/SDK/SdkBuilder.php 82.14% <0.00%> (ø)
src/SDK/SdkAutoloader.php 43.47% <43.47%> (ø)
src/SDK/Metrics/MeterProviderFactory.php 81.48% <81.48%> (ø)
src/SDK/Propagation/PropagatorFactory.php 85.71% <85.71%> (ø)
src/Contrib/Zipkin/SpanConverter.php 96.29% <100.00%> (ø)
src/SDK/Common/Configuration/Configuration.php 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

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

Comment thread rector.php
Comment thread src/SDK/SdkAutoloader.php
Comment thread src/SDK/SdkAutoloader.php Outdated
Comment thread src/SDK/SdkAutoloader.php Outdated
@brettmc

brettmc commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

This should wait for #859; it will need to incorporate config changes from that PR

@brettmc
brettmc marked this pull request as ready for review November 7, 2022 02:23
@brettmc
brettmc requested a review from a team November 7, 2022 02:23
Comment thread src/SDK/Common/Configuration/Configuration.php Outdated
Comment thread examples/autoload_sdk.php Outdated
ensure all user-provided defaults are of the correct type
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