diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 7d3434de0..4c4245cad 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -29,6 +29,7 @@ 'include' => true, 'lowercase_cast' => true, 'new_with_parentheses' => true, + 'no_blank_lines_after_class_opening' => true, 'no_extra_blank_lines' => true, 'no_leading_import_slash' => true, 'no_trailing_whitespace' => true, diff --git a/examples/src/Example.php b/examples/src/Example.php index c21077762..914cc00b8 100644 --- a/examples/src/Example.php +++ b/examples/src/Example.php @@ -6,7 +6,6 @@ final class Example { - public function test(): int { return 42; diff --git a/examples/src/ExampleConfig.php b/examples/src/ExampleConfig.php index d3ffe47cf..e2385bd4f 100644 --- a/examples/src/ExampleConfig.php +++ b/examples/src/ExampleConfig.php @@ -8,7 +8,6 @@ final class ExampleConfig implements InstrumentationConfiguration { - public function __construct( public readonly string $spanName, public readonly bool $enabled = true, diff --git a/examples/src/ExampleConfigProvider.php b/examples/src/ExampleConfigProvider.php index eba88950a..1cffd3f93 100644 --- a/examples/src/ExampleConfigProvider.php +++ b/examples/src/ExampleConfigProvider.php @@ -16,7 +16,6 @@ */ final class ExampleConfigProvider implements ComponentProvider { - /** * @psalm-suppress MoreSpecificImplementedParamType * @param array{ diff --git a/examples/src/ExampleInstrumentation.php b/examples/src/ExampleInstrumentation.php index 406f351e1..d1ccf73a3 100644 --- a/examples/src/ExampleInstrumentation.php +++ b/examples/src/ExampleInstrumentation.php @@ -14,7 +14,6 @@ final class ExampleInstrumentation implements Instrumentation { - public function register(HookManagerInterface $hookManager, ConfigProperties $configuration, InstrumentationContext $context): void { $config = $configuration->get(ExampleConfig::class) ?? throw new Exception('example instrumentation must be configured'); diff --git a/examples/traces/exporters/otlp_file_autoload.php b/examples/traces/exporters/otlp_file_autoload.php new file mode 100644 index 000000000..5c1342541 --- /dev/null +++ b/examples/traces/exporters/otlp_file_autoload.php @@ -0,0 +1,23 @@ +tracer()->spanBuilder('root')->startSpan()->end(); +$instrumentation->meter()->createCounter('cnt')->add(1); +$instrumentation->eventLogger()->emit('foo', 'hello, otel'); + +echo PHP_EOL . 'OTLP/stdout autoload example complete!'; +echo PHP_EOL; diff --git a/examples/traces/exporters/otlp_file_from_factory.php b/examples/traces/exporters/otlp_file_from_factory.php new file mode 100644 index 000000000..8e75fea35 --- /dev/null +++ b/examples/traces/exporters/otlp_file_from_factory.php @@ -0,0 +1,42 @@ +create(); + +$tracer = $tracerProvider->getTracer('io.opentelemetry.contrib.php'); + +$root = $span = $tracer->spanBuilder('root')->startSpan(); +$scope = $span->activate(); + +for ($i = 0; $i < 3; $i++) { + // start a span, register some events + $span = $tracer->spanBuilder('loop-' . $i)->startSpan(); + + $span->setAttribute('remote_ip', '1.2.3.4') + ->setAttribute('country', 'USA'); + + $span->addEvent('found_login' . $i, [ + 'id' => $i, + 'username' => 'otuser' . $i, + ]); + $span->addEvent('generated_session', [ + 'id' => md5((string) microtime(true)), + ]); + + $span->end(); +} +$root->end(); +$scope->detach(); +echo PHP_EOL . 'OTLP/stdout example complete!'; + +echo PHP_EOL; +$tracerProvider->shutdown(); diff --git a/src/API/Globals.php b/src/API/Globals.php index aa3c06141..f7f6e0e81 100644 --- a/src/API/Globals.php +++ b/src/API/Globals.php @@ -58,6 +58,10 @@ public static function loggerProvider(): LoggerProviderInterface return Context::getCurrent()->get(ContextKeys::loggerProvider()) ?? self::globals()->loggerProvider; } + /** + * @deprecated + * @phan-suppress PhanDeprecatedFunction + */ public static function eventLoggerProvider(): EventLoggerProviderInterface { return Context::getCurrent()->get(ContextKeys::eventLoggerProvider()) ?? self::globals()->eventLoggerProvider; @@ -76,7 +80,7 @@ public static function registerInitializer(Closure $initializer): void } /** - * @phan-suppress PhanTypeMismatchReturnNullable + * @phan-suppress PhanTypeMismatchReturnNullable,PhanDeprecatedFunction */ private static function globals(): self { diff --git a/src/API/Instrumentation/AutoInstrumentation/ConfigurationRegistry.php b/src/API/Instrumentation/AutoInstrumentation/ConfigurationRegistry.php index 3c45412a9..a958e8036 100644 --- a/src/API/Instrumentation/AutoInstrumentation/ConfigurationRegistry.php +++ b/src/API/Instrumentation/AutoInstrumentation/ConfigurationRegistry.php @@ -8,7 +8,6 @@ final class ConfigurationRegistry implements ConfigProperties { - private array $configurations = []; public function add(InstrumentationConfiguration $configuration): self diff --git a/src/API/Instrumentation/AutoInstrumentation/InstrumentationConfiguration.php b/src/API/Instrumentation/AutoInstrumentation/InstrumentationConfiguration.php index 1f643cb91..d695c689d 100644 --- a/src/API/Instrumentation/AutoInstrumentation/InstrumentationConfiguration.php +++ b/src/API/Instrumentation/AutoInstrumentation/InstrumentationConfiguration.php @@ -6,5 +6,4 @@ interface InstrumentationConfiguration { - } diff --git a/src/API/Instrumentation/CachedInstrumentation.php b/src/API/Instrumentation/CachedInstrumentation.php index 20749c0c5..27b755b2f 100644 --- a/src/API/Instrumentation/CachedInstrumentation.php +++ b/src/API/Instrumentation/CachedInstrumentation.php @@ -68,6 +68,11 @@ public function logger(): LoggerInterface return $this->loggers[$loggerProvider] ??= $loggerProvider->getLogger($this->name, $this->version, $this->schemaUrl, $this->attributes); } + + /** + * @deprecated + * @phan-suppress PhanDeprecatedFunction + */ public function eventLogger(): EventLoggerInterface { $eventLoggerProvider = Globals::eventLoggerProvider(); diff --git a/src/API/Instrumentation/Configurator.php b/src/API/Instrumentation/Configurator.php index d8912ec2d..3ece0ace1 100644 --- a/src/API/Instrumentation/Configurator.php +++ b/src/API/Instrumentation/Configurator.php @@ -46,6 +46,7 @@ public static function create(): Configurator /** * Creates a configurator that uses noop instances for not configured values. + * @phan-suppress PhanDeprecatedFunction */ public static function createNoop(): Configurator { @@ -63,6 +64,9 @@ public function activate(): ScopeInterface return $this->storeInContext()->activate(); } + /** + * @phan-suppress PhanDeprecatedFunction + */ public function storeInContext(?ContextInterface $context = null): ContextInterface { $context ??= Context::getCurrent(); @@ -118,6 +122,9 @@ public function withLoggerProvider(?LoggerProviderInterface $loggerProvider): Co return $self; } + /** + * @deprecated + */ public function withEventLoggerProvider(?EventLoggerProviderInterface $eventLoggerProvider): Configurator { $self = clone $this; diff --git a/src/API/Instrumentation/ContextKeys.php b/src/API/Instrumentation/ContextKeys.php index 9f53e5b86..7e69f95d6 100644 --- a/src/API/Instrumentation/ContextKeys.php +++ b/src/API/Instrumentation/ContextKeys.php @@ -58,6 +58,7 @@ public static function loggerProvider(): ContextKeyInterface } /** + * @deprecated * @return ContextKeyInterface */ public static function eventLoggerProvider(): ContextKeyInterface diff --git a/src/API/Logs/EventLoggerInterface.php b/src/API/Logs/EventLoggerInterface.php index 9d1d0fd12..f7c0890e9 100644 --- a/src/API/Logs/EventLoggerInterface.php +++ b/src/API/Logs/EventLoggerInterface.php @@ -7,6 +7,7 @@ use OpenTelemetry\Context\ContextInterface; /** + * @deprecated * @see /~https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md#events-api-interface */ interface EventLoggerInterface diff --git a/src/API/Logs/EventLoggerProviderInterface.php b/src/API/Logs/EventLoggerProviderInterface.php index 957a19654..2b1819612 100644 --- a/src/API/Logs/EventLoggerProviderInterface.php +++ b/src/API/Logs/EventLoggerProviderInterface.php @@ -5,6 +5,7 @@ namespace OpenTelemetry\API\Logs; /** + * @deprecated * @see /~https://github.com/open-telemetry/opentelemetry-specification/blob/v1.32.0/specification/logs/event-api.md#get-an-eventlogger */ interface EventLoggerProviderInterface diff --git a/src/API/Logs/NoopEventLogger.php b/src/API/Logs/NoopEventLogger.php index cc51dacaa..43e389e09 100644 --- a/src/API/Logs/NoopEventLogger.php +++ b/src/API/Logs/NoopEventLogger.php @@ -6,6 +6,9 @@ use OpenTelemetry\Context\ContextInterface; +/** + * @phan-suppress PhanDeprecatedInterface + */ class NoopEventLogger implements EventLoggerInterface { public static function instance(): self diff --git a/src/API/Logs/NoopEventLoggerProvider.php b/src/API/Logs/NoopEventLoggerProvider.php index 09ae22564..605f872c0 100644 --- a/src/API/Logs/NoopEventLoggerProvider.php +++ b/src/API/Logs/NoopEventLoggerProvider.php @@ -4,6 +4,9 @@ namespace OpenTelemetry\API\Logs; +/** + * @phan-suppress PhanDeprecatedInterface + */ class NoopEventLoggerProvider implements EventLoggerProviderInterface { public static function getInstance(): self diff --git a/src/API/Metrics/CounterInterface.php b/src/API/Metrics/CounterInterface.php index c5cec7f69..5bb0ddb2b 100644 --- a/src/API/Metrics/CounterInterface.php +++ b/src/API/Metrics/CounterInterface.php @@ -8,7 +8,6 @@ interface CounterInterface extends SynchronousInstrument { - /** * @param float|int $amount non-negative amount to increment by * @param iterable $attributes diff --git a/src/API/Metrics/GaugeInterface.php b/src/API/Metrics/GaugeInterface.php index 6bb62cd28..e408a11da 100644 --- a/src/API/Metrics/GaugeInterface.php +++ b/src/API/Metrics/GaugeInterface.php @@ -15,7 +15,6 @@ */ interface GaugeInterface extends SynchronousInstrument { - /** * @param float|int $amount current absolute value * @param iterable $attributes diff --git a/src/API/Metrics/HistogramInterface.php b/src/API/Metrics/HistogramInterface.php index 71a9091cf..822f302ce 100644 --- a/src/API/Metrics/HistogramInterface.php +++ b/src/API/Metrics/HistogramInterface.php @@ -8,7 +8,6 @@ interface HistogramInterface extends SynchronousInstrument { - /** * @param float|int $amount non-negative amount to record * @param iterable $attributes diff --git a/src/API/Metrics/MeterInterface.php b/src/API/Metrics/MeterInterface.php index fa12e5814..6a6cec746 100644 --- a/src/API/Metrics/MeterInterface.php +++ b/src/API/Metrics/MeterInterface.php @@ -6,7 +6,6 @@ interface MeterInterface { - /** * Reports measurements for multiple asynchronous instrument from a single callback. * diff --git a/src/API/Metrics/MeterProviderInterface.php b/src/API/Metrics/MeterProviderInterface.php index fe9393910..853b55dbe 100644 --- a/src/API/Metrics/MeterProviderInterface.php +++ b/src/API/Metrics/MeterProviderInterface.php @@ -6,7 +6,6 @@ interface MeterProviderInterface { - /** * Returns a `Meter` for the given instrumentation scope. * diff --git a/src/API/Metrics/ObservableCallbackInterface.php b/src/API/Metrics/ObservableCallbackInterface.php index a20e59666..864dac3fb 100644 --- a/src/API/Metrics/ObservableCallbackInterface.php +++ b/src/API/Metrics/ObservableCallbackInterface.php @@ -48,7 +48,6 @@ */ interface ObservableCallbackInterface { - /** * Detaches the associated callback from the instrument. */ diff --git a/src/API/Metrics/ObservableCounterInterface.php b/src/API/Metrics/ObservableCounterInterface.php index 70dec9022..9703d8208 100644 --- a/src/API/Metrics/ObservableCounterInterface.php +++ b/src/API/Metrics/ObservableCounterInterface.php @@ -6,7 +6,6 @@ interface ObservableCounterInterface extends AsynchronousInstrument { - /** * @param callable(ObserverInterface): void $callback function responsible for * reporting the measurements (as absolute values) diff --git a/src/API/Metrics/ObservableGaugeInterface.php b/src/API/Metrics/ObservableGaugeInterface.php index 6b9970cd9..6eb5783b6 100644 --- a/src/API/Metrics/ObservableGaugeInterface.php +++ b/src/API/Metrics/ObservableGaugeInterface.php @@ -6,7 +6,6 @@ interface ObservableGaugeInterface extends AsynchronousInstrument { - /** * @param callable(ObserverInterface): void $callback function responsible for * reporting the measurements diff --git a/src/API/Metrics/ObservableUpDownCounterInterface.php b/src/API/Metrics/ObservableUpDownCounterInterface.php index aaccb12f1..4e205f930 100644 --- a/src/API/Metrics/ObservableUpDownCounterInterface.php +++ b/src/API/Metrics/ObservableUpDownCounterInterface.php @@ -6,7 +6,6 @@ interface ObservableUpDownCounterInterface extends AsynchronousInstrument { - /** * @param callable(ObserverInterface): void $callback function responsible for * reporting the measurements (as absolute values) diff --git a/src/API/Metrics/ObserverInterface.php b/src/API/Metrics/ObserverInterface.php index f9975c1bc..78e7e1c33 100644 --- a/src/API/Metrics/ObserverInterface.php +++ b/src/API/Metrics/ObserverInterface.php @@ -6,7 +6,6 @@ interface ObserverInterface { - /** * Records the given absolute datapoint. * diff --git a/src/API/Metrics/UpDownCounterInterface.php b/src/API/Metrics/UpDownCounterInterface.php index 7bef4709f..6ef60e6cd 100644 --- a/src/API/Metrics/UpDownCounterInterface.php +++ b/src/API/Metrics/UpDownCounterInterface.php @@ -8,7 +8,6 @@ interface UpDownCounterInterface extends SynchronousInstrument { - /** * @param float|int $amount amount to increment / decrement by * @param iterable $attributes diff --git a/src/Config/SDK/ComponentProvider/Instrumentation/General/HttpConfigProvider.php b/src/Config/SDK/ComponentProvider/Instrumentation/General/HttpConfigProvider.php index 01c86f73c..541a99ca4 100644 --- a/src/Config/SDK/ComponentProvider/Instrumentation/General/HttpConfigProvider.php +++ b/src/Config/SDK/ComponentProvider/Instrumentation/General/HttpConfigProvider.php @@ -16,7 +16,6 @@ */ class HttpConfigProvider implements ComponentProvider { - public function createPlugin(array $properties, Context $context): GeneralInstrumentationConfiguration { return new HttpConfig($properties); diff --git a/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterConsole.php b/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterConsole.php index aab88c355..ced5b222f 100644 --- a/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterConsole.php +++ b/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterConsole.php @@ -17,7 +17,6 @@ */ final class LogRecordExporterConsole implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterOtlp.php b/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterOtlp.php index 4a829797b..753f23ab2 100644 --- a/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterOtlp.php +++ b/src/Config/SDK/ComponentProvider/Logs/LogRecordExporterOtlp.php @@ -24,7 +24,6 @@ #[PackageDependency('open-telemetry/exporter-otlp', '^1.0.5')] final class LogRecordExporterOtlp implements ComponentProvider { - /** * @param array{ * protocol: 'http/protobuf'|'http/json'|'grpc', diff --git a/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorBatch.php b/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorBatch.php index 780018284..0691827b8 100644 --- a/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorBatch.php +++ b/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorBatch.php @@ -19,7 +19,6 @@ */ final class LogRecordProcessorBatch implements ComponentProvider { - /** * @param array{ * schedule_delay: int<0, max>, diff --git a/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorSimple.php b/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorSimple.php index 1e797a8d2..08db3119c 100644 --- a/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorSimple.php +++ b/src/Config/SDK/ComponentProvider/Logs/LogRecordProcessorSimple.php @@ -18,7 +18,6 @@ */ final class LogRecordProcessorSimple implements ComponentProvider { - /** * @param array{ * exporter: ComponentPlugin, diff --git a/src/Config/SDK/ComponentProvider/Metrics/AggregationResolverDefault.php b/src/Config/SDK/ComponentProvider/Metrics/AggregationResolverDefault.php index 98ae99827..b55668f26 100644 --- a/src/Config/SDK/ComponentProvider/Metrics/AggregationResolverDefault.php +++ b/src/Config/SDK/ComponentProvider/Metrics/AggregationResolverDefault.php @@ -16,7 +16,6 @@ */ final class AggregationResolverDefault implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Metrics/MetricExporterConsole.php b/src/Config/SDK/ComponentProvider/Metrics/MetricExporterConsole.php index 8d3f64ced..9dc844ed2 100644 --- a/src/Config/SDK/ComponentProvider/Metrics/MetricExporterConsole.php +++ b/src/Config/SDK/ComponentProvider/Metrics/MetricExporterConsole.php @@ -16,7 +16,6 @@ */ final class MetricExporterConsole implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Metrics/MetricExporterOtlp.php b/src/Config/SDK/ComponentProvider/Metrics/MetricExporterOtlp.php index 6e566304e..536a10a00 100644 --- a/src/Config/SDK/ComponentProvider/Metrics/MetricExporterOtlp.php +++ b/src/Config/SDK/ComponentProvider/Metrics/MetricExporterOtlp.php @@ -25,7 +25,6 @@ #[PackageDependency('open-telemetry/exporter-otlp', '^1.0.5')] final class MetricExporterOtlp implements ComponentProvider { - /** * @param array{ * protocol: 'http/protobuf'|'http/json'|'grpc', diff --git a/src/Config/SDK/ComponentProvider/Metrics/MetricReaderPeriodic.php b/src/Config/SDK/ComponentProvider/Metrics/MetricReaderPeriodic.php index ab865c7af..b6d75eba1 100644 --- a/src/Config/SDK/ComponentProvider/Metrics/MetricReaderPeriodic.php +++ b/src/Config/SDK/ComponentProvider/Metrics/MetricReaderPeriodic.php @@ -18,7 +18,6 @@ */ final class MetricReaderPeriodic implements ComponentProvider { - /** * @param array{ * interval: int<0, max>, diff --git a/src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php b/src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php index cae7ec901..c1cf6a9c2 100644 --- a/src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php +++ b/src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php @@ -50,7 +50,6 @@ */ final class OpenTelemetrySdk implements ComponentProvider { - /** * @param array{ * file_format: '0.3', diff --git a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3.php b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3.php index ca349743c..ccd5152a2 100644 --- a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3.php +++ b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3.php @@ -18,7 +18,6 @@ #[PackageDependency('open-telemetry/extension-propagator-b3', '^1.0.1')] final class TextMapPropagatorB3 implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3Multi.php b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3Multi.php index 8809b7df9..67fb1fb2d 100644 --- a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3Multi.php +++ b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorB3Multi.php @@ -18,7 +18,6 @@ #[PackageDependency('open-telemetry/extension-propagator-b3', '^1.0.1')] final class TextMapPropagatorB3Multi implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorBaggage.php b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorBaggage.php index c3d05cfd3..15b846873 100644 --- a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorBaggage.php +++ b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorBaggage.php @@ -16,7 +16,6 @@ */ final class TextMapPropagatorBaggage implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorComposite.php b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorComposite.php index d3d11bd40..0e7f21cbf 100644 --- a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorComposite.php +++ b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorComposite.php @@ -17,7 +17,6 @@ */ final class TextMapPropagatorComposite implements ComponentProvider { - /** * @param list> $properties */ diff --git a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorJaeger.php b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorJaeger.php index 3d8086d52..988200cab 100644 --- a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorJaeger.php +++ b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorJaeger.php @@ -18,7 +18,6 @@ #[PackageDependency('open-telemetry/extension-propagator-jaeger', '^0.0.2')] final class TextMapPropagatorJaeger implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorTraceContext.php b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorTraceContext.php index a55917b6f..fd03c8805 100644 --- a/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorTraceContext.php +++ b/src/Config/SDK/ComponentProvider/Propagator/TextMapPropagatorTraceContext.php @@ -16,7 +16,6 @@ */ final class TextMapPropagatorTraceContext implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOff.php b/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOff.php index 89090ef28..4aacbfb6f 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOff.php +++ b/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOff.php @@ -16,7 +16,6 @@ */ final class SamplerAlwaysOff implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOn.php b/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOn.php index 168d8b902..494762168 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOn.php +++ b/src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOn.php @@ -16,7 +16,6 @@ */ final class SamplerAlwaysOn implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Trace/SamplerParentBased.php b/src/Config/SDK/ComponentProvider/Trace/SamplerParentBased.php index 04438e8c0..83b7dc0ea 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SamplerParentBased.php +++ b/src/Config/SDK/ComponentProvider/Trace/SamplerParentBased.php @@ -19,7 +19,6 @@ */ final class SamplerParentBased implements ComponentProvider { - /** * @param array{ * root: ComponentPlugin, diff --git a/src/Config/SDK/ComponentProvider/Trace/SamplerTraceIdRatioBased.php b/src/Config/SDK/ComponentProvider/Trace/SamplerTraceIdRatioBased.php index d945315f1..d4f53b04c 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SamplerTraceIdRatioBased.php +++ b/src/Config/SDK/ComponentProvider/Trace/SamplerTraceIdRatioBased.php @@ -16,7 +16,6 @@ */ final class SamplerTraceIdRatioBased implements ComponentProvider { - /** * @param array{ * ratio: float, diff --git a/src/Config/SDK/ComponentProvider/Trace/SpanExporterConsole.php b/src/Config/SDK/ComponentProvider/Trace/SpanExporterConsole.php index 945439f2b..d50d8642a 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SpanExporterConsole.php +++ b/src/Config/SDK/ComponentProvider/Trace/SpanExporterConsole.php @@ -17,7 +17,6 @@ */ final class SpanExporterConsole implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/src/Config/SDK/ComponentProvider/Trace/SpanExporterOtlp.php b/src/Config/SDK/ComponentProvider/Trace/SpanExporterOtlp.php index 32e2c0521..29a6f1661 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SpanExporterOtlp.php +++ b/src/Config/SDK/ComponentProvider/Trace/SpanExporterOtlp.php @@ -24,7 +24,6 @@ #[PackageDependency('open-telemetry/exporter-otlp', '^1.0.5')] final class SpanExporterOtlp implements ComponentProvider { - /** * @param array{ * protocol: 'http/protobuf'|'http/json'|'grpc', diff --git a/src/Config/SDK/ComponentProvider/Trace/SpanExporterZipkin.php b/src/Config/SDK/ComponentProvider/Trace/SpanExporterZipkin.php index a5665ea46..7db846444 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SpanExporterZipkin.php +++ b/src/Config/SDK/ComponentProvider/Trace/SpanExporterZipkin.php @@ -20,7 +20,6 @@ #[PackageDependency('open-telemetry/exporter-zipkin', '^1.0')] final class SpanExporterZipkin implements ComponentProvider { - /** * @param array{ * endpoint: string, diff --git a/src/Config/SDK/ComponentProvider/Trace/SpanProcessorBatch.php b/src/Config/SDK/ComponentProvider/Trace/SpanProcessorBatch.php index 287192ab9..72fd58a4e 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SpanProcessorBatch.php +++ b/src/Config/SDK/ComponentProvider/Trace/SpanProcessorBatch.php @@ -19,7 +19,6 @@ */ final class SpanProcessorBatch implements ComponentProvider { - /** * @param array{ * schedule_delay: int<0, max>, diff --git a/src/Config/SDK/ComponentProvider/Trace/SpanProcessorSimple.php b/src/Config/SDK/ComponentProvider/Trace/SpanProcessorSimple.php index 403037272..e86e2ab6e 100644 --- a/src/Config/SDK/ComponentProvider/Trace/SpanProcessorSimple.php +++ b/src/Config/SDK/ComponentProvider/Trace/SpanProcessorSimple.php @@ -18,7 +18,6 @@ */ final class SpanProcessorSimple implements ComponentProvider { - /** * @param array{ * exporter: ComponentPlugin, diff --git a/src/Config/SDK/Configuration.php b/src/Config/SDK/Configuration.php index 6da74ae20..478b43b9e 100644 --- a/src/Config/SDK/Configuration.php +++ b/src/Config/SDK/Configuration.php @@ -17,7 +17,6 @@ final class Configuration { - /** * @param ComponentPlugin $sdkPlugin */ diff --git a/src/Config/SDK/Configuration/ComponentPlugin.php b/src/Config/SDK/Configuration/ComponentPlugin.php index 5b8c858de..08468b900 100644 --- a/src/Config/SDK/Configuration/ComponentPlugin.php +++ b/src/Config/SDK/Configuration/ComponentPlugin.php @@ -11,7 +11,6 @@ */ interface ComponentPlugin { - /** * Creates the component that is provided by this plugin. * diff --git a/src/Config/SDK/Configuration/ComponentProvider.php b/src/Config/SDK/Configuration/ComponentProvider.php index 86e079d73..57b65ae78 100644 --- a/src/Config/SDK/Configuration/ComponentProvider.php +++ b/src/Config/SDK/Configuration/ComponentProvider.php @@ -14,7 +14,6 @@ */ interface ComponentProvider { - /** * @param array $properties properties provided for this component provider * @param Context $context context that should be used to resolve component plugins diff --git a/src/Config/SDK/Configuration/ComponentProviderRegistry.php b/src/Config/SDK/Configuration/ComponentProviderRegistry.php index 363ca638a..6121a979b 100644 --- a/src/Config/SDK/Configuration/ComponentProviderRegistry.php +++ b/src/Config/SDK/Configuration/ComponentProviderRegistry.php @@ -12,7 +12,6 @@ */ interface ComponentProviderRegistry { - /** * Creates a node to specify a component plugin. * diff --git a/src/Config/SDK/Configuration/ConfigurationFactory.php b/src/Config/SDK/Configuration/ConfigurationFactory.php index 66ce09c32..61a3323dc 100644 --- a/src/Config/SDK/Configuration/ConfigurationFactory.php +++ b/src/Config/SDK/Configuration/ConfigurationFactory.php @@ -36,7 +36,6 @@ */ final class ConfigurationFactory { - private readonly CompiledConfigurationFactory $compiledFactory; /** diff --git a/src/Config/SDK/Configuration/Context.php b/src/Config/SDK/Configuration/Context.php index b6eca946c..caf52a133 100644 --- a/src/Config/SDK/Configuration/Context.php +++ b/src/Config/SDK/Configuration/Context.php @@ -16,7 +16,6 @@ */ final class Context { - /** * @param TracerProviderInterface $tracerProvider tracer provider to use for self diagnostics * @param MeterProviderInterface $meterProvider meter provider to use for self diagnostics diff --git a/src/Config/SDK/Configuration/Environment/ArrayEnvSource.php b/src/Config/SDK/Configuration/Environment/ArrayEnvSource.php index ebafa3fae..aeab22fed 100644 --- a/src/Config/SDK/Configuration/Environment/ArrayEnvSource.php +++ b/src/Config/SDK/Configuration/Environment/ArrayEnvSource.php @@ -6,7 +6,6 @@ final class ArrayEnvSource implements EnvSource { - public function __construct( private readonly array $env, ) { diff --git a/src/Config/SDK/Configuration/Environment/EnvReader.php b/src/Config/SDK/Configuration/Environment/EnvReader.php index dd8269cbd..7e8985353 100644 --- a/src/Config/SDK/Configuration/Environment/EnvReader.php +++ b/src/Config/SDK/Configuration/Environment/EnvReader.php @@ -6,6 +6,5 @@ interface EnvReader { - public function read(string $name): ?string; } diff --git a/src/Config/SDK/Configuration/Environment/EnvResource.php b/src/Config/SDK/Configuration/Environment/EnvResource.php index 60db86b32..5ff133cd0 100644 --- a/src/Config/SDK/Configuration/Environment/EnvResource.php +++ b/src/Config/SDK/Configuration/Environment/EnvResource.php @@ -8,7 +8,6 @@ class EnvResource implements ResourceInterface { - public function __construct( public readonly string $name, public readonly ?string $value, diff --git a/src/Config/SDK/Configuration/Environment/EnvResourceChecker.php b/src/Config/SDK/Configuration/Environment/EnvResourceChecker.php index 8ed780561..ab048aa9b 100644 --- a/src/Config/SDK/Configuration/Environment/EnvResourceChecker.php +++ b/src/Config/SDK/Configuration/Environment/EnvResourceChecker.php @@ -10,7 +10,6 @@ final class EnvResourceChecker implements ResourceCheckerInterface { - public function __construct( private readonly EnvReader $envReader, ) { diff --git a/src/Config/SDK/Configuration/Environment/EnvSource.php b/src/Config/SDK/Configuration/Environment/EnvSource.php index 0085512fb..c0d816134 100644 --- a/src/Config/SDK/Configuration/Environment/EnvSource.php +++ b/src/Config/SDK/Configuration/Environment/EnvSource.php @@ -6,6 +6,5 @@ interface EnvSource { - public function readRaw(string $name): mixed; } diff --git a/src/Config/SDK/Configuration/Environment/EnvSourceReader.php b/src/Config/SDK/Configuration/Environment/EnvSourceReader.php index d05eaafe9..f9cacf48f 100644 --- a/src/Config/SDK/Configuration/Environment/EnvSourceReader.php +++ b/src/Config/SDK/Configuration/Environment/EnvSourceReader.php @@ -9,7 +9,6 @@ final class EnvSourceReader implements EnvReader { - /** * @param iterable $envSources */ diff --git a/src/Config/SDK/Configuration/Environment/PhpIniEnvSource.php b/src/Config/SDK/Configuration/Environment/PhpIniEnvSource.php index 470a86ad2..c5a1f7a35 100644 --- a/src/Config/SDK/Configuration/Environment/PhpIniEnvSource.php +++ b/src/Config/SDK/Configuration/Environment/PhpIniEnvSource.php @@ -8,7 +8,6 @@ final class PhpIniEnvSource implements EnvSource { - public function readRaw(string $name): string|array|false { return get_cfg_var($name); diff --git a/src/Config/SDK/Configuration/Environment/ServerEnvSource.php b/src/Config/SDK/Configuration/Environment/ServerEnvSource.php index 76e00edf7..471a6727f 100644 --- a/src/Config/SDK/Configuration/Environment/ServerEnvSource.php +++ b/src/Config/SDK/Configuration/Environment/ServerEnvSource.php @@ -6,7 +6,6 @@ final class ServerEnvSource implements EnvSource { - public function readRaw(string $name): mixed { return $_SERVER[$name] ?? null; diff --git a/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNull.php b/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNull.php index 61d3316d7..452ef33de 100644 --- a/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNull.php +++ b/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNull.php @@ -12,7 +12,6 @@ */ final class ArrayNodeDefaultNull extends ArrayNode { - public static function fromNode(ArrayNode $node): ArrayNodeDefaultNull { $defaultNull = new ArrayNodeDefaultNull($node->getName()); diff --git a/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNullDefinition.php b/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNullDefinition.php index 45a05c4d9..8ec05d01a 100644 --- a/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNullDefinition.php +++ b/src/Config/SDK/Configuration/Internal/ArrayNodeDefaultNullDefinition.php @@ -14,7 +14,6 @@ */ final class ArrayNodeDefaultNullDefinition extends ArrayNodeDefinition { - protected function createNode(): NodeInterface { $node = parent::createNode(); diff --git a/src/Config/SDK/Configuration/Internal/CompiledConfigurationFactory.php b/src/Config/SDK/Configuration/Internal/CompiledConfigurationFactory.php index c99167498..9ea02b878 100644 --- a/src/Config/SDK/Configuration/Internal/CompiledConfigurationFactory.php +++ b/src/Config/SDK/Configuration/Internal/CompiledConfigurationFactory.php @@ -16,7 +16,6 @@ */ final class CompiledConfigurationFactory { - /** * @param ComponentProvider $rootComponent * @param NodeInterface $node diff --git a/src/Config/SDK/Configuration/Internal/ComponentPlugin.php b/src/Config/SDK/Configuration/Internal/ComponentPlugin.php index a3b65e492..5d8284621 100644 --- a/src/Config/SDK/Configuration/Internal/ComponentPlugin.php +++ b/src/Config/SDK/Configuration/Internal/ComponentPlugin.php @@ -15,7 +15,6 @@ */ final class ComponentPlugin implements \OpenTelemetry\Config\SDK\Configuration\ComponentPlugin { - /** * @param array $properties resolved properties according to component provider config * @param ComponentProvider $provider component provider used to create the component diff --git a/src/Config/SDK/Configuration/Internal/ComponentProviderRegistry.php b/src/Config/SDK/Configuration/Internal/ComponentProviderRegistry.php index 1873f4d3a..78d023af8 100644 --- a/src/Config/SDK/Configuration/Internal/ComponentProviderRegistry.php +++ b/src/Config/SDK/Configuration/Internal/ComponentProviderRegistry.php @@ -30,7 +30,6 @@ */ final class ComponentProviderRegistry implements \OpenTelemetry\Config\SDK\Configuration\ComponentProviderRegistry, ResourceTrackable { - /** @var array> */ private array $providers = []; /** @var array> */ diff --git a/src/Config/SDK/Configuration/Internal/ComposerPackageResource.php b/src/Config/SDK/Configuration/Internal/ComposerPackageResource.php index 6eaf33b2c..9e9158a20 100644 --- a/src/Config/SDK/Configuration/Internal/ComposerPackageResource.php +++ b/src/Config/SDK/Configuration/Internal/ComposerPackageResource.php @@ -12,7 +12,6 @@ */ final class ComposerPackageResource implements SelfCheckingResourceInterface { - public readonly string $packageName; public readonly string|false $version; diff --git a/src/Config/SDK/Configuration/Internal/ConfigurationLoader.php b/src/Config/SDK/Configuration/Internal/ConfigurationLoader.php index a5b36049d..77446f3f6 100644 --- a/src/Config/SDK/Configuration/Internal/ConfigurationLoader.php +++ b/src/Config/SDK/Configuration/Internal/ConfigurationLoader.php @@ -12,7 +12,6 @@ */ final class ConfigurationLoader implements \OpenTelemetry\Config\SDK\Configuration\Loader\ConfigurationLoader { - private array $configurations = []; private readonly ?ResourceCollection $resources; diff --git a/src/Config/SDK/Configuration/Internal/EnvSubstitutionNormalization.php b/src/Config/SDK/Configuration/Internal/EnvSubstitutionNormalization.php index 82356e662..1aef08a59 100644 --- a/src/Config/SDK/Configuration/Internal/EnvSubstitutionNormalization.php +++ b/src/Config/SDK/Configuration/Internal/EnvSubstitutionNormalization.php @@ -28,7 +28,6 @@ */ final class EnvSubstitutionNormalization { - public function __construct( private readonly EnvReader $envReader, ) { diff --git a/src/Config/SDK/Configuration/Internal/ResourceCollection.php b/src/Config/SDK/Configuration/Internal/ResourceCollection.php index dc6959032..de9117091 100644 --- a/src/Config/SDK/Configuration/Internal/ResourceCollection.php +++ b/src/Config/SDK/Configuration/Internal/ResourceCollection.php @@ -23,7 +23,6 @@ */ final class ResourceCollection implements \OpenTelemetry\Config\SDK\Configuration\ResourceCollection { - /** @var array */ private array $resources = []; private readonly ComposerResource $composerResource; diff --git a/src/Config/SDK/Configuration/Internal/ResourceTrackable.php b/src/Config/SDK/Configuration/Internal/ResourceTrackable.php index c6c9f9a54..0d653f196 100644 --- a/src/Config/SDK/Configuration/Internal/ResourceTrackable.php +++ b/src/Config/SDK/Configuration/Internal/ResourceTrackable.php @@ -8,6 +8,5 @@ interface ResourceTrackable { - public function trackResources(?ResourceCollection $resources): void; } diff --git a/src/Config/SDK/Configuration/Internal/TrackingEnvReader.php b/src/Config/SDK/Configuration/Internal/TrackingEnvReader.php index 7c8c48682..748bb7437 100644 --- a/src/Config/SDK/Configuration/Internal/TrackingEnvReader.php +++ b/src/Config/SDK/Configuration/Internal/TrackingEnvReader.php @@ -13,7 +13,6 @@ */ final class TrackingEnvReader implements EnvReader, ResourceTrackable { - private readonly EnvReader $envReader; private ?ResourceCollection $resources = null; diff --git a/src/Config/SDK/Configuration/Internal/TreatNullAsUnsetNormalization.php b/src/Config/SDK/Configuration/Internal/TreatNullAsUnsetNormalization.php index 97b0f9eef..b099e9184 100644 --- a/src/Config/SDK/Configuration/Internal/TreatNullAsUnsetNormalization.php +++ b/src/Config/SDK/Configuration/Internal/TreatNullAsUnsetNormalization.php @@ -13,7 +13,6 @@ */ final class TreatNullAsUnsetNormalization { - public function apply(ArrayNodeDefinition $root): void { foreach ($root->getChildNodeDefinitions() as $childNode) { diff --git a/src/Config/SDK/Configuration/Loader/ConfigurationLoader.php b/src/Config/SDK/Configuration/Loader/ConfigurationLoader.php index 8b8973842..5a0580895 100644 --- a/src/Config/SDK/Configuration/Loader/ConfigurationLoader.php +++ b/src/Config/SDK/Configuration/Loader/ConfigurationLoader.php @@ -8,7 +8,6 @@ interface ConfigurationLoader { - public function loadConfiguration(mixed $configuration): void; public function addResource(ResourceInterface $resource): void; diff --git a/src/Config/SDK/Configuration/Loader/YamlExtensionFileLoader.php b/src/Config/SDK/Configuration/Loader/YamlExtensionFileLoader.php index 9356dcb4d..37d161e1c 100644 --- a/src/Config/SDK/Configuration/Loader/YamlExtensionFileLoader.php +++ b/src/Config/SDK/Configuration/Loader/YamlExtensionFileLoader.php @@ -17,7 +17,6 @@ final class YamlExtensionFileLoader extends FileLoader { - public function __construct(private readonly ConfigurationLoader $configuration, FileLocatorInterface $locator, ?string $env = null) { parent::__construct($locator, $env); diff --git a/src/Config/SDK/Configuration/Loader/YamlSymfonyFileLoader.php b/src/Config/SDK/Configuration/Loader/YamlSymfonyFileLoader.php index 222839144..fb0ab56c0 100644 --- a/src/Config/SDK/Configuration/Loader/YamlSymfonyFileLoader.php +++ b/src/Config/SDK/Configuration/Loader/YamlSymfonyFileLoader.php @@ -19,7 +19,6 @@ final class YamlSymfonyFileLoader extends FileLoader { - public function __construct(private readonly ConfigurationLoader $configuration, FileLocatorInterface $locator, ?string $env = null) { parent::__construct($locator, $env); diff --git a/src/Config/SDK/Configuration/ResourceCollection.php b/src/Config/SDK/Configuration/ResourceCollection.php index a2742c184..3ae5cdba0 100644 --- a/src/Config/SDK/Configuration/ResourceCollection.php +++ b/src/Config/SDK/Configuration/ResourceCollection.php @@ -10,7 +10,6 @@ interface ResourceCollection { - /** * @param object|class-string $class * diff --git a/src/Config/SDK/Configuration/Validation.php b/src/Config/SDK/Configuration/Validation.php index 6e741a879..b0f7898a7 100644 --- a/src/Config/SDK/Configuration/Validation.php +++ b/src/Config/SDK/Configuration/Validation.php @@ -22,7 +22,6 @@ */ final class Validation { - public static function ensureString(): Closure { return static function (mixed $value): ?string { diff --git a/src/Config/SDK/Instrumentation.php b/src/Config/SDK/Instrumentation.php index aa974d8bf..55bd65ae1 100644 --- a/src/Config/SDK/Instrumentation.php +++ b/src/Config/SDK/Instrumentation.php @@ -17,7 +17,6 @@ final class Instrumentation { - /** * @param ComponentPlugin $plugin */ diff --git a/src/Contrib/Otlp/StdoutLogsExporterFactory.php b/src/Contrib/Otlp/StdoutLogsExporterFactory.php new file mode 100644 index 000000000..d39c71e6a --- /dev/null +++ b/src/Contrib/Otlp/StdoutLogsExporterFactory.php @@ -0,0 +1,19 @@ +create('php://stdout', ContentTypes::NDJSON); + + return new LogsExporter($transport); + } +} diff --git a/src/Contrib/Otlp/StdoutMetricExporterFactory.php b/src/Contrib/Otlp/StdoutMetricExporterFactory.php new file mode 100644 index 000000000..3eeba09e2 --- /dev/null +++ b/src/Contrib/Otlp/StdoutMetricExporterFactory.php @@ -0,0 +1,19 @@ +create('php://stdout', ContentTypes::NDJSON); + + return new MetricExporter($transport); + } +} diff --git a/src/Contrib/Otlp/StdoutSpanExporterFactory.php b/src/Contrib/Otlp/StdoutSpanExporterFactory.php new file mode 100644 index 000000000..d51cbaa75 --- /dev/null +++ b/src/Contrib/Otlp/StdoutSpanExporterFactory.php @@ -0,0 +1,19 @@ +create('php://stdout', ContentTypes::NDJSON); + + return new SpanExporter($transport); + } +} diff --git a/src/Contrib/Otlp/_register.php b/src/Contrib/Otlp/_register.php index b3acdc3af..5f9d15af6 100644 --- a/src/Contrib/Otlp/_register.php +++ b/src/Contrib/Otlp/_register.php @@ -2,8 +2,12 @@ declare(strict_types=1); \OpenTelemetry\SDK\Registry::registerSpanExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\SpanExporterFactory::class); +\OpenTelemetry\SDK\Registry::registerSpanExporterFactory('otlp/stdout', \OpenTelemetry\Contrib\Otlp\StdoutSpanExporterFactory::class); + \OpenTelemetry\SDK\Registry::registerMetricExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\MetricExporterFactory::class); +\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('otlp/stdout', \OpenTelemetry\Contrib\Otlp\StdoutMetricExporterFactory::class); \OpenTelemetry\SDK\Registry::registerTransportFactory('http', \OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory::class); \OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\LogsExporterFactory::class); +\OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('otlp/stdout', \OpenTelemetry\Contrib\Otlp\StdoutLogsExporterFactory::class); diff --git a/src/Extension/Propagator/CloudTrace/Utils.php b/src/Extension/Propagator/CloudTrace/Utils.php index 380b91158..250186266 100644 --- a/src/Extension/Propagator/CloudTrace/Utils.php +++ b/src/Extension/Propagator/CloudTrace/Utils.php @@ -11,7 +11,6 @@ */ final class Utils { - /** * Pads the string with zero string characters on left hand side, to max total string size. * diff --git a/src/SDK/Common/Configuration/KnownValues.php b/src/SDK/Common/Configuration/KnownValues.php index 9c1626ef2..02c8f2eb7 100644 --- a/src/SDK/Common/Configuration/KnownValues.php +++ b/src/SDK/Common/Configuration/KnownValues.php @@ -43,6 +43,7 @@ interface KnownValues public const VALUE_HTTP_JSON = 'http/json'; public const VALUE_HTTP_NDJSON = 'http/ndjson'; public const VALUE_OTLP = 'otlp'; + public const VALUE_OTLP_STDOUT = 'otlp/stdout'; public const VALUE_ZIPKIN = 'zipkin'; public const VALUE_PROMETHEUS = 'prometheus'; public const VALUE_WITH_SAMPLED_TRACE = 'with_sampled_trace'; @@ -148,16 +149,19 @@ interface KnownValues */ public const OTEL_TRACES_EXPORTER = [ self::VALUE_OTLP, + self::VALUE_OTLP_STDOUT, self::VALUE_ZIPKIN, self::VALUE_NONE, ]; public const OTEL_METRICS_EXPORTER = [ self::VALUE_OTLP, + self::VALUE_OTLP_STDOUT, self::VALUE_PROMETHEUS, self::VALUE_NONE, ]; public const OTEL_LOGS_EXPORTER = [ self::VALUE_OTLP, + self::VALUE_OTLP_STDOUT, self::VALUE_NONE, ]; /** diff --git a/src/SDK/Common/InstrumentationScope/ConfiguratorClosure.php b/src/SDK/Common/InstrumentationScope/ConfiguratorClosure.php index ff043fa94..59718e7de 100644 --- a/src/SDK/Common/InstrumentationScope/ConfiguratorClosure.php +++ b/src/SDK/Common/InstrumentationScope/ConfiguratorClosure.php @@ -12,7 +12,6 @@ */ final class ConfiguratorClosure { - public function __construct( public readonly Closure $closure, private readonly ?string $name, diff --git a/src/SDK/Logs/EventLogger.php b/src/SDK/Logs/EventLogger.php index f84928b9c..1e65c4d63 100644 --- a/src/SDK/Logs/EventLogger.php +++ b/src/SDK/Logs/EventLogger.php @@ -12,6 +12,10 @@ use OpenTelemetry\Context\Context; use OpenTelemetry\Context\ContextInterface; +/** + * @deprecated + * @phan-suppress PhanDeprecatedInterface + */ class EventLogger implements EventLoggerInterface { /** diff --git a/src/SDK/Logs/EventLoggerProvider.php b/src/SDK/Logs/EventLoggerProvider.php index 2b5441b01..fa7cdc1e4 100644 --- a/src/SDK/Logs/EventLoggerProvider.php +++ b/src/SDK/Logs/EventLoggerProvider.php @@ -7,12 +7,18 @@ use OpenTelemetry\API\Common\Time\Clock; use OpenTelemetry\API\Logs\EventLoggerInterface; +/** + * @phan-suppress PhanDeprecatedInterface + */ class EventLoggerProvider implements EventLoggerProviderInterface { public function __construct(private readonly LoggerProviderInterface $loggerProvider) { } + /** + * @phan-suppress PhanDeprecatedClass + */ public function getEventLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): EventLoggerInterface { return new EventLogger( diff --git a/src/SDK/Logs/EventLoggerProviderFactory.php b/src/SDK/Logs/EventLoggerProviderFactory.php index 889e382ef..fbb0b5fda 100644 --- a/src/SDK/Logs/EventLoggerProviderFactory.php +++ b/src/SDK/Logs/EventLoggerProviderFactory.php @@ -6,6 +6,9 @@ use OpenTelemetry\SDK\Sdk; +/** + * @deprecated + */ class EventLoggerProviderFactory { public function create(LoggerProviderInterface $loggerProvider): EventLoggerProviderInterface diff --git a/src/SDK/Logs/EventLoggerProviderInterface.php b/src/SDK/Logs/EventLoggerProviderInterface.php index d3b137384..8f98f9578 100644 --- a/src/SDK/Logs/EventLoggerProviderInterface.php +++ b/src/SDK/Logs/EventLoggerProviderInterface.php @@ -6,6 +6,9 @@ use OpenTelemetry\API\Logs as API; +/** + * @phan-suppress PhanDeprecatedInterface + */ interface EventLoggerProviderInterface extends API\EventLoggerProviderInterface { public function forceFlush(): bool; diff --git a/src/SDK/Logs/NoopEventLoggerProvider.php b/src/SDK/Logs/NoopEventLoggerProvider.php index 3875f570f..a7edd0d6a 100644 --- a/src/SDK/Logs/NoopEventLoggerProvider.php +++ b/src/SDK/Logs/NoopEventLoggerProvider.php @@ -6,6 +6,9 @@ use OpenTelemetry\API\Logs as API; +/** + * @phan-suppress PhanDeprecatedInterface + */ class NoopEventLoggerProvider extends API\NoopEventLoggerProvider implements EventLoggerProviderInterface { public static function getInstance(): self diff --git a/src/SDK/Metrics/Data/Gauge.php b/src/SDK/Metrics/Data/Gauge.php index f8bf9caa5..f0be4850c 100644 --- a/src/SDK/Metrics/Data/Gauge.php +++ b/src/SDK/Metrics/Data/Gauge.php @@ -6,7 +6,6 @@ final class Gauge implements DataInterface { - /** * @param iterable $dataPoints */ diff --git a/src/SDK/Metrics/MetricSourceRegistryUnregisterInterface.php b/src/SDK/Metrics/MetricSourceRegistryUnregisterInterface.php index 543939752..6030e3d2d 100644 --- a/src/SDK/Metrics/MetricSourceRegistryUnregisterInterface.php +++ b/src/SDK/Metrics/MetricSourceRegistryUnregisterInterface.php @@ -13,6 +13,5 @@ */ interface MetricSourceRegistryUnregisterInterface { - public function unregisterStream(MetricCollectorInterface $collector, int $streamId): void; } diff --git a/src/SDK/Propagation/LateBindingTextMapPropagator.php b/src/SDK/Propagation/LateBindingTextMapPropagator.php index 6e30a0008..814c3000f 100644 --- a/src/SDK/Propagation/LateBindingTextMapPropagator.php +++ b/src/SDK/Propagation/LateBindingTextMapPropagator.php @@ -15,7 +15,6 @@ */ final class LateBindingTextMapPropagator implements TextMapPropagatorInterface { - /** * @param TextMapPropagatorInterface|Closure(): TextMapPropagatorInterface $propagator */ diff --git a/src/SDK/Sdk.php b/src/SDK/Sdk.php index 78f541f64..6bb6911ec 100644 --- a/src/SDK/Sdk.php +++ b/src/SDK/Sdk.php @@ -60,6 +60,9 @@ public function getLoggerProvider(): LoggerProviderInterface return $this->loggerProvider; } + /** + * @deprecated + */ public function getEventLoggerProvider(): EventLoggerProviderInterface { return $this->eventLoggerProvider; diff --git a/src/SDK/SdkAutoloader.php b/src/SDK/SdkAutoloader.php index bc3208e4c..804e5b7f9 100644 --- a/src/SDK/SdkAutoloader.php +++ b/src/SDK/SdkAutoloader.php @@ -74,6 +74,9 @@ public static function autoload(): bool return true; } + /** + * @phan-suppress PhanDeprecatedClass,PhanDeprecatedFunction + */ private static function environmentBasedInitializer(Configurator $configurator): Configurator { $propagator = (new PropagatorFactory())->create(); @@ -110,7 +113,7 @@ private static function environmentBasedInitializer(Configurator $configurator): } /** - * @phan-suppress PhanPossiblyUndeclaredVariable + * @phan-suppress PhanPossiblyUndeclaredVariable,PhanDeprecatedFunction */ private static function fileBasedInitializer(Configurator $configurator): Configurator { diff --git a/src/SDK/SdkBuilder.php b/src/SDK/SdkBuilder.php index 403713e0b..f2624e947 100644 --- a/src/SDK/SdkBuilder.php +++ b/src/SDK/SdkBuilder.php @@ -59,6 +59,9 @@ public function setLoggerProvider(LoggerProviderInterface $loggerProvider): self return $this; } + /** + * @deprecated + */ public function setEventLoggerProvider(EventLoggerProviderInterface $eventLoggerProvider): self { $this->eventLoggerProvider = $eventLoggerProvider; @@ -95,6 +98,9 @@ public function build(): Sdk ); } + /** + * @phan-suppress PhanDeprecatedFunction + */ public function buildAndRegisterGlobal(): ScopeInterface { $sdk = $this->build(); diff --git a/tests/Integration/Config/ConfigurationTest.php b/tests/Integration/Config/ConfigurationTest.php index ae204f50b..45b261ba4 100644 --- a/tests/Integration/Config/ConfigurationTest.php +++ b/tests/Integration/Config/ConfigurationTest.php @@ -12,7 +12,6 @@ #[CoversNothing] final class ConfigurationTest extends TestCase { - #[DataProvider('openTelemetryConfigurationDataProvider')] public function test_open_telemetry_configuration(string $file): void { diff --git a/tests/Unit/Config/SDK/Configuration/ConfigurationFactoryTest.php b/tests/Unit/Config/SDK/Configuration/ConfigurationFactoryTest.php index 04302026d..c018ade61 100644 --- a/tests/Unit/Config/SDK/Configuration/ConfigurationFactoryTest.php +++ b/tests/Unit/Config/SDK/Configuration/ConfigurationFactoryTest.php @@ -48,7 +48,6 @@ public function test_env_substitution_spec_examples(): void $factory = new ConfigurationFactory( [], new class() implements \OpenTelemetry\Config\SDK\Configuration\ComponentProvider { - public function createPlugin(array $properties, Context $context): mixed { throw new BadMethodCallException(); diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterConsole.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterConsole.php index df77c1224..dd6cab1e5 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterConsole.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterConsole.php @@ -13,7 +13,6 @@ final class LogRecordExporterConsole implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterOtlp.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterOtlp.php index 469c731f8..3451f12fa 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterOtlp.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordExporterOtlp.php @@ -14,7 +14,6 @@ final class LogRecordExporterOtlp implements ComponentProvider { - /** * @param array{ * protocol: 'http/protobuf'|'http/json'|'grpc/protobuf'|'grpc/json', diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorBatch.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorBatch.php index 1d4a00f91..507bbec4b 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorBatch.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorBatch.php @@ -15,7 +15,6 @@ final class LogRecordProcessorBatch implements ComponentProvider { - /** * @param array{ * schedule_delay: int<0, max>, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorSimple.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorSimple.php index fa728816f..ebd09bda4 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorSimple.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Logs/LogRecordProcessorSimple.php @@ -15,7 +15,6 @@ final class LogRecordProcessorSimple implements ComponentProvider { - /** * @param array{ * exporter: ComponentPlugin, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDefault.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDefault.php index 4ccfc034b..dd79b0d36 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDefault.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDefault.php @@ -13,7 +13,6 @@ final class AggregationResolverDefault implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDrop.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDrop.php index 6067a05df..47f8ecd0f 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDrop.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverDrop.php @@ -13,7 +13,6 @@ final class AggregationResolverDrop implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverExplicitBucketHistogram.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverExplicitBucketHistogram.php index 3a0736106..46c6dea60 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverExplicitBucketHistogram.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverExplicitBucketHistogram.php @@ -14,7 +14,6 @@ final class AggregationResolverExplicitBucketHistogram implements ComponentProvider { - /** * @param array{ * boundaries: list, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverLastValue.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverLastValue.php index 16dc6a4dd..9584331b2 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverLastValue.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverLastValue.php @@ -13,7 +13,6 @@ final class AggregationResolverLastValue implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverSum.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverSum.php index c79368a8e..cf35357dd 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverSum.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/AggregationResolverSum.php @@ -13,7 +13,6 @@ final class AggregationResolverSum implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterConsole.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterConsole.php index 27d7c8a83..9fa404426 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterConsole.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterConsole.php @@ -13,7 +13,6 @@ final class MetricExporterConsole implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterOtlp.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterOtlp.php index 8fb2779b7..f710b9894 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterOtlp.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterOtlp.php @@ -14,7 +14,6 @@ final class MetricExporterOtlp implements ComponentProvider { - /** * @param array{ * protocol: 'http/protobuf'|'http/json'|'grpc/protobuf'|'grpc/json', diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterPrometheus.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterPrometheus.php index beb2873c7..d146669cc 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterPrometheus.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricExporterPrometheus.php @@ -14,7 +14,6 @@ final class MetricExporterPrometheus implements ComponentProvider { - /** * @param array{ * host: string, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPeriodic.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPeriodic.php index 932668ea0..0086bf730 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPeriodic.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPeriodic.php @@ -15,7 +15,6 @@ final class MetricReaderPeriodic implements ComponentProvider { - /** * @param array{ * interval: int<0, max>, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPull.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPull.php index c9ce152b2..115f13d36 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPull.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Metrics/MetricReaderPull.php @@ -15,7 +15,6 @@ final class MetricReaderPull implements ComponentProvider { - /** * @param array{ * exporter: ComponentPlugin, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/OpenTelemetryConfiguration.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/OpenTelemetryConfiguration.php index 3731ab722..fd951ccf6 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/OpenTelemetryConfiguration.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/OpenTelemetryConfiguration.php @@ -21,7 +21,6 @@ final class OpenTelemetryConfiguration implements ComponentProvider { - /** * @param array{ * file_format: '0.1', diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3.php index 6dab69009..bc71eddfb 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3.php @@ -13,7 +13,6 @@ final class TextMapPropagatorB3 implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3Multi.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3Multi.php index 20fd5c753..d0cdfb2a8 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3Multi.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorB3Multi.php @@ -13,7 +13,6 @@ final class TextMapPropagatorB3Multi implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorBaggage.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorBaggage.php index fab7a0652..78e42fa4a 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorBaggage.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorBaggage.php @@ -13,7 +13,6 @@ final class TextMapPropagatorBaggage implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorComposite.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorComposite.php index 8089d6efb..a35f9f435 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorComposite.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorComposite.php @@ -14,7 +14,6 @@ final class TextMapPropagatorComposite implements ComponentProvider { - /** * @param list> $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorJaeger.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorJaeger.php index 1d6a01da0..c2527079c 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorJaeger.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorJaeger.php @@ -13,7 +13,6 @@ final class TextMapPropagatorJaeger implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorOTTrace.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorOTTrace.php index 397031784..0318cb8db 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorOTTrace.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorOTTrace.php @@ -13,7 +13,6 @@ final class TextMapPropagatorOTTrace implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorTraceContext.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorTraceContext.php index d3e730a44..bf1c5ae67 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorTraceContext.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorTraceContext.php @@ -13,7 +13,6 @@ final class TextMapPropagatorTraceContext implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorXRay.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorXRay.php index 4be5bd7f4..cce6de82a 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorXRay.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Propagator/TextMapPropagatorXRay.php @@ -13,7 +13,6 @@ final class TextMapPropagatorXRay implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOff.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOff.php index 552b2f992..d58b1a173 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOff.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOff.php @@ -13,7 +13,6 @@ final class SamplerAlwaysOff implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOn.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOn.php index f9aacdd93..ace4f9572 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOn.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerAlwaysOn.php @@ -13,7 +13,6 @@ final class SamplerAlwaysOn implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerParentBased.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerParentBased.php index b6569ca45..213df4c8d 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerParentBased.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerParentBased.php @@ -14,7 +14,6 @@ final class SamplerParentBased implements ComponentProvider { - /** * @param array{ * root: ComponentPlugin, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerTraceIdRatioBased.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerTraceIdRatioBased.php index eb6e6cb7d..17fb86acb 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerTraceIdRatioBased.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SamplerTraceIdRatioBased.php @@ -13,7 +13,6 @@ final class SamplerTraceIdRatioBased implements ComponentProvider { - /** * @param array{ * ratio: float, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterConsole.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterConsole.php index be7627279..43b09aa4b 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterConsole.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterConsole.php @@ -13,7 +13,6 @@ final class SpanExporterConsole implements ComponentProvider { - /** * @param array{} $properties */ diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterOtlp.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterOtlp.php index 6bd53513e..227c27beb 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterOtlp.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterOtlp.php @@ -14,7 +14,6 @@ final class SpanExporterOtlp implements ComponentProvider { - /** * @param array{ * protocol: 'http/protobuf'|'http/json'|'grpc/protobuf'|'grpc/json', diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterZipkin.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterZipkin.php index c0037c901..e75944e05 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterZipkin.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanExporterZipkin.php @@ -14,7 +14,6 @@ final class SpanExporterZipkin implements ComponentProvider { - /** * @param array{ * endpoint: string, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorBatch.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorBatch.php index de2c24026..23b13ae39 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorBatch.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorBatch.php @@ -15,7 +15,6 @@ final class SpanProcessorBatch implements ComponentProvider { - /** * @param array{ * schedule_delay: int<0, max>, diff --git a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorSimple.php b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorSimple.php index b9c3c7b41..98345980e 100644 --- a/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorSimple.php +++ b/tests/Unit/Config/SDK/Configuration/ExampleSdk/Trace/SpanProcessorSimple.php @@ -15,7 +15,6 @@ final class SpanProcessorSimple implements ComponentProvider { - /** * @param array{ * exporter: ComponentPlugin, diff --git a/tests/Unit/Extension/Propagator/CloudTrace/CloudTraceFormatterTest.php b/tests/Unit/Extension/Propagator/CloudTrace/CloudTraceFormatterTest.php index dc141a02d..1183fca65 100644 --- a/tests/Unit/Extension/Propagator/CloudTrace/CloudTraceFormatterTest.php +++ b/tests/Unit/Extension/Propagator/CloudTrace/CloudTraceFormatterTest.php @@ -15,7 +15,6 @@ #[CoversClass(CloudTraceFormatter::class)] class CloudTraceFormatterTest extends TestCase { - #[DataProvider('for_test_deserialize')] public function test_deserialize(string $header, string $traceId, string $spanId, int $sample) : void { diff --git a/tests/Unit/Extension/Propagator/CloudTrace/UtilsTest.php b/tests/Unit/Extension/Propagator/CloudTrace/UtilsTest.php index 592ed3191..4b08aa2c5 100644 --- a/tests/Unit/Extension/Propagator/CloudTrace/UtilsTest.php +++ b/tests/Unit/Extension/Propagator/CloudTrace/UtilsTest.php @@ -12,7 +12,6 @@ #[CoversClass(Utils::class)] class UtilsTest extends TestCase { - #[DataProvider('for_test_left_zero_pad')] public function test_left_zero_pad(string $pad, int $howMuch, string $equalsTo) : void { diff --git a/tests/Unit/SDK/Metrics/Exemplar/FilteredReservoirTest.php b/tests/Unit/SDK/Metrics/Exemplar/FilteredReservoirTest.php index 1cdc832eb..b0335bc17 100644 --- a/tests/Unit/SDK/Metrics/Exemplar/FilteredReservoirTest.php +++ b/tests/Unit/SDK/Metrics/Exemplar/FilteredReservoirTest.php @@ -24,7 +24,6 @@ #[CoversClass(WithSampledTraceExemplarFilter::class)] final class FilteredReservoirTest extends TestCase { - public function test_all_reservoir_returns_exemplars(): void { $reservoir = new FilteredReservoir(new FixedSizeReservoir(4), new AllExemplarFilter()); diff --git a/tests/Unit/SDK/Metrics/MetricFactory/StreamFactoryTest.php b/tests/Unit/SDK/Metrics/MetricFactory/StreamFactoryTest.php index 439d04afa..8c2902a8d 100644 --- a/tests/Unit/SDK/Metrics/MetricFactory/StreamFactoryTest.php +++ b/tests/Unit/SDK/Metrics/MetricFactory/StreamFactoryTest.php @@ -163,7 +163,6 @@ public function test_create_synchronous_observer(): void final class CollectingSourceRegistry implements MetricSourceRegistryInterface { - /** * @var list */