summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/open-telemetry')
-rw-r--r--vendor/open-telemetry/api/Baggage/Baggage.php100
-rw-r--r--vendor/open-telemetry/api/Baggage/BaggageBuilder.php40
-rw-r--r--vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php23
-rw-r--r--vendor/open-telemetry/api/Baggage/BaggageInterface.php62
-rw-r--r--vendor/open-telemetry/api/Baggage/Entry.php38
-rw-r--r--vendor/open-telemetry/api/Baggage/Metadata.php27
-rw-r--r--vendor/open-telemetry/api/Baggage/MetadataInterface.php13
-rw-r--r--vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php92
-rw-r--r--vendor/open-telemetry/api/Baggage/Propagation/Parser.php69
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php13
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php37
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php10
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php13
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php22
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php25
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php48
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/Logging.php90
-rw-r--r--vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php50
-rw-r--r--vendor/open-telemetry/api/Globals.php121
-rw-r--r--vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php97
-rw-r--r--vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php77
-rw-r--r--vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php14
-rw-r--r--vendor/open-telemetry/api/Instrumentation/Configurator.php113
-rw-r--r--vendor/open-telemetry/api/Instrumentation/ContextKeys.php58
-rw-r--r--vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php43
-rw-r--r--vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php193
-rw-r--r--vendor/open-telemetry/api/LoggerHolder.php53
-rw-r--r--vendor/open-telemetry/api/Logs/EventLogger.php26
-rw-r--r--vendor/open-telemetry/api/Logs/EventLoggerInterface.php13
-rw-r--r--vendor/open-telemetry/api/Logs/LogRecord.php108
-rw-r--r--vendor/open-telemetry/api/Logs/LoggerInterface.php10
-rw-r--r--vendor/open-telemetry/api/Logs/LoggerProviderInterface.php18
-rw-r--r--vendor/open-telemetry/api/Logs/Map/Psr3.php40
-rw-r--r--vendor/open-telemetry/api/Logs/NoopLogger.php33
-rw-r--r--vendor/open-telemetry/api/Logs/NoopLoggerProvider.php20
-rw-r--r--vendor/open-telemetry/api/Logs/README.md19
-rw-r--r--vendor/open-telemetry/api/Metrics/CounterInterface.php21
-rw-r--r--vendor/open-telemetry/api/Metrics/HistogramInterface.php21
-rw-r--r--vendor/open-telemetry/api/Metrics/MeterInterface.php111
-rw-r--r--vendor/open-telemetry/api/Metrics/MeterProviderInterface.php28
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php46
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php20
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php19
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php19
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php19
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php56
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php16
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php16
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php16
-rw-r--r--vendor/open-telemetry/api/Metrics/ObserverInterface.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php19
-rw-r--r--vendor/open-telemetry/api/README.md14
-rw-r--r--vendor/open-telemetry/api/Signals.php21
-rw-r--r--vendor/open-telemetry/api/Trace/NonRecordingSpan.php76
-rw-r--r--vendor/open-telemetry/api/Trace/NoopSpanBuilder.php65
-rw-r--r--vendor/open-telemetry/api/Trace/NoopTracer.php26
-rw-r--r--vendor/open-telemetry/api/Trace/NoopTracerProvider.php17
-rw-r--r--vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php157
-rw-r--r--vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php31
-rw-r--r--vendor/open-telemetry/api/Trace/Span.php59
-rw-r--r--vendor/open-telemetry/api/Trace/SpanBuilderInterface.php51
-rw-r--r--vendor/open-telemetry/api/Trace/SpanContext.php127
-rw-r--r--vendor/open-telemetry/api/Trace/SpanContextInterface.php28
-rw-r--r--vendor/open-telemetry/api/Trace/SpanContextValidator.php35
-rw-r--r--vendor/open-telemetry/api/Trace/SpanInterface.php96
-rw-r--r--vendor/open-telemetry/api/Trace/SpanKind.php17
-rw-r--r--vendor/open-telemetry/api/Trace/StatusCode.php15
-rw-r--r--vendor/open-telemetry/api/Trace/TraceFlags.php11
-rw-r--r--vendor/open-telemetry/api/Trace/TraceState.php190
-rw-r--r--vendor/open-telemetry/api/Trace/TraceStateInterface.php61
-rw-r--r--vendor/open-telemetry/api/Trace/TracerInterface.php11
-rw-r--r--vendor/open-telemetry/api/Trace/TracerProviderInterface.php19
-rw-r--r--vendor/open-telemetry/api/Trace/functions.php44
-rw-r--r--vendor/open-telemetry/api/composer.json40
-rw-r--r--vendor/open-telemetry/context/Context.php131
-rw-r--r--vendor/open-telemetry/context/ContextInterface.php86
-rw-r--r--vendor/open-telemetry/context/ContextKey.php23
-rw-r--r--vendor/open-telemetry/context/ContextKeyInterface.php12
-rw-r--r--vendor/open-telemetry/context/ContextKeys.php25
-rw-r--r--vendor/open-telemetry/context/ContextStorage.php57
-rw-r--r--vendor/open-telemetry/context/ContextStorageHead.php19
-rw-r--r--vendor/open-telemetry/context/ContextStorageInterface.php32
-rw-r--r--vendor/open-telemetry/context/ContextStorageNode.php92
-rw-r--r--vendor/open-telemetry/context/ContextStorageScopeInterface.php22
-rw-r--r--vendor/open-telemetry/context/DebugScope.php94
-rw-r--r--vendor/open-telemetry/context/ExecutionContextAwareInterface.php23
-rw-r--r--vendor/open-telemetry/context/FiberBoundContextStorage.php84
-rw-r--r--vendor/open-telemetry/context/FiberBoundContextStorageScope.php67
-rw-r--r--vendor/open-telemetry/context/ImplicitContextKeyedInterface.php32
-rw-r--r--vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php129
-rw-r--r--vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php83
-rw-r--r--vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php36
-rw-r--r--vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php25
-rw-r--r--vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php16
-rw-r--r--vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php46
-rw-r--r--vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php40
-rw-r--r--vendor/open-telemetry/context/README.md63
-rw-r--r--vendor/open-telemetry/context/ScopeInterface.php32
-rw-r--r--vendor/open-telemetry/context/ZendObserverFiber.php67
-rw-r--r--vendor/open-telemetry/context/composer.json41
-rw-r--r--vendor/open-telemetry/context/fiber/initialize_fiber_handler.php20
-rw-r--r--vendor/open-telemetry/context/fiber/zend_observer_fiber.h9
-rw-r--r--vendor/open-telemetry/exporter-otlp/AttributesConverter.php62
-rw-r--r--vendor/open-telemetry/exporter-otlp/ContentTypes.php12
-rw-r--r--vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php145
-rw-r--r--vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php28
-rw-r--r--vendor/open-telemetry/exporter-otlp/LogsConverter.php142
-rw-r--r--vendor/open-telemetry/exporter-otlp/LogsExporter.php85
-rw-r--r--vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php85
-rw-r--r--vendor/open-telemetry/exporter-otlp/MetricConverter.php265
-rw-r--r--vendor/open-telemetry/exporter-otlp/MetricExporter.php97
-rw-r--r--vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php110
-rw-r--r--vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php33
-rw-r--r--vendor/open-telemetry/exporter-otlp/OtlpUtil.php45
-rw-r--r--vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php115
-rw-r--r--vendor/open-telemetry/exporter-otlp/Protocols.php36
-rw-r--r--vendor/open-telemetry/exporter-otlp/README.md45
-rw-r--r--vendor/open-telemetry/exporter-otlp/SpanConverter.php187
-rw-r--r--vendor/open-telemetry/exporter-otlp/SpanExporter.php81
-rw-r--r--vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php96
-rw-r--r--vendor/open-telemetry/exporter-otlp/_register.php9
-rw-r--r--vendor/open-telemetry/exporter-otlp/composer.json41
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/.gitignore1
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.phpbin0 -> 1361 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.phpbin0 -> 1438 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.phpbin0 -> 1380 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.phpbin0 -> 1411 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.phpbin0 -> 2512 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.phpbin0 -> 1714 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.phpbin0 -> 4526 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php32
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.phpbin0 -> 2533 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.phpbin0 -> 1465 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php127
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php81
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php119
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php53
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php127
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php81
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php119
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php53
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php127
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php81
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php119
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php53
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php240
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php68
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php98
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php164
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php98
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php83
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php88
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php156
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php541
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php58
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php90
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php167
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php113
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php201
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php149
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php113
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php114
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php61
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php269
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php99
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php718
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php141
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php67
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php99
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php565
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php156
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php227
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php235
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php60
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php99
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php393
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php132
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php358
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php90
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php309
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php133
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php65
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php336
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php117
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php113
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php60
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php61
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php156
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php67
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php726
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php189
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php225
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php94
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php102
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php126
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php66
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php297
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php68
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php90
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/README.md31
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/VERSION1
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/composer.json37
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php83
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php29
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php88
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php29
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php58
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php11
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/Attributes.php67
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php120
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php36
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php19
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php77
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php33
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php19
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Configuration.php182
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Defaults.php122
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php208
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php34
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php28
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php45
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php38
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php68
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php40
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php41
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php133
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php62
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Variables.php142
-rw-r--r--vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md14
-rw-r--r--vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php93
-rw-r--r--vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php7
-rw-r--r--vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php155
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php168
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php74
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php175
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php97
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php118
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php32
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/TransportInterface.php22
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php48
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php40
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/FutureInterface.php34
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/NullCancellation.php20
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php22
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php52
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php46
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php31
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/ClockFactory.php30
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php16
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/ClockInterface.php19
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatch.php119
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php44
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php20
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/SystemClock.php49
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/Util.php32
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php35
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php82
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/WeakMap.php175
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/functions.php52
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php106
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php19
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php48
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php28
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/_register.php6
-rw-r--r--vendor/open-telemetry/sdk/Logs/ExporterFactory.php29
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordLimits.php29
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php58
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php62
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Logs/Logger.php37
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProvider.php56
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php55
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php24
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerSharedState.php60
-rw-r--r--vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php33
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php273
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php62
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php37
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php38
-rw-r--r--vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php50
-rw-r--r--vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php9
-rw-r--r--vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php103
-rw-r--r--vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php83
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php167
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php40
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php81
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php91
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AggregationInterface.php57
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php33
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Counter.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php9
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php65
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Gauge.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Histogram.php29
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php76
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Metric.php46
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php43
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Sum.php34
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Temporality.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php26
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php92
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php36
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php38
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php40
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Histogram.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Instrument.php36
-rw-r--r--vendor/open-telemetry/sdk/Metrics/InstrumentType.php25
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Meter.php314
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterInstruments.php29
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProvider.php130
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php62
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php78
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php105
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php78
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php23
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php7
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php17
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php187
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php44
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php98
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php41
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php156
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php14
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php36
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php31
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php184
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php18
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php26
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableCallback.php58
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php32
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableCounter.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableGauge.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php61
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php71
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php64
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php50
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php30
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php18
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php111
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/Delta.php33
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php110
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/Metric.php44
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php73
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php58
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php126
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php19
-rw-r--r--vendor/open-telemetry/sdk/Metrics/UpDownCounter.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php40
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php33
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php29
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php77
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ViewProjection.php47
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php55
-rw-r--r--vendor/open-telemetry/sdk/Propagation/_register.php16
-rw-r--r--vendor/open-telemetry/sdk/README.md49
-rw-r--r--vendor/open-telemetry/sdk/Registry.php208
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Composer.php30
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Composite.php32
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Constant.php23
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Environment.php40
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Host.php27
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php32
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Process.php43
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php28
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php53
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php25
-rw-r--r--vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Resource/ResourceInfo.php125
-rw-r--r--vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php95
-rw-r--r--vendor/open-telemetry/sdk/Sdk.php70
-rw-r--r--vendor/open-telemetry/sdk/SdkAutoloader.php76
-rw-r--r--vendor/open-telemetry/sdk/SdkBuilder.php98
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php41
-rw-r--r--vendor/open-telemetry/sdk/Trace/Event.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/EventInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/ExporterFactory.php32
-rw-r--r--vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Trace/ImmutableSpan.php153
-rw-r--r--vendor/open-telemetry/sdk/Trace/Link.php30
-rw-r--r--vendor/open-telemetry/sdk/Trace/LinkInterface.php14
-rw-r--r--vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php21
-rw-r--r--vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php49
-rw-r--r--vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php11
-rw-r--r--vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php50
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php50
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php100
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php70
-rw-r--r--vendor/open-telemetry/sdk/Trace/SamplerFactory.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/SamplerInterface.php46
-rw-r--r--vendor/open-telemetry/sdk/Trace/SamplingResult.php71
-rw-r--r--vendor/open-telemetry/sdk/Trace/Span.php359
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanBuilder.php191
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanDataInterface.php46
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php12
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php57
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php18
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php173
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php40
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php58
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php96
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php7
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php29
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanLimits.php67
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php148
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php290
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php41
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php79
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php120
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php38
-rw-r--r--vendor/open-telemetry/sdk/Trace/StatusData.php84
-rw-r--r--vendor/open-telemetry/sdk/Trace/StatusDataInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Trace/Tracer.php52
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProvider.php99
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php45
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php60
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerSharedState.php100
-rw-r--r--vendor/open-telemetry/sdk/_autoload.php5
-rw-r--r--vendor/open-telemetry/sdk/composer.json59
-rw-r--r--vendor/open-telemetry/sem-conv/README.md25
-rw-r--r--vendor/open-telemetry/sem-conv/ResourceAttributes.php1007
-rw-r--r--vendor/open-telemetry/sem-conv/TraceAttributes.php2052
-rw-r--r--vendor/open-telemetry/sem-conv/composer.json32
512 files changed, 36756 insertions, 0 deletions
diff --git a/vendor/open-telemetry/api/Baggage/Baggage.php b/vendor/open-telemetry/api/Baggage/Baggage.php
new file mode 100644
index 000000000..06c701605
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Baggage.php
@@ -0,0 +1,100 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ContextKeys;
+use OpenTelemetry\Context\ScopeInterface;
+
+final class Baggage implements BaggageInterface
+{
+ private static ?self $emptyBaggage = null;
+
+ /** @inheritDoc */
+ public static function fromContext(ContextInterface $context): BaggageInterface
+ {
+ return $context->get(ContextKeys::baggage()) ?? self::getEmpty();
+ }
+
+ /** @inheritDoc */
+ public static function getBuilder(): BaggageBuilderInterface
+ {
+ return new BaggageBuilder();
+ }
+
+ /** @inheritDoc */
+ public static function getCurrent(): BaggageInterface
+ {
+ return self::fromContext(Context::getCurrent());
+ }
+
+ /** @inheritDoc */
+ public static function getEmpty(): BaggageInterface
+ {
+ if (null === self::$emptyBaggage) {
+ self::$emptyBaggage = new self();
+ }
+
+ return self::$emptyBaggage;
+ }
+
+ /** @var array<string, Entry> */
+ private array $entries;
+
+ /** @param array<string, Entry> $entries */
+ public function __construct(array $entries = [])
+ {
+ $this->entries = $entries;
+ }
+
+ /** @inheritDoc */
+ public function activate(): ScopeInterface
+ {
+ return Context::getCurrent()->withContextValue($this)->activate();
+ }
+
+ /** @inheritDoc */
+ public function getEntry(string $key): ?Entry
+ {
+ return $this->entries[$key] ?? null;
+ }
+
+ /** @inheritDoc */
+ public function getValue(string $key)
+ {
+ if (($entry = $this->getEntry($key)) !== null) {
+ return $entry->getValue();
+ }
+
+ return null;
+ }
+
+ /** @inheritDoc */
+ public function getAll(): iterable
+ {
+ foreach ($this->entries as $key => $entry) {
+ yield $key => $entry;
+ }
+ }
+
+ /** @inheritDoc */
+ public function isEmpty(): bool
+ {
+ return $this->entries === [];
+ }
+
+ /** @inheritDoc */
+ public function toBuilder(): BaggageBuilderInterface
+ {
+ return new BaggageBuilder($this->entries);
+ }
+
+ /** @inheritDoc */
+ public function storeInContext(ContextInterface $context): ContextInterface
+ {
+ return $context->with(ContextKeys::baggage(), $this);
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/BaggageBuilder.php b/vendor/open-telemetry/api/Baggage/BaggageBuilder.php
new file mode 100644
index 000000000..d4500eac5
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/BaggageBuilder.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+final class BaggageBuilder implements BaggageBuilderInterface
+{
+ /** @var array<string, Entry> */
+ private array $entries;
+
+ /** @param array<string, Entry> $entries */
+ public function __construct(array $entries = [])
+ {
+ $this->entries = $entries;
+ }
+
+ /** @inheritDoc */
+ public function remove(string $key): BaggageBuilderInterface
+ {
+ unset($this->entries[$key]);
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function set(string $key, $value, MetadataInterface $metadata = null): BaggageBuilderInterface
+ {
+ $metadata ??= Metadata::getEmpty();
+
+ $this->entries[$key] = new Entry($value, $metadata);
+
+ return $this;
+ }
+
+ public function build(): BaggageInterface
+ {
+ return new Baggage($this->entries);
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php b/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php
new file mode 100644
index 000000000..301cfbc3c
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+use OpenTelemetry\API\Baggage as API;
+
+interface BaggageBuilderInterface
+{
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#set-value
+ * @param mixed $value
+ */
+ public function set(string $key, $value, API\MetadataInterface $metadata = null): API\BaggageBuilderInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#remove-value
+ */
+ public function remove(string $key): API\BaggageBuilderInterface;
+
+ public function build(): API\BaggageInterface;
+}
diff --git a/vendor/open-telemetry/api/Baggage/BaggageInterface.php b/vendor/open-telemetry/api/Baggage/BaggageInterface.php
new file mode 100644
index 000000000..83f45755d
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/BaggageInterface.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+use OpenTelemetry\API\Baggage as API;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ImplicitContextKeyedInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#operations
+ */
+interface BaggageInterface extends ImplicitContextKeyedInterface
+{
+ /**
+ * Returns the {@see API\BaggageInterface} from the provided *$context*,
+ * falling back on {@see API\BaggageInterface::getEmpty()} if there is no baggage in the provided context.
+ */
+ public static function fromContext(ContextInterface $context): API\BaggageInterface;
+
+ /**
+ * Returns a new empty {@see API\BaggageBuilderInterface}.
+ */
+ public static function getBuilder(): API\BaggageBuilderInterface;
+
+ /**
+ * Returns the current {@see Baggage} from the current {@see ContextInterface},
+ * falling back on {@see API\BaggageInterface::getEmpty()} if there is no baggage in the current context.
+ */
+ public static function getCurrent(): API\BaggageInterface;
+
+ /**
+ * Returns a new {@see API\BaggageInterface} with no entries.
+ */
+ public static function getEmpty(): API\BaggageInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#get-value
+ */
+ public function getEntry(string $key): ?API\Entry;
+
+ /**
+ * Returns the value from the {@see API\Entry} with the provided *key*.
+ * @see getEntry
+ *
+ * @return mixed
+ */
+ public function getValue(string $key);
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#get-all-values
+ */
+ public function getAll(): iterable;
+
+ public function isEmpty(): bool;
+
+ /**
+ * Returns a new {@see API\BaggageBuilderInterface} pre-initialized with the contents of `$this`.
+ */
+ public function toBuilder(): API\BaggageBuilderInterface;
+}
diff --git a/vendor/open-telemetry/api/Baggage/Entry.php b/vendor/open-telemetry/api/Baggage/Entry.php
new file mode 100644
index 000000000..eb3d0de5b
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Entry.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+final class Entry
+{
+ /** @var mixed */
+ private $value;
+
+ private MetadataInterface $metadata;
+
+ /**
+ * @param mixed $value
+ * @param MetadataInterface $metadata
+ */
+ public function __construct(
+ $value,
+ MetadataInterface $metadata
+ ) {
+ $this->value = $value;
+ $this->metadata = $metadata;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ public function getMetadata(): MetadataInterface
+ {
+ return $this->metadata;
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/Metadata.php b/vendor/open-telemetry/api/Baggage/Metadata.php
new file mode 100644
index 000000000..043c96a8a
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Metadata.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+final class Metadata implements MetadataInterface
+{
+ private static ?self $instance = null;
+
+ public static function getEmpty(): Metadata
+ {
+ return self::$instance ??= new self('');
+ }
+
+ private string $metadata;
+
+ public function __construct(string $metadata)
+ {
+ $this->metadata = $metadata;
+ }
+
+ public function getValue(): string
+ {
+ return $this->metadata;
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/MetadataInterface.php b/vendor/open-telemetry/api/Baggage/MetadataInterface.php
new file mode 100644
index 000000000..cd0a6d1ec
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/MetadataInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#set-value
+ */
+interface MetadataInterface
+{
+ public function getValue(): string;
+}
diff --git a/vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php b/vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php
new file mode 100644
index 000000000..fae62dcab
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage\Propagation;
+
+use OpenTelemetry\API\Baggage\Baggage;
+use OpenTelemetry\API\Baggage\BaggageBuilderInterface;
+use OpenTelemetry\API\Baggage\Entry; /** @phan-suppress-current-line PhanUnreferencedUseNormal */
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\Propagation\ArrayAccessGetterSetter;
+use OpenTelemetry\Context\Propagation\PropagationGetterInterface;
+use OpenTelemetry\Context\Propagation\PropagationSetterInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use function rtrim;
+use function urlencode;
+
+/**
+ * @see https://www.w3.org/TR/baggage
+ */
+final class BaggagePropagator implements TextMapPropagatorInterface
+{
+ public const BAGGAGE = 'baggage';
+
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ public function fields(): array
+ {
+ return [self::BAGGAGE];
+ }
+
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
+ {
+ $setter ??= ArrayAccessGetterSetter::getInstance();
+ $context ??= Context::getCurrent();
+
+ $baggage = Baggage::fromContext($context);
+
+ if ($baggage->isEmpty()) {
+ return;
+ }
+
+ $headerString = '';
+
+ /** @var Entry $entry */
+ foreach ($baggage->getAll() as $key => $entry) {
+ $value = urlencode($entry->getValue());
+ $headerString.= "{$key}={$value}";
+
+ if (($metadata = $entry->getMetadata()->getValue()) !== '' && ($metadata = $entry->getMetadata()->getValue()) !== '0') {
+ $headerString .= ";{$metadata}";
+ }
+
+ $headerString .= ',';
+ }
+
+ if ($headerString !== '' && $headerString !== '0') {
+ $headerString = rtrim($headerString, ',');
+ $setter->set($carrier, self::BAGGAGE, $headerString);
+ }
+ }
+
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
+ {
+ $getter ??= ArrayAccessGetterSetter::getInstance();
+ $context ??= Context::getCurrent();
+
+ if (!$baggageHeader = $getter->get($carrier, self::BAGGAGE)) {
+ return $context;
+ }
+
+ $baggageBuilder = Baggage::getBuilder();
+ $this->extractValue($baggageHeader, $baggageBuilder);
+
+ return $context->withContextValue($baggageBuilder->build());
+ }
+
+ private function extractValue(string $baggageHeader, BaggageBuilderInterface $baggageBuilder): void
+ {
+ (new Parser($baggageHeader))->parseInto($baggageBuilder);
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/Propagation/Parser.php b/vendor/open-telemetry/api/Baggage/Propagation/Parser.php
new file mode 100644
index 000000000..3518b858d
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Propagation/Parser.php
@@ -0,0 +1,69 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage\Propagation;
+
+use function explode;
+use OpenTelemetry\API\Baggage\BaggageBuilderInterface;
+use OpenTelemetry\API\Baggage\Metadata;
+use function str_replace;
+use function trim;
+use function urldecode;
+
+final class Parser
+{
+ private const EXCLUDED_KEY_CHARS = [' ', '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}'];
+ private const EXCLUDED_VALUE_CHARS = [' ', '"', ',', ';', '\\'];
+ private const EQUALS = '=';
+
+ /** @readonly */
+ private string $baggageHeader;
+
+ public function __construct(string $baggageHeader)
+ {
+ $this->baggageHeader = $baggageHeader;
+ }
+
+ public function parseInto(BaggageBuilderInterface $baggageBuilder): void
+ {
+ foreach (explode(',', $this->baggageHeader) as $baggageString) {
+ if (empty(trim($baggageString))) {
+ continue;
+ }
+
+ $explodedString = explode(';', $baggageString, 2);
+
+ $keyValue = trim($explodedString[0]);
+
+ if (empty($keyValue) || mb_strpos($keyValue, self::EQUALS) === false) {
+ continue;
+ }
+
+ $metadataString = $explodedString[1] ?? null;
+
+ if ($metadataString && !empty(trim(($metadataString)))) {
+ $metadata = new Metadata(trim($metadataString));
+ } else {
+ $metadata = null;
+ }
+
+ [$key, $value] = explode(self::EQUALS, $keyValue, 2);
+
+ $key = urldecode($key);
+ $value = urldecode($value);
+
+ $key = str_replace(self::EXCLUDED_KEY_CHARS, '', trim($key), $invalidKeyCharacters);
+ if (empty($key) || $invalidKeyCharacters > 0) {
+ continue;
+ }
+
+ $value = str_replace(self::EXCLUDED_VALUE_CHARS, '', trim($value), $invalidValueCharacters);
+ if (empty($value) || $invalidValueCharacters > 0) {
+ continue;
+ }
+
+ $baggageBuilder->set($key, $value, $metadata);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php
new file mode 100644
index 000000000..1b9f785aa
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class ErrorLogWriter implements LogWriterInterface
+{
+ public function write($level, string $message, array $context): void
+ {
+ error_log(Formatter::format($level, $message, $context));
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php
new file mode 100644
index 000000000..4cfd6f9d4
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class Formatter
+{
+ public static function format($level, string $message, array $context): string
+ {
+ $exception = (array_key_exists('exception', $context) && $context['exception'] instanceof \Throwable)
+ ? $context['exception']
+ : null;
+ if ($exception) {
+ $message = sprintf(
+ 'OpenTelemetry: [%s] %s [exception] %s%s%s',
+ $level,
+ $message,
+ $exception->getMessage(),
+ PHP_EOL,
+ $exception->getTraceAsString()
+ );
+ } else {
+ //get calling location, skipping over trait, formatter etc
+ $caller = debug_backtrace()[3];
+ $message = sprintf(
+ 'OpenTelemetry: [%s] %s in %s(%s)',
+ $level,
+ $message,
+ $caller['file'],
+ $caller['line'],
+ );
+ }
+
+ return $message;
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php
new file mode 100644
index 000000000..046d21fc9
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+interface LogWriterInterface
+{
+ public function write($level, string $message, array $context): void;
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php
new file mode 100644
index 000000000..f7529c082
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class NoopLogWriter implements LogWriterInterface
+{
+ public function write($level, string $message, array $context): void
+ {
+ //do nothing
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php
new file mode 100644
index 000000000..5b2d19c15
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+use Psr\Log\LoggerInterface;
+
+class Psr3LogWriter implements LogWriterInterface
+{
+ private LoggerInterface $logger;
+
+ public function __construct(LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
+
+ public function write($level, string $message, array $context): void
+ {
+ $this->logger->log($level, $message, $context);
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php
new file mode 100644
index 000000000..f65f1e856
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class StreamLogWriter implements LogWriterInterface
+{
+ private $stream;
+
+ public function __construct(string $destination)
+ {
+ $stream = fopen($destination, 'a');
+ if ($stream) {
+ $this->stream = $stream;
+ } else {
+ throw new \RuntimeException(sprintf('Unable to open %s for writing', $destination));
+ }
+ }
+
+ public function write($level, string $message, array $context): void
+ {
+ fwrite($this->stream, Formatter::format($level, $message, $context));
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php
new file mode 100644
index 000000000..07c48cea5
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal;
+
+use OpenTelemetry\API\Behavior\Internal\LogWriter\ErrorLogWriter;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\LogWriterInterface;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\NoopLogWriter;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\Psr3LogWriter;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\StreamLogWriter;
+use OpenTelemetry\API\Instrumentation\ConfigurationResolver;
+use OpenTelemetry\API\LoggerHolder;
+
+class LogWriterFactory
+{
+ private const OTEL_PHP_LOG_DESTINATION = 'OTEL_PHP_LOG_DESTINATION';
+
+ public function create(): LogWriterInterface
+ {
+ $dest = (new ConfigurationResolver())->getString(self::OTEL_PHP_LOG_DESTINATION);
+ $logger = LoggerHolder::get();
+
+ switch ($dest) {
+ case 'none':
+ return new NoopLogWriter();
+ case 'stderr':
+ return new StreamLogWriter('php://stderr');
+ case 'stdout':
+ return new StreamLogWriter('php://stdout');
+ case 'psr3':
+ if ($logger) {
+ return new Psr3LogWriter($logger);
+ }
+ error_log('OpenTelemetry: cannot use OTEL_PHP_LOG_DESTINATION=psr3 without providing a PSR-3 logger');
+ //default to error log
+ return new ErrorLogWriter();
+ case 'error_log':
+ return new ErrorLogWriter();
+ default:
+ if ($logger) {
+ return new Psr3LogWriter($logger);
+ }
+
+ return new ErrorLogWriter();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/Logging.php b/vendor/open-telemetry/api/Behavior/Internal/Logging.php
new file mode 100644
index 000000000..e5bec7ab5
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/Logging.php
@@ -0,0 +1,90 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal;
+
+use OpenTelemetry\API\Behavior\Internal\LogWriter\LogWriterInterface;
+use Psr\Log\LogLevel;
+
+/**
+ * Logging utility functions for internal logging (of OpenTelemetry errors/warnings etc).
+ * This is not part of SDK configuration to avoid creating a dependency on SDK from any package which does logging.
+ * @todo this should be `@internal`, but deptrac is not happy with that.
+ */
+class Logging
+{
+ private const OTEL_LOG_LEVEL = 'OTEL_LOG_LEVEL';
+ private const DEFAULT_LEVEL = LogLevel::INFO;
+ private const NONE = 'none';
+ private const LEVELS = [
+ LogLevel::DEBUG,
+ LogLevel::INFO,
+ LogLevel::NOTICE,
+ LogLevel::WARNING,
+ LogLevel::ERROR,
+ LogLevel::CRITICAL,
+ LogLevel::ALERT,
+ LogLevel::EMERGENCY,
+ self::NONE, //highest priority so that nothing is logged
+ ];
+
+ /**
+ * The minimum log level. Messages with lower severity than this will be ignored.
+ */
+ private static ?int $logLevel = null;
+ private static ?LogWriterInterface $writer = null;
+
+ public static function setLogWriter(LogWriterInterface $writer): void
+ {
+ self::$writer = $writer;
+ }
+
+ public static function logWriter(): LogWriterInterface
+ {
+ self::$writer ??= (new LogWriterFactory())->create();
+
+ return self::$writer;
+ }
+
+ /**
+ * Get level priority from level name
+ */
+ public static function level(string $level): int
+ {
+ $value = array_search($level, self::LEVELS);
+
+ return $value ?: 1; //'info'
+ }
+
+ /**
+ * Get defined OTEL_LOG_LEVEL, or default
+ */
+ public static function logLevel(): int
+ {
+ self::$logLevel ??= self::getLogLevel();
+
+ return self::$logLevel;
+ }
+
+ private static function getLogLevel(): int
+ {
+ $level = array_key_exists(self::OTEL_LOG_LEVEL, $_SERVER)
+ ? $_SERVER[self::OTEL_LOG_LEVEL]
+ : getenv(self::OTEL_LOG_LEVEL);
+ if (!$level) {
+ $level = ini_get(self::OTEL_LOG_LEVEL);
+ }
+ if (!$level) {
+ $level = self::DEFAULT_LEVEL;
+ }
+
+ return self::level($level);
+ }
+
+ public static function reset(): void
+ {
+ self::$logLevel = null;
+ self::$writer = null;
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php b/vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php
new file mode 100644
index 000000000..d0207e4b1
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior;
+
+use OpenTelemetry\API\Behavior\Internal\Logging;
+use Psr\Log\LogLevel;
+
+trait LogsMessagesTrait
+{
+ private static function shouldLog(string $level): bool
+ {
+ return Logging::level($level) >= Logging::logLevel();
+ }
+
+ private static function doLog(string $level, string $message, array $context): void
+ {
+ $writer = Logging::logWriter();
+ if (self::shouldLog($level)) {
+ $context['source'] = get_called_class();
+ $writer->write($level, $message, $context);
+ }
+ }
+
+ protected static function logDebug(string $message, array $context = []): void
+ {
+ self::doLog(LogLevel::DEBUG, $message, $context);
+ }
+
+ protected static function logInfo(string $message, array $context = []): void
+ {
+ self::doLog(LogLevel::INFO, $message, $context);
+ }
+
+ protected static function logNotice(string $message, array $context = []): void
+ {
+ self::doLog(LogLevel::NOTICE, $message, $context);
+ }
+
+ protected static function logWarning(string $message, array $context = []): void
+ {
+ self::doLog(LogLevel::WARNING, $message, $context);
+ }
+
+ protected static function logError(string $message, array $context = []): void
+ {
+ self::doLog(LogLevel::ERROR, $message, $context);
+ }
+}
diff --git a/vendor/open-telemetry/api/Globals.php b/vendor/open-telemetry/api/Globals.php
new file mode 100644
index 000000000..8f04b0b42
--- /dev/null
+++ b/vendor/open-telemetry/api/Globals.php
@@ -0,0 +1,121 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API;
+
+use function assert;
+use Closure;
+use const E_USER_WARNING;
+use OpenTelemetry\API\Instrumentation\Configurator;
+use OpenTelemetry\API\Instrumentation\ContextKeys;
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use function sprintf;
+use Throwable;
+use function trigger_error;
+
+/**
+ * Provides access to the globally configured instrumentation instances.
+ */
+final class Globals
+{
+ /** @var Closure[] */
+ private static array $initializers = [];
+ private static ?self $globals = null;
+
+ private TracerProviderInterface $tracerProvider;
+ private MeterProviderInterface $meterProvider;
+ private TextMapPropagatorInterface $propagator;
+ private LoggerProviderInterface $loggerProvider;
+
+ public function __construct(
+ TracerProviderInterface $tracerProvider,
+ MeterProviderInterface $meterProvider,
+ LoggerProviderInterface $loggerProvider,
+ TextMapPropagatorInterface $propagator
+ ) {
+ $this->tracerProvider = $tracerProvider;
+ $this->meterProvider = $meterProvider;
+ $this->loggerProvider = $loggerProvider;
+ $this->propagator = $propagator;
+ }
+
+ public static function tracerProvider(): TracerProviderInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::tracerProvider()) ?? self::globals()->tracerProvider;
+ }
+
+ public static function meterProvider(): MeterProviderInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::meterProvider()) ?? self::globals()->meterProvider;
+ }
+
+ public static function propagator(): TextMapPropagatorInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::propagator()) ?? self::globals()->propagator;
+ }
+
+ public static function loggerProvider(): LoggerProviderInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::loggerProvider()) ?? self::globals()->loggerProvider;
+ }
+
+ /**
+ * @param Closure(Configurator): Configurator $initializer
+ *
+ * @interal
+ * @psalm-internal OpenTelemetry
+ */
+ public static function registerInitializer(Closure $initializer): void
+ {
+ self::$initializers[] = $initializer;
+ }
+
+ /**
+ * @phan-suppress PhanTypeMismatchReturnNullable
+ */
+ private static function globals(): self
+ {
+ if (self::$globals !== null) {
+ return self::$globals;
+ }
+
+ $configurator = Configurator::createNoop();
+ $scope = $configurator->activate();
+
+ try {
+ foreach (self::$initializers as $initializer) {
+ try {
+ $configurator = $initializer($configurator);
+ } catch (Throwable $e) {
+ trigger_error(sprintf("Error during opentelemetry initialization: %s\n%s", $e->getMessage(), $e->getTraceAsString()), E_USER_WARNING);
+ }
+ }
+ } finally {
+ $scope->detach();
+ }
+
+ $context = $configurator->storeInContext();
+ $tracerProvider = $context->get(ContextKeys::tracerProvider());
+ $meterProvider = $context->get(ContextKeys::meterProvider());
+ $propagator = $context->get(ContextKeys::propagator());
+ $loggerProvider = $context->get(ContextKeys::loggerProvider());
+
+ assert(isset($tracerProvider, $meterProvider, $loggerProvider, $propagator));
+
+ return self::$globals = new self($tracerProvider, $meterProvider, $loggerProvider, $propagator);
+ }
+
+ /**
+ * @internal
+ */
+ public static function reset(): void
+ {
+ self::$globals = null;
+ self::$initializers = [];
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php b/vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php
new file mode 100644
index 000000000..5ffb3950d
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use ArrayAccess;
+use function assert;
+use function class_exists;
+use OpenTelemetry\API\Globals;
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use const PHP_VERSION_ID;
+
+/**
+ * Provides access to cached {@link TracerInterface} and {@link MeterInterface}
+ * instances.
+ *
+ * Autoinstrumentation should prefer using a {@link CachedInstrumentation}
+ * instance over repeatedly obtaining instrumentation instances from
+ * {@link Globals}.
+ */
+final class CachedInstrumentation
+{
+ private string $name;
+ private ?string $version;
+ private ?string $schemaUrl;
+ private iterable $attributes;
+ /** @var ArrayAccess<TracerProviderInterface, TracerInterface>|null */
+ private ?ArrayAccess $tracers;
+ /** @var ArrayAccess<MeterProviderInterface, MeterInterface>|null */
+ private ?ArrayAccess $meters;
+ /** @var ArrayAccess<LoggerProviderInterface, LoggerInterface>|null */
+ private ?ArrayAccess $loggers;
+
+ public function __construct(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = [])
+ {
+ $this->name = $name;
+ $this->version = $version;
+ $this->schemaUrl = $schemaUrl;
+ $this->attributes = $attributes;
+ $this->tracers = self::createWeakMap();
+ $this->meters = self::createWeakMap();
+ $this->loggers = self::createWeakMap();
+ }
+
+ private static function createWeakMap(): ?ArrayAccess
+ {
+ if (PHP_VERSION_ID < 80000) {
+ return null;
+ }
+
+ /** @phan-suppress-next-line PhanUndeclaredClassReference */
+ assert(class_exists(\WeakMap::class, false));
+ /** @phan-suppress-next-line PhanUndeclaredClassMethod */
+ $map = new \WeakMap();
+ assert($map instanceof ArrayAccess);
+
+ return $map;
+ }
+
+ public function tracer(): TracerInterface
+ {
+ $tracerProvider = Globals::tracerProvider();
+
+ if ($this->tracers === null) {
+ return $tracerProvider->getTracer($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ return $this->tracers[$tracerProvider] ??= $tracerProvider->getTracer($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ public function meter(): MeterInterface
+ {
+ $meterProvider = Globals::meterProvider();
+
+ if ($this->meters === null) {
+ return $meterProvider->getMeter($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ return $this->meters[$meterProvider] ??= $meterProvider->getMeter($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+ public function logger(): LoggerInterface
+ {
+ $loggerProvider = Globals::loggerProvider();
+
+ if ($this->loggers === null) {
+ return $loggerProvider->getLogger($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ return $this->loggers[$loggerProvider] ??= $loggerProvider->getLogger($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
new file mode 100644
index 000000000..bb5619c30
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+class ConfigurationResolver implements ConfigurationResolverInterface
+{
+ public function has(string $name): bool
+ {
+ return $this->getVariable($name) !== null;
+ }
+
+ public function getString(string $name): ?string
+ {
+ return $this->getVariable($name);
+ }
+
+ public function getBoolean(string $name): ?bool
+ {
+ $value = $this->getVariable($name);
+ if ($value === null) {
+ return null;
+ }
+
+ return ($value === 'true');
+ }
+
+ public function getInt(string $name): ?int
+ {
+ $value = $this->getVariable($name);
+ if ($value === null) {
+ return null;
+ }
+ if (filter_var($value, FILTER_VALIDATE_INT) === false) {
+ //log warning
+ return null;
+ }
+
+ return (int) $value;
+ }
+
+ public function getList(string $name): array
+ {
+ $value = $this->getVariable($name);
+ if ($value === null) {
+ return [];
+ }
+
+ return explode(',', $value);
+ }
+
+ private function getVariable(string $name): ?string
+ {
+ $value = $_SERVER[$name] ?? null;
+ if ($value !== false && !self::isEmpty($value)) {
+ assert(is_string($value));
+
+ return $value;
+ }
+ $value = getenv($name);
+ if ($value !== false && !self::isEmpty($value)) {
+ return $value;
+ }
+ $value = ini_get($name);
+ if ($value !== false && !self::isEmpty($value)) {
+ return $value;
+ }
+
+ return null;
+ }
+
+ private static function isEmpty($value): bool
+ {
+ return $value === false || $value === null || $value === '';
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php
new file mode 100644
index 000000000..79bd94047
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+interface ConfigurationResolverInterface
+{
+ public function has(string $name): bool;
+ public function getString(string $name): ?string;
+ public function getBoolean(string $name): ?bool;
+ public function getInt(string $name): ?int;
+ public function getList(string $name): array;
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/Configurator.php b/vendor/open-telemetry/api/Instrumentation/Configurator.php
new file mode 100644
index 000000000..71d301363
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/Configurator.php
@@ -0,0 +1,113 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Logs\NoopLoggerProvider;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeterProvider;
+use OpenTelemetry\API\Trace\NoopTracerProvider;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ImplicitContextKeyedInterface;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\Context\ScopeInterface;
+
+/**
+ * Configures the global (context scoped) instrumentation instances.
+ *
+ * @see Configurator::activate()
+ */
+final class Configurator implements ImplicitContextKeyedInterface
+{
+ private ?TracerProviderInterface $tracerProvider = null;
+ private ?MeterProviderInterface $meterProvider = null;
+ private ?TextMapPropagatorInterface $propagator = null;
+ private ?LoggerProviderInterface $loggerProvider = null;
+
+ private function __construct()
+ {
+ }
+
+ /**
+ * Creates a configurator that uses parent instances for not configured values.
+ */
+ public static function create(): Configurator
+ {
+ return new self();
+ }
+
+ /**
+ * Creates a configurator that uses noop instances for not configured values.
+ */
+ public static function createNoop(): Configurator
+ {
+ return self::create()
+ ->withTracerProvider(new NoopTracerProvider())
+ ->withMeterProvider(new NoopMeterProvider())
+ ->withPropagator(new NoopTextMapPropagator())
+ ->withLoggerProvider(new NoopLoggerProvider())
+ ;
+ }
+
+ public function activate(): ScopeInterface
+ {
+ return $this->storeInContext()->activate();
+ }
+
+ public function storeInContext(?ContextInterface $context = null): ContextInterface
+ {
+ $context ??= Context::getCurrent();
+
+ if ($this->tracerProvider !== null) {
+ $context = $context->with(ContextKeys::tracerProvider(), $this->tracerProvider);
+ }
+ if ($this->meterProvider !== null) {
+ $context = $context->with(ContextKeys::meterProvider(), $this->meterProvider);
+ }
+ if ($this->propagator !== null) {
+ $context = $context->with(ContextKeys::propagator(), $this->propagator);
+ }
+ if ($this->loggerProvider !== null) {
+ $context = $context->with(ContextKeys::loggerProvider(), $this->loggerProvider);
+ }
+
+ return $context;
+ }
+
+ public function withTracerProvider(?TracerProviderInterface $tracerProvider): Configurator
+ {
+ $self = clone $this;
+ $self->tracerProvider = $tracerProvider;
+
+ return $self;
+ }
+
+ public function withMeterProvider(?MeterProviderInterface $meterProvider): Configurator
+ {
+ $self = clone $this;
+ $self->meterProvider = $meterProvider;
+
+ return $self;
+ }
+
+ public function withPropagator(?TextMapPropagatorInterface $propagator): Configurator
+ {
+ $self = clone $this;
+ $self->propagator = $propagator;
+
+ return $self;
+ }
+
+ public function withLoggerProvider(?LoggerProviderInterface $loggerProvider): Configurator
+ {
+ $self = clone $this;
+ $self->loggerProvider = $loggerProvider;
+
+ return $self;
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/ContextKeys.php b/vendor/open-telemetry/api/Instrumentation/ContextKeys.php
new file mode 100644
index 000000000..ea1a66416
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/ContextKeys.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextKeyInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+
+/**
+ * @internal
+ */
+final class ContextKeys
+{
+ /**
+ * @return ContextKeyInterface<TracerProviderInterface>
+ */
+ public static function tracerProvider(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(TracerProviderInterface::class);
+ }
+
+ /**
+ * @return ContextKeyInterface<MeterProviderInterface>
+ */
+ public static function meterProvider(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(MeterProviderInterface::class);
+ }
+
+ /**
+ * @return ContextKeyInterface<TextMapPropagatorInterface>
+ */
+ public static function propagator(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(TextMapPropagatorInterface::class);
+ }
+
+ /**
+ * @return ContextKeyInterface<LoggerProviderInterface>
+ */
+ public static function loggerProvider(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(LoggerProviderInterface::class);
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php b/vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php
new file mode 100644
index 000000000..d67bc8d6d
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use Psr\Log\LoggerInterface;
+
+interface InstrumentationInterface
+{
+ public function getName(): string;
+
+ public function getVersion(): ?string;
+
+ public function getSchemaUrl(): ?string;
+
+ public function init(): bool;
+
+ public function activate(): bool;
+
+ public function setPropagator(TextMapPropagatorInterface $propagator): void;
+
+ public function getPropagator(): TextMapPropagatorInterface;
+
+ public function setTracerProvider(TracerProviderInterface $tracerProvider): void;
+
+ public function getTracerProvider(): TracerProviderInterface;
+
+ public function getTracer(): TracerInterface;
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): void;
+
+ public function getMeter(): MeterInterface;
+
+ public function setLogger(LoggerInterface $logger): void;
+
+ public function getLogger(): LoggerInterface;
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php b/vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php
new file mode 100644
index 000000000..1e695adb5
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php
@@ -0,0 +1,193 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeter;
+use OpenTelemetry\API\Trace\NoopTracer;
+use OpenTelemetry\API\Trace\NoopTracerProvider;
+use OpenTelemetry\API\Trace\TracerInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
+use RuntimeException;
+
+/**
+ This trait in conjunction with the InstrumentationInterface is meant as a base for instrumentations for the
+ OpenTelemetry API.
+ Instrumentations need to implement the abstract methods of this trait (besides any instrumentation specific code)
+
+ A very simplified instrumentation could look like this:
+
+class Instrumentation implements InstrumentationInterface
+{
+ use InstrumentationTrait;
+
+ public function getName(): string
+ {
+ return 'foo-instrumentation';
+ }
+
+ public function getVersion(): ?string
+ {
+ return '0.0.1';
+ }
+
+ public function getSchemaUrl(): ?string
+ {
+ return null;
+ }
+
+ public function init(): bool
+ {
+ // This is just an example. In a real-world scenario one should only create spans in reaction of things
+ // happening in the instrumented code, not just for the sake of it.
+ $span = $this->getTracer()->spanBuilder($this->getName())->startSpan();
+ // do stuff
+ $span->end();
+ }
+}
+
+An user of the instrumentation and API/SDK would the call:
+
+$instrumentation = new Instrumentation;
+$instrumentation->activate()
+
+to activate and use the instrumentation with the API/SDK.
+ **/
+
+trait InstrumentationTrait
+{
+ private TextMapPropagatorInterface $propagator;
+ private TracerProviderInterface $tracerProvider;
+ private TracerInterface $tracer;
+ private MeterInterface $meter;
+ private LoggerInterface $logger;
+
+ public function __construct()
+ {
+ $this->initDefaults();
+ }
+
+ /**
+ * The name of the instrumenting/instrumented library/package/project.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-scope
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-library
+ */
+ abstract public function getName(): string;
+
+ /**
+ * The version of the instrumenting/instrumented library/package/project.
+ * If unknown or a lookup is too expensive simply return NULL.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-scope
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-library
+ */
+ abstract public function getVersion(): ?string;
+
+ /**
+ * The version of the instrumenting/instrumented library/package/project.
+ * If unknown simply return NULL.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-scope
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-library
+ */
+ abstract public function getSchemaUrl(): ?string;
+
+ /**
+ * This method will be called from the API when the instrumentation has been activated (via activate()).
+ * Here you can put any bootstrapping code needed by the instrumentation.
+ * If not needed simply implement a method which returns TRUE.
+ */
+ abstract public function init(): bool;
+
+ /**
+ * This method registers and activates the instrumentation with the OpenTelemetry API/SDK and thus
+ * the instrumentation will be used to generate telemetry data.
+ */
+ public function activate(): bool
+ {
+ $this->validateImplementation();
+ // activate instrumentation with the API. not implemented yet.
+ return true;
+ }
+
+ public function setPropagator(TextMapPropagatorInterface $propagator): void
+ {
+ $this->propagator = $propagator;
+ }
+
+ public function getPropagator(): TextMapPropagatorInterface
+ {
+ return $this->propagator;
+ }
+
+ public function setTracerProvider(TracerProviderInterface $tracerProvider): void
+ {
+ $this->tracerProvider = $tracerProvider;
+ // @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/trace/api.md#get-a-tracer
+ $this->tracer = $tracerProvider->getTracer(
+ $this->getName(),
+ $this->getVersion(),
+ $this->getSchemaUrl(),
+ );
+ }
+
+ public function getTracerProvider(): TracerProviderInterface
+ {
+ return $this->tracerProvider;
+ }
+
+ public function getTracer(): TracerInterface
+ {
+ return $this->tracer;
+ }
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): void
+ {
+ // @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/metrics/api.md#get-a-meter
+ $this->meter = $meterProvider->getMeter(
+ $this->getName(),
+ $this->getVersion(),
+ );
+ }
+
+ public function getMeter(): MeterInterface
+ {
+ return $this->meter;
+ }
+
+ public function setLogger(LoggerInterface $logger): void
+ {
+ $this->logger = $logger;
+ }
+
+ public function getLogger(): LoggerInterface
+ {
+ return $this->logger;
+ }
+
+ private function validateImplementation(): void
+ {
+ if (!$this instanceof InstrumentationInterface) {
+ throw new RuntimeException(sprintf(
+ '"%s" is meant to implement "%s"',
+ InstrumentationTrait::class,
+ InstrumentationInterface::class
+ ));
+ }
+ }
+
+ private function initDefaults(): void
+ {
+ $this->propagator = new NoopTextMapPropagator();
+ $this->tracer = new NoopTracer();
+ $this->tracerProvider = new NoopTracerProvider();
+ /** @phan-suppress-next-line PhanAccessMethodInternal */
+ $this->meter = new NoopMeter();
+ $this->logger = new NullLogger();
+ }
+}
diff --git a/vendor/open-telemetry/api/LoggerHolder.php b/vendor/open-telemetry/api/LoggerHolder.php
new file mode 100644
index 000000000..99f916a23
--- /dev/null
+++ b/vendor/open-telemetry/api/LoggerHolder.php
@@ -0,0 +1,53 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API;
+
+use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
+
+final class LoggerHolder
+{
+ private static ?LoggerInterface $logger = null;
+
+ /**
+ * This constructor is a temporary solution to ease the setup of the logger with DI libraries
+ */
+ public function __construct(?LoggerInterface $logger = null)
+ {
+ self::$logger = $logger;
+ }
+
+ /**
+ * @suppress PhanTypeMismatchReturnNullable
+ * @internal
+ */
+ public static function get(): ?LoggerInterface
+ {
+ return self::$logger;
+ }
+
+ public static function set(?LoggerInterface $logger): void
+ {
+ self::$logger = $logger;
+ }
+
+ public static function isSet(): bool
+ {
+ return null !== self::$logger;
+ }
+
+ public static function unset(): void
+ {
+ self::$logger = null;
+ }
+
+ /**
+ * Disable psr-3 logging
+ */
+ public static function disable(): void
+ {
+ self::$logger = new NullLogger();
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/EventLogger.php b/vendor/open-telemetry/api/Logs/EventLogger.php
new file mode 100644
index 000000000..68deb865c
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/EventLogger.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+class EventLogger implements EventLoggerInterface
+{
+ private LoggerInterface $logger;
+ private string $domain;
+
+ public function __construct(LoggerInterface $logger, string $domain)
+ {
+ $this->logger = $logger;
+ $this->domain = $domain;
+ }
+
+ public function logEvent(string $eventName, LogRecord $logRecord): void
+ {
+ $logRecord->setAttributes([
+ 'event.name' => $eventName,
+ 'event.domain' => $this->domain,
+ ]);
+ $this->logger->emit($logRecord);
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/EventLoggerInterface.php b/vendor/open-telemetry/api/Logs/EventLoggerInterface.php
new file mode 100644
index 000000000..a2096b9b7
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/EventLoggerInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md#events-api-interface
+ */
+interface EventLoggerInterface
+{
+ public function logEvent(string $eventName, LogRecord $logRecord): void;
+}
diff --git a/vendor/open-telemetry/api/Logs/LogRecord.php b/vendor/open-telemetry/api/Logs/LogRecord.php
new file mode 100644
index 000000000..6833c71f9
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/LogRecord.php
@@ -0,0 +1,108 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+use OpenTelemetry\Context\ContextInterface;
+
+class LogRecord
+{
+ public const NANOS_PER_SECOND = 1_000_000_000;
+
+ protected ?int $timestamp = null;
+ protected ?int $observedTimestamp = null;
+ protected ?ContextInterface $context = null;
+ protected int $severityNumber = 0;
+ protected ?string $severityText = null;
+ protected $body = null;
+ protected array $attributes = [];
+
+ /**
+ * @param mixed $body
+ */
+ public function __construct($body = null)
+ {
+ $this->body = $body;
+ }
+
+ /**
+ * @param int $timestamp Timestamp, in nanoseconds since the unix epoch, when the event occurred.
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-timestamp
+ */
+ public function setTimestamp(int $timestamp): self
+ {
+ $this->timestamp = $timestamp;
+
+ return $this;
+ }
+
+ public function setContext(?ContextInterface $context = null): self
+ {
+ $this->context = $context;
+
+ return $this;
+ }
+
+ /**
+ * @param int $severityNumber Severity number
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-severitynumber
+ */
+ public function setSeverityNumber(int $severityNumber): self
+ {
+ $this->severityNumber = $severityNumber;
+
+ return $this;
+ }
+
+ /**
+ * @param string $severityText Severity text, also known as log level
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-severitynumber
+ */
+ public function setSeverityText(string $severityText): self
+ {
+ $this->severityText = $severityText;
+
+ return $this;
+ }
+
+ /**
+ * @param iterable $attributes Additional information about the specific event occurrence.
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-attributes
+ */
+ public function setAttributes(iterable $attributes): self
+ {
+ foreach ($attributes as $name => $value) {
+ $this->setAttribute($name, $value);
+ }
+
+ return $this;
+ }
+
+ public function setAttribute(string $name, $value): self
+ {
+ $this->attributes[$name] = $value;
+
+ return $this;
+ }
+
+ /**
+ * @param mixed $body The log record body
+ */
+ public function setBody($body = null): self
+ {
+ $this->body = $body;
+
+ return $this;
+ }
+
+ /**
+ * @param int|null $observedTimestamp Time, in nanoseconds since the unix epoch, when the event was observed by the collection system.
+ */
+ public function setObservedTimestamp(int $observedTimestamp = null): self
+ {
+ $this->observedTimestamp = $observedTimestamp;
+
+ return $this;
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/LoggerInterface.php b/vendor/open-telemetry/api/Logs/LoggerInterface.php
new file mode 100644
index 000000000..89477c8d2
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/LoggerInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+interface LoggerInterface
+{
+ public function emit(LogRecord $logRecord): void;
+}
diff --git a/vendor/open-telemetry/api/Logs/LoggerProviderInterface.php b/vendor/open-telemetry/api/Logs/LoggerProviderInterface.php
new file mode 100644
index 000000000..e60353de2
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/LoggerProviderInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md#get-a-logger
+ */
+interface LoggerProviderInterface
+{
+ public function getLogger(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = [] //instrumentation scope attributes
+ ): LoggerInterface;
+}
diff --git a/vendor/open-telemetry/api/Logs/Map/Psr3.php b/vendor/open-telemetry/api/Logs/Map/Psr3.php
new file mode 100644
index 000000000..8fd85fad0
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/Map/Psr3.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs\Map;
+
+use Psr\Log\LogLevel;
+
+class Psr3
+{
+ /**
+ * Maps PSR-3 severity level (string) to the appropriate opentelemetry severity number
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model-appendix.md#appendix-b-severitynumber-example-mappings
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-severitynumber
+ */
+ public static function severityNumber(string $level): int
+ {
+ switch (strtolower($level)) {
+ case LogLevel::DEBUG:
+ return 5;
+ case LogLevel::INFO:
+ return 9;
+ case LogLevel::NOTICE:
+ return 10;
+ case LogLevel::WARNING:
+ return 13;
+ case LogLevel::ERROR:
+ return 17;
+ case LogLevel::CRITICAL:
+ return 18;
+ case LogLevel::ALERT:
+ return 19;
+ case LogLevel::EMERGENCY:
+ return 21;
+ default:
+ return 0;
+ }
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/NoopLogger.php b/vendor/open-telemetry/api/Logs/NoopLogger.php
new file mode 100644
index 000000000..faacd5e10
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/NoopLogger.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+use Psr\Log\LoggerTrait;
+
+class NoopLogger implements LoggerInterface
+{
+ use LoggerTrait;
+
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function emit(LogRecord $logRecord): void
+ {
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function log($level, $message, array $context = []): void
+ {
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/NoopLoggerProvider.php b/vendor/open-telemetry/api/Logs/NoopLoggerProvider.php
new file mode 100644
index 000000000..8b00b6637
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/NoopLoggerProvider.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+class NoopLoggerProvider implements LoggerProviderInterface
+{
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): LoggerInterface
+ {
+ return NoopLogger::getInstance();
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/README.md b/vendor/open-telemetry/api/Logs/README.md
new file mode 100644
index 000000000..d0bdb923e
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/README.md
@@ -0,0 +1,19 @@
+# Logs API
+
+This `Logger` API is not designed to be used by application developers, but rather by library developers for the purpose
+of integrating existing logging libraries with OpenTelemetry.
+
+## Logging from 3rd party loggers
+
+3rd party loggers should log to OpenTelemetry in accordance with the
+[logs bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md)
+specification.
+
+This means that a "log appender" in the 3rd party logging library (sometimes known as a "handler") should:
+- accept an `OpenTelemetry\API\Logs\LoggerProviderInterface`, or obtain a globally registered one from `OpenTelemetry\API\Instrumentation\Globals`
+- obtain a `Logger` from the logger provider (optionally adding any resources that should be associated with logs emitted)
+- convert logs from its own log format into OpenTelemetry's `LogRecord` format
+- send the logs to OpenTelemetry via `Logger::logRecord()`
+
+See [monolog-otel-integration](/examples/logs/features/monolog-otel-integration.php) for an example.
+
diff --git a/vendor/open-telemetry/api/Metrics/CounterInterface.php b/vendor/open-telemetry/api/Metrics/CounterInterface.php
new file mode 100644
index 000000000..f0da706e1
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/CounterInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+
+interface CounterInterface
+{
+
+ /**
+ * @param float|int $amount non-negative amount to increment by
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ * @param ContextInterface|false|null $context execution context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#add
+ */
+ public function add($amount, iterable $attributes = [], $context = null): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/HistogramInterface.php b/vendor/open-telemetry/api/Metrics/HistogramInterface.php
new file mode 100644
index 000000000..22ddd1f3c
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/HistogramInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+
+interface HistogramInterface
+{
+
+ /**
+ * @param float|int $amount non-negative amount to record
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ * @param ContextInterface|false|null $context execution context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#record
+ */
+ public function record($amount, iterable $attributes = [], $context = null): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/MeterInterface.php b/vendor/open-telemetry/api/Metrics/MeterInterface.php
new file mode 100644
index 000000000..6e06d9085
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/MeterInterface.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface MeterInterface
+{
+
+ /**
+ * Creates a `Counter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @return CounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#counter-creation
+ */
+ public function createCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null
+ ): CounterInterface;
+
+ /**
+ * Creates an `ObservableCounter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @param callable ...$callbacks responsible for reporting measurements
+ * @return ObservableCounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-counter-creation
+ */
+ public function createObservableCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null,
+ callable ...$callbacks
+ ): ObservableCounterInterface;
+
+ /**
+ * Creates a `Histogram`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @return HistogramInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#histogram-creation
+ */
+ public function createHistogram(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null
+ ): HistogramInterface;
+
+ /**
+ * Creates an `ObservableGauge`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @param callable ...$callbacks responsible for reporting measurements
+ * @return ObservableGaugeInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-gauge-creation
+ */
+ public function createObservableGauge(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null,
+ callable ...$callbacks
+ ): ObservableGaugeInterface;
+
+ /**
+ * Creates an `UpDownCounter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @return UpDownCounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#updowncounter-creation
+ */
+ public function createUpDownCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null
+ ): UpDownCounterInterface;
+
+ /**
+ * Creates an `ObservableUpDownCounter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @param callable ...$callbacks responsible for reporting measurements
+ * @return ObservableUpDownCounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-updowncounter-creation
+ */
+ public function createObservableUpDownCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null,
+ callable ...$callbacks
+ ): ObservableUpDownCounterInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php b/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php
new file mode 100644
index 000000000..f8fa07a2e
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface MeterProviderInterface
+{
+
+ /**
+ * Returns a `Meter` for the given instrumentation scope.
+ *
+ * @param string $name name of the instrumentation scope
+ * @param string|null $version version of the instrumentation scope
+ * @param string|null $schemaUrl schema url to record in the emitted telemetry
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * instrumentation scope attributes
+ * @return MeterInterface meter instance for the instrumentation scope
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#get-a-meter
+ */
+ public function getMeter(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): MeterInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php
new file mode 100644
index 000000000..d47fc2166
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\CounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopCounter implements CounterInterface
+{
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php b/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php
new file mode 100644
index 000000000..79f0e60ce
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\HistogramInterface;
+
+/**
+ * @internal
+ */
+final class NoopHistogram implements HistogramInterface
+{
+ public function record($amount, iterable $attributes = [], $context = null): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php
new file mode 100644
index 000000000..31e3bd35c
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\CounterInterface;
+use OpenTelemetry\API\Metrics\HistogramInterface;
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+
+final class NoopMeter implements MeterInterface
+{
+ public function createCounter(string $name, ?string $unit = null, ?string $description = null): CounterInterface
+ {
+ return new NoopCounter();
+ }
+
+ public function createObservableCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableCounterInterface
+ {
+ return new NoopObservableCounter();
+ }
+
+ public function createHistogram(string $name, ?string $unit = null, ?string $description = null): HistogramInterface
+ {
+ return new NoopHistogram();
+ }
+
+ public function createObservableGauge(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableGaugeInterface
+ {
+ return new NoopObservableGauge();
+ }
+
+ public function createUpDownCounter(string $name, ?string $unit = null, ?string $description = null): UpDownCounterInterface
+ {
+ return new NoopUpDownCounter();
+ }
+
+ public function createObservableUpDownCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableUpDownCounterInterface
+ {
+ return new NoopObservableUpDownCounter();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php b/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php
new file mode 100644
index 000000000..b4b5810eb
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+
+final class NoopMeterProvider implements MeterProviderInterface
+{
+ public function getMeter(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): MeterInterface {
+ return new NoopMeter();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php
new file mode 100644
index 000000000..c933bd506
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableCallback implements ObservableCallbackInterface
+{
+ public function detach(): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php
new file mode 100644
index 000000000..41e363201
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableCounter implements ObservableCounterInterface
+{
+ public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface
+ {
+ return new NoopObservableCallback();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php
new file mode 100644
index 000000000..987a530c8
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableGauge implements ObservableGaugeInterface
+{
+ public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface
+ {
+ return new NoopObservableCallback();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php
new file mode 100644
index 000000000..65a2bb830
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableUpDownCounter implements ObservableUpDownCounterInterface
+{
+ public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface
+ {
+ return new NoopObservableCallback();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php
new file mode 100644
index 000000000..e26140b7c
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopUpDownCounter implements UpDownCounterInterface
+{
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php b/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php
new file mode 100644
index 000000000..a20e59666
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php
@@ -0,0 +1,56 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+/**
+ * An observed callback.
+ *
+ * Callbacks that are bound to an object are automatically detached when the
+ * `ObservableCallbackInterface` and the bound object are out of scope.
+ * This means that the `ObservableCallbackInterface` can be ignored if the
+ * observed callback should be bound to the lifetime of the object.
+ * ```php
+ * class Example {
+ * function __construct(MeterProviderInterface $meterProvider) {
+ * $meterProvider->getMeter('example')
+ * ->createObservableGauge('random')
+ * ->observe(fn(ObserverInterface $observer)
+ * => $observer->observe(rand(0, 10)));
+ * }
+ * }
+ * ```
+ * Keeping a reference to the `ObservableCallbackInterface` within the bound
+ * object to gain a more fine-grained control over the life-time of the callback
+ * does not prevent garbage collection (but might require cycle collection).
+ *
+ * Unbound (static) callbacks must be detached manually using
+ * {@link ObservableCallbackInterface::detach()}.
+ * ```php
+ * class Example {
+ * private ObservableCallbackInterface $gauge;
+ * function __construct(MeterProviderInterface $meterProvider) {
+ * $this->gauge = $meterProvider->getMeter('example')
+ * ->createObservableGauge('random')
+ * ->observe(static fn(ObserverInterface $observer)
+ * => $observer->observe(rand(0, 10)));
+ * }
+ * function __destruct() {
+ * $this->gauge->detach();
+ * }
+ * }
+ * ```
+ *
+ * @see ObservableCounterInterface::observe()
+ * @see ObservableGaugeInterface::observe()
+ * @see ObservableUpDownCounterInterface::observe()
+ */
+interface ObservableCallbackInterface
+{
+
+ /**
+ * Detaches the associated callback from the instrument.
+ */
+ public function detach(): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php b/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php
new file mode 100644
index 000000000..feb1ed439
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObservableCounterInterface
+{
+
+ /**
+ * @param callable(ObserverInterface): void $callback function responsible for
+ * reporting the measurements (as absolute values)
+ * @return ObservableCallbackInterface token to detach callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php b/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php
new file mode 100644
index 000000000..afe59a777
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObservableGaugeInterface
+{
+
+ /**
+ * @param callable(ObserverInterface): void $callback function responsible for
+ * reporting the measurements
+ * @return ObservableCallbackInterface token to detach callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php b/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php
new file mode 100644
index 000000000..79548dec6
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObservableUpDownCounterInterface
+{
+
+ /**
+ * @param callable(ObserverInterface): void $callback function responsible for
+ * reporting the measurements (as absolute values)
+ * @return ObservableCallbackInterface token to detach callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObserverInterface.php b/vendor/open-telemetry/api/Metrics/ObserverInterface.php
new file mode 100644
index 000000000..36e0ea791
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObserverInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObserverInterface
+{
+
+ /**
+ * Records the given absolute datapoint.
+ *
+ * @param float|int $amount observed amount
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ */
+ public function observe($amount, iterable $attributes = []): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php b/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php
new file mode 100644
index 000000000..f1f808fdb
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+
+interface UpDownCounterInterface
+{
+
+ /**
+ * @param float|int $amount amount to increment / decrement by
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ * @param ContextInterface|false|null $context execution context
+ */
+ public function add($amount, iterable $attributes = [], $context = null): void;
+}
diff --git a/vendor/open-telemetry/api/README.md b/vendor/open-telemetry/api/README.md
new file mode 100644
index 000000000..c2cbd1bf1
--- /dev/null
+++ b/vendor/open-telemetry/api/README.md
@@ -0,0 +1,14 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/api/releases)
+[![Source](https://img.shields.io/badge/source-api-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/API)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:api-blue)](https://github.com/opentelemetry-php/api)
+[![Latest Version](http://poser.pugx.org/open-telemetry/api/v/unstable)](https://packagist.org/packages/open-telemetry/api/)
+[![Stable](http://poser.pugx.org/open-telemetry/api/v/stable)](https://packagist.org/packages/open-telemetry/api/)
+
+# OpenTelemetry API
+
+Documentation: https://opentelemetry.io/docs/instrumentation/php
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/api/Signals.php b/vendor/open-telemetry/api/Signals.php
new file mode 100644
index 000000000..95582aaa2
--- /dev/null
+++ b/vendor/open-telemetry/api/Signals.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API;
+
+interface Signals
+{
+ /** @var string */
+ public const TRACE = 'trace';
+ /** @var string */
+ public const METRICS = 'metrics';
+ /** @var string */
+ public const LOGS = 'logs';
+ /** @var string[] */
+ public const SIGNALS = [
+ self::TRACE,
+ self::METRICS,
+ self::LOGS,
+ ];
+}
diff --git a/vendor/open-telemetry/api/Trace/NonRecordingSpan.php b/vendor/open-telemetry/api/Trace/NonRecordingSpan.php
new file mode 100644
index 000000000..67d74d39b
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NonRecordingSpan.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use Throwable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#wrapping-a-spancontext-in-a-span
+ *
+ * @psalm-internal OpenTelemetry
+ */
+final class NonRecordingSpan extends Span
+{
+ private SpanContextInterface $context;
+
+ public function __construct(
+ SpanContextInterface $context
+ ) {
+ $this->context = $context;
+ }
+
+ /** @inheritDoc */
+ public function getContext(): SpanContextInterface
+ {
+ return $this->context;
+ }
+
+ /** @inheritDoc */
+ public function isRecording(): bool
+ {
+ return false;
+ }
+
+ /** @inheritDoc */
+ public function setAttribute(string $key, $value): SpanInterface
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setAttributes(iterable $attributes): SpanInterface
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function addEvent(string $name, iterable $attributes = [], int $timestamp = null): SpanInterface
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function recordException(Throwable $exception, iterable $attributes = []): SpanInterface
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function updateName(string $name): SpanInterface
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setStatus(string $code, string $description = null): SpanInterface
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function end(int $endEpochNanos = null): void
+ {
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php b/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php
new file mode 100644
index 000000000..6f971e525
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php
@@ -0,0 +1,65 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ContextStorageInterface;
+
+final class NoopSpanBuilder implements SpanBuilderInterface
+{
+ private ContextStorageInterface $contextStorage;
+
+ /** @var ContextInterface|false|null */
+ private $parentContext = null;
+
+ public function __construct(ContextStorageInterface $contextStorage)
+ {
+ $this->contextStorage = $contextStorage;
+ }
+
+ public function setParent($context): SpanBuilderInterface
+ {
+ $this->parentContext = $context;
+
+ return $this;
+ }
+
+ public function addLink(SpanContextInterface $context, iterable $attributes = []): SpanBuilderInterface
+ {
+ return $this;
+ }
+
+ public function setAttribute(string $key, $value): SpanBuilderInterface
+ {
+ return $this;
+ }
+
+ public function setAttributes(iterable $attributes): SpanBuilderInterface
+ {
+ return $this;
+ }
+
+ public function setStartTimestamp(int $timestampNanos): SpanBuilderInterface
+ {
+ return $this;
+ }
+
+ public function setSpanKind(int $spanKind): SpanBuilderInterface
+ {
+ return $this;
+ }
+
+ public function startSpan(): SpanInterface
+ {
+ $parentContext = Context::resolve($this->parentContext, $this->contextStorage);
+ $span = Span::fromContext($parentContext);
+ if ($span->isRecording()) {
+ $span = Span::wrap($span->getContext());
+ }
+
+ return $span;
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/NoopTracer.php b/vendor/open-telemetry/api/Trace/NoopTracer.php
new file mode 100644
index 000000000..bc50248bd
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NoopTracer.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\Context;
+
+final class NoopTracer implements TracerInterface
+{
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ public function spanBuilder(string $spanName): SpanBuilderInterface
+ {
+ return new NoopSpanBuilder(Context::storage());
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/NoopTracerProvider.php b/vendor/open-telemetry/api/Trace/NoopTracerProvider.php
new file mode 100644
index 000000000..e186a6fd9
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NoopTracerProvider.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+class NoopTracerProvider implements TracerProviderInterface
+{
+ public function getTracer(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): TracerInterface {
+ return NoopTracer::getInstance();
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php b/vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php
new file mode 100644
index 000000000..b70a15647
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php
@@ -0,0 +1,157 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace\Propagation;
+
+use function count;
+use function explode;
+use function hexdec;
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\API\Trace\SpanContext;
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\API\Trace\SpanContextValidator;
+use OpenTelemetry\API\Trace\TraceFlags;
+use OpenTelemetry\API\Trace\TraceState;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\Propagation\ArrayAccessGetterSetter;
+use OpenTelemetry\Context\Propagation\PropagationGetterInterface;
+use OpenTelemetry\Context\Propagation\PropagationSetterInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+
+/**
+ * TraceContext is a propagator that supports the W3C Trace Context format
+ * (https://www.w3.org/TR/trace-context/)
+ *
+ * This propagator will propagate the traceparent and tracestate headers to
+ * guarantee traces are not broken. It is up to the users of this propagator
+ * to choose if they want to participate in a trace by modifying the
+ * traceparent header and relevant parts of the tracestate header containing
+ * their proprietary information.
+ */
+final class TraceContextPropagator implements TextMapPropagatorInterface
+{
+ public const TRACEPARENT = 'traceparent';
+ public const TRACESTATE = 'tracestate';
+ private const VERSION = '00'; // Currently, only '00' is supported
+
+ public const FIELDS = [
+ self::TRACEPARENT,
+ self::TRACESTATE,
+ ];
+
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /** {@inheritdoc} */
+ public function fields(): array
+ {
+ return self::FIELDS;
+ }
+
+ /** {@inheritdoc} */
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
+ {
+ $setter ??= ArrayAccessGetterSetter::getInstance();
+ $context ??= Context::getCurrent();
+ $spanContext = Span::fromContext($context)->getContext();
+
+ if (!$spanContext->isValid()) {
+ return;
+ }
+
+ // Build and inject the traceparent header
+ $traceparent = self::VERSION . '-' . $spanContext->getTraceId() . '-' . $spanContext->getSpanId() . '-' . ($spanContext->isSampled() ? '01' : '00');
+ $setter->set($carrier, self::TRACEPARENT, $traceparent);
+
+ // Build and inject the tracestate header
+ // Spec says to avoid sending empty tracestate headers
+ if (($tracestate = (string) $spanContext->getTraceState()) !== '') {
+ $setter->set($carrier, self::TRACESTATE, $tracestate);
+ }
+ }
+
+ /** {@inheritdoc} */
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
+ {
+ $getter ??= ArrayAccessGetterSetter::getInstance();
+ $context ??= Context::getCurrent();
+
+ $spanContext = self::extractImpl($carrier, $getter);
+ if (!$spanContext->isValid()) {
+ return $context;
+ }
+
+ return $context->withContextValue(Span::wrap($spanContext));
+ }
+
+ private static function extractImpl($carrier, PropagationGetterInterface $getter): SpanContextInterface
+ {
+ $traceparent = $getter->get($carrier, self::TRACEPARENT);
+ if ($traceparent === null) {
+ return SpanContext::getInvalid();
+ }
+
+ // traceParent = {version}-{trace-id}-{parent-id}-{trace-flags}
+ $pieces = explode('-', $traceparent);
+
+ // If the header does not have at least 4 pieces, it is invalid -- restart the trace.
+ if (count($pieces) < 4) {
+ return SpanContext::getInvalid();
+ }
+
+ [$version, $traceId, $spanId, $traceFlags] = $pieces;
+
+ /**
+ * Return invalid if:
+ * - Version is invalid (not 2 char hex or 'ff')
+ * - Trace version, trace ID, span ID or trace flag are invalid
+ */
+ if (!TraceContextValidator::isValidTraceVersion($version)
+ || !SpanContextValidator::isValidTraceId($traceId)
+ || !SpanContextValidator::isValidSpanId($spanId)
+ || !TraceContextValidator::isValidTraceFlag($traceFlags)
+ ) {
+ return SpanContext::getInvalid();
+ }
+
+ // Return invalid if the trace version is not a future version but still has > 4 pieces.
+ $versionIsFuture = hexdec($version) > hexdec(self::VERSION);
+ if (count($pieces) > 4 && !$versionIsFuture) {
+ return SpanContext::getInvalid();
+ }
+
+ // Only the sampled flag is extracted from the traceFlags (00000001)
+ $convertedTraceFlags = hexdec($traceFlags);
+ $isSampled = ($convertedTraceFlags & TraceFlags::SAMPLED) === TraceFlags::SAMPLED;
+
+ // Tracestate = 'Vendor1=Value1,...,VendorN=ValueN'
+ $rawTracestate = $getter->get($carrier, self::TRACESTATE);
+ if ($rawTracestate !== null) {
+ $tracestate = new TraceState($rawTracestate);
+
+ return SpanContext::createFromRemoteParent(
+ $traceId,
+ $spanId,
+ $isSampled ? TraceFlags::SAMPLED : TraceFlags::DEFAULT,
+ $tracestate
+ );
+ }
+
+ // Only traceparent header is extracted. No tracestate.
+ return SpanContext::createFromRemoteParent(
+ $traceId,
+ $spanId,
+ $isSampled ? TraceFlags::SAMPLED : TraceFlags::DEFAULT
+ );
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php b/vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php
new file mode 100644
index 000000000..5fb3f12c7
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace\Propagation;
+
+use function strlen;
+
+class TraceContextValidator
+{
+ public const TRACE_FLAG_LENGTH = 2;
+ public const TRACE_VERSION_REGEX = '/^(?!ff)[\da-f]{2}$/';
+
+ /**
+ * @param string $traceVersion
+ * @return bool Returns a value that indicates whether a trace version is valid.
+ */
+ public static function isValidTraceVersion(string $traceVersion): bool
+ {
+ return 1 === preg_match(self::TRACE_VERSION_REGEX, $traceVersion);
+ }
+
+ /**
+ * @return bool Returns a value that indicates whether trace flag is valid
+ * TraceFlags must be exactly 1 bytes (1 char) representing a bit field
+ */
+ public static function isValidTraceFlag(string $traceFlag): bool
+ {
+ return ctype_xdigit($traceFlag) && strlen($traceFlag) === self::TRACE_FLAG_LENGTH;
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/Span.php b/vendor/open-telemetry/api/Trace/Span.php
new file mode 100644
index 000000000..88360e6cd
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/Span.php
@@ -0,0 +1,59 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ContextKeys;
+use OpenTelemetry\Context\ScopeInterface;
+
+abstract class Span implements SpanInterface
+{
+ private static ?self $invalidSpan = null;
+
+ /** @inheritDoc */
+ final public static function fromContext(ContextInterface $context): SpanInterface
+ {
+ return $context->get(ContextKeys::span()) ?? self::getInvalid();
+ }
+
+ /** @inheritDoc */
+ final public static function getCurrent(): SpanInterface
+ {
+ return self::fromContext(Context::getCurrent());
+ }
+
+ /** @inheritDoc */
+ final public static function getInvalid(): SpanInterface
+ {
+ if (null === self::$invalidSpan) {
+ self::$invalidSpan = new NonRecordingSpan(SpanContext::getInvalid());
+ }
+
+ return self::$invalidSpan;
+ }
+
+ /** @inheritDoc */
+ final public static function wrap(SpanContextInterface $spanContext): SpanInterface
+ {
+ if (!$spanContext->isValid()) {
+ return self::getInvalid();
+ }
+
+ return new NonRecordingSpan($spanContext);
+ }
+
+ /** @inheritDoc */
+ final public function activate(): ScopeInterface
+ {
+ return Context::getCurrent()->withContextValue($this)->activate();
+ }
+
+ /** @inheritDoc */
+ final public function storeInContext(ContextInterface $context): ContextInterface
+ {
+ return $context->with(ContextKeys::span(), $this);
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php b/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php
new file mode 100644
index 000000000..52070933a
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php
@@ -0,0 +1,51 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+
+/**
+ * Obtained from a {@see TracerInterface} and used to construct a {@see SpanInterface}.
+ */
+interface SpanBuilderInterface
+{
+ /**
+ * Sets the parent `Context`.
+ *
+ * @param ContextInterface|false|null $context the parent context, null to use the
+ * current context, false to set no parent
+ * @return SpanBuilderInterface this span builder
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#span-creation
+ */
+ public function setParent($context): SpanBuilderInterface;
+
+ public function addLink(SpanContextInterface $context, iterable $attributes = []): SpanBuilderInterface;
+ public function setAttribute(string $key, $value): SpanBuilderInterface;
+ public function setAttributes(iterable $attributes): SpanBuilderInterface;
+
+ /**
+ * Sets an explicit start timestamp for the newly created {@see SpanInterface}.
+ * The provided *$timestamp* is assumed to be in nanoseconds.
+ *
+ * Defaults to the timestamp when {@see SpanBuilderInterface::startSpan} was called if not explicitly set.
+ */
+ public function setStartTimestamp(int $timestampNanos): SpanBuilderInterface;
+
+ /**
+ * @psalm-param SpanKind::KIND_* $spanKind
+ */
+ public function setSpanKind(int $spanKind): SpanBuilderInterface;
+
+ /**
+ * Starts and returns a new {@see SpanInterface}.
+ *
+ * The user _MUST_ manually end the span by calling {@see SpanInterface::end}.
+ *
+ * This method does _NOT_ automatically install the span into the current context.
+ * The user is responsible for calling {@see SpanInterface::activate} when they wish to do so.
+ */
+ public function startSpan(): SpanInterface;
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanContext.php b/vendor/open-telemetry/api/Trace/SpanContext.php
new file mode 100644
index 000000000..7da7c0701
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanContext.php
@@ -0,0 +1,127 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use function hex2bin;
+
+final class SpanContext implements SpanContextInterface
+{
+ private static ?SpanContextInterface $invalidContext = null;
+
+ /**
+ * @see https://www.w3.org/TR/trace-context/#trace-flags
+ * @see https://www.w3.org/TR/trace-context/#sampled-flag
+ */
+ private bool $isSampled;
+
+ private string $traceId;
+ private string $spanId;
+ private ?TraceStateInterface $traceState;
+ private bool $isValid = true;
+ private bool $isRemote;
+ private int $traceFlags;
+
+ private function __construct(
+ string $traceId,
+ string $spanId,
+ int $traceFlags,
+ bool $isRemote,
+ TraceStateInterface $traceState = null
+ ) {
+ // TraceId must be exactly 16 bytes (32 chars) and at least one non-zero byte
+ // SpanId must be exactly 8 bytes (16 chars) and at least one non-zero byte
+ if (!SpanContextValidator::isValidTraceId($traceId) || !SpanContextValidator::isValidSpanId($spanId)) {
+ $traceId = SpanContextValidator::INVALID_TRACE;
+ $spanId = SpanContextValidator::INVALID_SPAN;
+ $this->isValid=false;
+ }
+
+ $this->traceId = $traceId;
+ $this->spanId = $spanId;
+ $this->traceState = $traceState;
+ $this->isRemote = $isRemote;
+ $this->isSampled = ($traceFlags & TraceFlags::SAMPLED) === TraceFlags::SAMPLED;
+ $this->traceFlags = $traceFlags;
+ }
+
+ public function getTraceId(): string
+ {
+ return $this->traceId;
+ }
+
+ public function getTraceIdBinary(): string
+ {
+ return hex2bin($this->traceId);
+ }
+
+ public function getSpanId(): string
+ {
+ return $this->spanId;
+ }
+
+ public function getSpanIdBinary(): string
+ {
+ return hex2bin($this->spanId);
+ }
+
+ public function getTraceState(): ?TraceStateInterface
+ {
+ return $this->traceState;
+ }
+
+ public function isSampled(): bool
+ {
+ return $this->isSampled;
+ }
+
+ public function isValid(): bool
+ {
+ return $this->isValid;
+ }
+
+ public function isRemote(): bool
+ {
+ return $this->isRemote;
+ }
+
+ public function getTraceFlags(): int
+ {
+ return $this->traceFlags;
+ }
+
+ /** @inheritDoc */
+ public static function createFromRemoteParent(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface
+ {
+ return new self(
+ $traceId,
+ $spanId,
+ $traceFlags,
+ true,
+ $traceState,
+ );
+ }
+
+ /** @inheritDoc */
+ public static function create(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface
+ {
+ return new self(
+ $traceId,
+ $spanId,
+ $traceFlags,
+ false,
+ $traceState,
+ );
+ }
+
+ /** @inheritDoc */
+ public static function getInvalid(): SpanContextInterface
+ {
+ if (null === self::$invalidContext) {
+ self::$invalidContext = self::create(SpanContextValidator::INVALID_TRACE, SpanContextValidator::INVALID_SPAN, 0);
+ }
+
+ return self::$invalidContext;
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanContextInterface.php b/vendor/open-telemetry/api/Trace/SpanContextInterface.php
new file mode 100644
index 000000000..d15bc5987
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanContextInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#spancontext
+ */
+interface SpanContextInterface
+{
+ public static function createFromRemoteParent(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface;
+ public static function getInvalid(): SpanContextInterface;
+ public static function create(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface;
+
+ /** @psalm-mutation-free */
+ public function getTraceId(): string;
+ public function getTraceIdBinary(): string;
+
+ /** @psalm-mutation-free */
+ public function getSpanId(): string;
+ public function getSpanIdBinary(): string;
+ public function getTraceFlags(): int;
+ public function getTraceState(): ?TraceStateInterface;
+ public function isValid(): bool;
+ public function isRemote(): bool;
+ public function isSampled(): bool;
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanContextValidator.php b/vendor/open-telemetry/api/Trace/SpanContextValidator.php
new file mode 100644
index 000000000..09b39f6d8
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanContextValidator.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use function strlen;
+use function strtolower;
+
+class SpanContextValidator
+{
+ public const VALID_SPAN = '/^[0-9a-f]{16}$/';
+ public const VALID_TRACE = '/^[0-9a-f]{32}$/';
+ public const INVALID_SPAN = '0000000000000000';
+ public const INVALID_TRACE = '00000000000000000000000000000000';
+ public const SPAN_LENGTH = 16;
+ public const TRACE_LENGTH = 32;
+ public const SPAN_LENGTH_BYTES = 8;
+
+ /**
+ * @return bool Returns a value that indicates whether a trace id is valid
+ */
+ public static function isValidTraceId(string $traceId): bool
+ {
+ return ctype_xdigit($traceId) && strlen($traceId) === self::TRACE_LENGTH && $traceId !== self::INVALID_TRACE && $traceId === strtolower($traceId);
+ }
+
+ /**
+ * @return bool Returns a value that indicates whether a span id is valid
+ */
+ public static function isValidSpanId(string $spanId): bool
+ {
+ return ctype_xdigit($spanId) && strlen($spanId) === self::SPAN_LENGTH && $spanId !== self::INVALID_SPAN && $spanId === strtolower($spanId);
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanInterface.php b/vendor/open-telemetry/api/Trace/SpanInterface.php
new file mode 100644
index 000000000..274a257ea
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanInterface.php
@@ -0,0 +1,96 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ImplicitContextKeyedInterface;
+use Throwable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#span-operations
+ */
+interface SpanInterface extends ImplicitContextKeyedInterface
+{
+ /**
+ * Returns the {@see SpanInterface} from the provided *$context*,
+ * falling back on {@see SpanInterface::getInvalid()} if there is no span in the provided context.
+ */
+ public static function fromContext(ContextInterface $context): SpanInterface;
+
+ /**
+ * Returns the current {@see SpanInterface} from the current {@see ContextInterface},
+ * falling back on {@see SpanInterface::getEmpty()} if there is no span in the current context.
+ */
+ public static function getCurrent(): SpanInterface;
+
+ /**
+ * Returns an invalid {@see SpanInterface} that is used when tracing is disabled, such s when there is no available SDK.
+ */
+ public static function getInvalid(): SpanInterface;
+
+ /**
+ * Returns a non-recording {@see SpanInterface} that hold the provided *$spanContext* but has no functionality.
+ * It will not be exported and al tracing operations are no-op, but can be used to propagate a valid {@see SpanContext} downstream.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#wrapping-a-spancontext-in-a-span
+ */
+ public static function wrap(SpanContextInterface $spanContext): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#get-context
+ */
+ public function getContext(): SpanContextInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#isrecording
+ */
+ public function isRecording(): bool;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-attributes
+ * Adding attributes at span creation is preferred to calling setAttribute later, as samplers can only consider information
+ * already present during span creation
+ * @param non-empty-string $key
+ * @param bool|int|float|string|array|null $value Note: arrays MUST be homogeneous, i.e. it MUST NOT contain values of different types.
+ */
+ public function setAttribute(string $key, $value): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-attributes
+ * An attribute with a null key will be dropped, and an attribute with a null value will be dropped but also remove any existing
+ * attribute with the same key.
+ * @param iterable<non-empty-string, bool|int|float|string|array|null> $attributes
+ */
+ public function setAttributes(iterable $attributes): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#add-events
+ */
+ public function addEvent(string $name, iterable $attributes = [], int $timestamp = null): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#record-exception
+ */
+ public function recordException(Throwable $exception, iterable $attributes = []): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#updatename
+ *
+ * @param non-empty-string $name
+ */
+ public function updateName(string $name): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-status
+ *
+ * @psalm-param StatusCode::STATUS_* $code
+ */
+ public function setStatus(string $code, string $description = null): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#end
+ */
+ public function end(int $endEpochNanos = null): void;
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanKind.php b/vendor/open-telemetry/api/Trace/SpanKind.php
new file mode 100644
index 000000000..f44339e00
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanKind.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#spankind
+ */
+interface SpanKind
+{
+ public const KIND_INTERNAL = 0;
+ public const KIND_CLIENT = 1;
+ public const KIND_SERVER = 2;
+ public const KIND_PRODUCER = 3;
+ public const KIND_CONSUMER = 4;
+}
diff --git a/vendor/open-telemetry/api/Trace/StatusCode.php b/vendor/open-telemetry/api/Trace/StatusCode.php
new file mode 100644
index 000000000..0d95e96a5
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/StatusCode.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-status
+ */
+interface StatusCode
+{
+ public const STATUS_UNSET = 'Unset';
+ public const STATUS_OK = 'Ok';
+ public const STATUS_ERROR = 'Error';
+}
diff --git a/vendor/open-telemetry/api/Trace/TraceFlags.php b/vendor/open-telemetry/api/Trace/TraceFlags.php
new file mode 100644
index 000000000..6adf72b1a
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TraceFlags.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+interface TraceFlags
+{
+ public const SAMPLED = 0x01;
+ public const DEFAULT = 0x00;
+}
diff --git a/vendor/open-telemetry/api/Trace/TraceState.php b/vendor/open-telemetry/api/Trace/TraceState.php
new file mode 100644
index 000000000..306a63322
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TraceState.php
@@ -0,0 +1,190 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use function array_reverse;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use function strlen;
+
+class TraceState implements TraceStateInterface
+{
+ use LogsMessagesTrait;
+
+ public const MAX_LIST_MEMBERS = 32; //@see https://www.w3.org/TR/trace-context/#tracestate-header-field-values
+ public const MAX_COMBINED_LENGTH = 512; //@see https://www.w3.org/TR/trace-context/#tracestate-limits
+ public const LIST_MEMBERS_SEPARATOR = ',';
+ public const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
+ private const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*\/]';
+ private const VALID_KEY = '[a-z]' . self::VALID_KEY_CHAR_RANGE . '{0,255}';
+ private const VALID_VENDOR_KEY = '[a-z0-9]' . self::VALID_KEY_CHAR_RANGE . '{0,240}@[a-z]' . self::VALID_KEY_CHAR_RANGE . '{0,13}';
+ private const VALID_KEY_REGEX = '/^(?:' . self::VALID_KEY . '|' . self::VALID_VENDOR_KEY . ')$/';
+ private const VALID_VALUE_BASE_REGEX = '/^[ -~]{0,255}[!-~]$/';
+ private const INVALID_VALUE_COMMA_EQUAL_REGEX = '/,|=/';
+
+ /**
+ * @var string[]
+ */
+ private array $traceState = [];
+
+ public function __construct(string $rawTracestate = null)
+ {
+ if ($rawTracestate === null || trim($rawTracestate) === '') {
+ return;
+ }
+ $this->traceState = $this->parse($rawTracestate);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function with(string $key, string $value): TraceStateInterface
+ {
+ $clonedTracestate = clone $this;
+
+ if ($this->validateKey($key) && $this->validateValue($value)) {
+
+ /*
+ * Only one entry per key is allowed. In this case we need to overwrite the vendor entry
+ * upon reentry to the tracing system and ensure the updated entry is at the beginning of
+ * the list. This means we place it the back for now and it will be at the beginning once
+ * we reverse the order back during __toString().
+ */
+ if (array_key_exists($key, $clonedTracestate->traceState)) {
+ unset($clonedTracestate->traceState[$key]);
+ }
+
+ // Add new or updated entry to the back of the list.
+ $clonedTracestate->traceState[$key] = $value;
+ } else {
+ self::logWarning('Invalid tracetrace key/value for: ' . $key);
+ }
+
+ return $clonedTracestate;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function without(string $key): TraceStateInterface
+ {
+ $clonedTracestate = clone $this;
+
+ if ($key !== '') {
+ unset($clonedTracestate->traceState[$key]);
+ }
+
+ return $clonedTracestate;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get(string $key): ?string
+ {
+ return $this->traceState[$key] ?? null;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListMemberCount(): int
+ {
+ return count($this->traceState);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString(): string
+ {
+ if ($this->traceState === []) {
+ return '';
+ }
+ $traceStateString='';
+ foreach (array_reverse($this->traceState) as $k => $v) {
+ $traceStateString .=$k . self::LIST_MEMBER_KEY_VALUE_SPLITTER . $v . self::LIST_MEMBERS_SEPARATOR;
+ }
+
+ return rtrim($traceStateString, ',');
+ }
+
+ /**
+ * Parse the raw tracestate header into the TraceState object. Since new or updated entries must
+ * be added to the beginning of the list, the key-value pairs in the TraceState object will be
+ * stored in reverse order. This ensures new entries added to the TraceState object are at the
+ * beginning when we reverse the order back again while building the final tracestate header.
+ *
+ * Ex:
+ * tracestate = 'vendor1=value1,vendor2=value2'
+ *
+ * ||
+ * \/
+ *
+ * $this->tracestate = ['vendor2' => 'value2' ,'vendor1' => 'value1']
+ *
+ */
+ private function parse(string $rawTracestate): array
+ {
+ if (strlen($rawTracestate) > self::MAX_COMBINED_LENGTH) {
+ self::logWarning('tracestate discarded, exceeds max combined length: ' . self::MAX_COMBINED_LENGTH);
+
+ return [];
+ }
+ $parsedTracestate = [];
+ $listMembers = explode(self::LIST_MEMBERS_SEPARATOR, $rawTracestate);
+
+ if (count($listMembers) > self::MAX_LIST_MEMBERS) {
+ self::logWarning('tracestate discarded, too many members');
+
+ return [];
+ }
+
+ foreach ($listMembers as $listMember) {
+ $vendor = explode(self::LIST_MEMBER_KEY_VALUE_SPLITTER, trim($listMember));
+
+ // There should only be one list-member per vendor separated by '='
+ if (count($vendor) !== 2 || !$this->validateKey($vendor[0]) || !$this->validateValue($vendor[1])) {
+ self::logWarning('tracestate discarded, invalid member: ' . $listMember);
+
+ return [];
+ }
+ $parsedTracestate[$vendor[0]] = $vendor[1];
+ }
+
+ /*
+ * Reversing the tracestate ensures the new entries added to the TraceState object are at
+ * the beginning when we reverse it back during __toString().
+ */
+ return array_reverse($parsedTracestate);
+ }
+
+ /**
+ * The Key is opaque string that is an identifier for a vendor. It can be up
+ * to 256 characters and MUST begin with a lowercase letter or a digit, and can
+ * only contain lowercase letters (a-z), digits (0-9), underscores (_), dashes (-),
+ * asterisks (*), and forward slashes (/). For multi-tenant vendor scenarios, an at
+ * sign (@) can be used to prefix the vendor name. Vendors SHOULD set the tenant ID
+ * at the beginning of the key.
+ *
+ * @see https://www.w3.org/TR/trace-context/#key
+ */
+ private function validateKey(string $key): bool
+ {
+ return preg_match(self::VALID_KEY_REGEX, $key) !== 0;
+ }
+
+ /**
+ * The value is an opaque string containing up to 256 printable ASCII [RFC0020]
+ * characters (i.e., the range 0x20 to 0x7E) except comma (,) and (=). Note that
+ * this also excludes tabs, newlines, carriage returns, etc.
+ *
+ * @see https://www.w3.org/TR/trace-context/#value
+ */
+ private function validateValue(string $key): bool
+ {
+ return (preg_match(self::VALID_VALUE_BASE_REGEX, $key) !== 0)
+ && (preg_match(self::INVALID_VALUE_COMMA_EQUAL_REGEX, $key) === 0);
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/TraceStateInterface.php b/vendor/open-telemetry/api/Trace/TraceStateInterface.php
new file mode 100644
index 000000000..79d4e0299
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TraceStateInterface.php
@@ -0,0 +1,61 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * TraceState parses and stores the tracestate header as an immutable list of string
+ * key/value pairs. It provides the following operations following the rules described
+ * in the W3C Trace Context specification:
+ * - Get value for a given key
+ * - Add a new key/value pair
+ * - Update an existing value for a given key
+ * - Delete a key/value pair
+ *
+ * All mutating operations return a new TraceState with the modifications applied.
+ *
+ * @see https://www.w3.org/TR/trace-context/#tracestate-header
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#tracestate
+ */
+interface TraceStateInterface
+{
+ /**
+ * Return a new TraceState object that inherits from this TraceState
+ * and contains the given key value pair.
+ *
+ * @param string $key
+ * @param string $value
+ * @return TraceStateInterface
+ */
+ public function with(string $key, string $value): TraceStateInterface;
+
+ /**
+ * Return a new TraceState object that inherits from this TraceState
+ * without the given key value pair.
+ *
+ * @param string $key
+ * @return TraceStateInterface
+ */
+ public function without(string $key): TraceStateInterface;
+
+ /**
+ * Return the value of a given key from this TraceState if it exists
+ *
+ * @param string $key
+ * @return string|null
+ */
+ public function get(string $key): ?string;
+
+ /**
+ * Get the list-member count in this TraceState
+ *
+ * @return int
+ */
+ public function getListMemberCount(): int;
+
+ /**
+ * Returns a string representation of this TraceSate
+ */
+ public function __toString(): string;
+}
diff --git a/vendor/open-telemetry/api/Trace/TracerInterface.php b/vendor/open-telemetry/api/Trace/TracerInterface.php
new file mode 100644
index 000000000..1293a6642
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TracerInterface.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+interface TracerInterface
+{
+ /** @param non-empty-string $spanName */
+ public function spanBuilder(string $spanName): SpanBuilderInterface;
+}
diff --git a/vendor/open-telemetry/api/Trace/TracerProviderInterface.php b/vendor/open-telemetry/api/Trace/TracerProviderInterface.php
new file mode 100644
index 000000000..9f5d20759
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TracerProviderInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/api.md#tracerprovider */
+interface TracerProviderInterface
+{
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/api.md#get-a-tracer
+ */
+ public function getTracer(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): TracerInterface;
+}
diff --git a/vendor/open-telemetry/api/Trace/functions.php b/vendor/open-telemetry/api/Trace/functions.php
new file mode 100644
index 000000000..79f730717
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/functions.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use Closure;
+use Throwable;
+
+/**
+ * Executes the given closure within the provided span.
+ *
+ * The span will be ended.
+ *
+ * @template R
+ * @param SpanInterface $span span to enclose the closure with
+ * @param Closure(...): R $closure closure to invoke
+ * @param iterable<int|string, mixed> $args arguments to provide to the closure
+ * @return R result of the closure invocation
+ *
+ * @phpstan-ignore-next-line
+ */
+function trace(SpanInterface $span, Closure $closure, iterable $args = [])
+{
+ $s = $span;
+ $c = $closure;
+ $a = $args;
+ unset($span, $closure, $args);
+
+ $scope = $s->activate();
+
+ try {
+ /** @psalm-suppress InvalidArgument */
+ return $c(...$a, ...($a = []));
+ } catch (Throwable $e) {
+ $s->setStatus(StatusCode::STATUS_ERROR, $e->getMessage());
+ $s->recordException($e, ['exception.escaped' => true]);
+
+ throw $e;
+ } finally {
+ $scope->detach();
+ $s->end();
+ }
+}
diff --git a/vendor/open-telemetry/api/composer.json b/vendor/open-telemetry/api/composer.json
new file mode 100644
index 000000000..39acaec47
--- /dev/null
+++ b/vendor/open-telemetry/api/composer.json
@@ -0,0 +1,40 @@
+{
+ "name": "open-telemetry/api",
+ "description": "API for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "api"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "open-telemetry/context": "^1.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\API\\": "."
+ },
+ "files": [
+ "Trace/functions.php"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/context/Context.php b/vendor/open-telemetry/context/Context.php
new file mode 100644
index 000000000..32b0162a3
--- /dev/null
+++ b/vendor/open-telemetry/context/Context.php
@@ -0,0 +1,131 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+use function spl_object_id;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context
+ */
+final class Context implements ContextInterface
+{
+ /** @var ContextStorageInterface&ExecutionContextAwareInterface */
+ private static ContextStorageInterface $storage;
+
+ // Optimization for spans to avoid copying the context array.
+ private static ContextKeyInterface $spanContextKey;
+ private ?object $span = null;
+ /** @var array<int, mixed> */
+ private array $context = [];
+ /** @var array<int, ContextKeyInterface> */
+ private array $contextKeys = [];
+
+ private function __construct()
+ {
+ self::$spanContextKey = ContextKeys::span();
+ }
+
+ public static function createKey(string $key): ContextKeyInterface
+ {
+ return new ContextKey($key);
+ }
+
+ /**
+ * @param ContextStorageInterface&ExecutionContextAwareInterface $storage
+ */
+ public static function setStorage(ContextStorageInterface $storage): void
+ {
+ self::$storage = $storage;
+ }
+
+ /**
+ * @return ContextStorageInterface&ExecutionContextAwareInterface
+ */
+ public static function storage(): ContextStorageInterface
+ {
+ /** @psalm-suppress RedundantPropertyInitializationCheck */
+ return self::$storage ??= new ContextStorage();
+ }
+
+ /**
+ * @param ContextInterface|false|null $context
+ *
+ * @internal OpenTelemetry
+ */
+ public static function resolve($context, ?ContextStorageInterface $contextStorage = null): ContextInterface
+ {
+ return $context
+ ?? ($contextStorage ?? self::storage())->current()
+ ?: self::getRoot();
+ }
+
+ /**
+ * @internal
+ */
+ public static function getRoot(): ContextInterface
+ {
+ static $empty;
+
+ return $empty ??= new self();
+ }
+
+ public static function getCurrent(): ContextInterface
+ {
+ return self::storage()->current();
+ }
+
+ public function activate(): ScopeInterface
+ {
+ $scope = self::storage()->attach($this);
+ /** @psalm-suppress RedundantCondition */
+ assert((bool) $scope = new DebugScope($scope));
+
+ return $scope;
+ }
+
+ public function withContextValue(ImplicitContextKeyedInterface $value): ContextInterface
+ {
+ return $value->storeInContext($this);
+ }
+
+ public function with(ContextKeyInterface $key, $value): self
+ {
+ if ($this->get($key) === $value) {
+ return $this;
+ }
+
+ $self = clone $this;
+
+ if ($key === self::$spanContextKey) {
+ $self->span = $value; // @phan-suppress-current-line PhanTypeMismatchPropertyReal
+
+ return $self;
+ }
+
+ $id = spl_object_id($key);
+ if ($value !== null) {
+ $self->context[$id] = $value;
+ $self->contextKeys[$id] ??= $key;
+ } else {
+ unset(
+ $self->context[$id],
+ $self->contextKeys[$id],
+ );
+ }
+
+ return $self;
+ }
+
+ public function get(ContextKeyInterface $key)
+ {
+ if ($key === self::$spanContextKey) {
+ /** @psalm-suppress InvalidReturnStatement */
+ return $this->span;
+ }
+
+ return $this->context[spl_object_id($key)] ?? null;
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextInterface.php b/vendor/open-telemetry/context/ContextInterface.php
new file mode 100644
index 000000000..17a3fb9a2
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextInterface.php
@@ -0,0 +1,86 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * Immutable execution scoped propagation mechanism.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context
+ */
+interface ContextInterface
+{
+ /**
+ * Creates a new context key.
+ *
+ * @param non-empty-string $key name of the key
+ * @return ContextKeyInterface created key
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#create-a-key
+ */
+ public static function createKey(string $key): ContextKeyInterface;
+
+ /**
+ * Returns the current context.
+ *
+ * @return ContextInterface current context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#get-current-context
+ */
+ public static function getCurrent(): ContextInterface;
+
+ /**
+ * Attaches this context as active context.
+ *
+ * The returned scope has to be {@link ScopeInterface::detach()}ed. In most
+ * cases this should be done using a `try-finally` statement:
+ * ```php
+ * $scope = $context->activate();
+ * try {
+ * // ...
+ * } finally {
+ * $scope->detach();
+ * }
+ * ```
+ *
+ * @return ScopeInterface scope to detach the context and restore the previous
+ * context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#attach-context
+ */
+ public function activate(): ScopeInterface;
+
+ /**
+ * Returns a context with the given key set to the given value.
+ *
+ * @template T
+ * @param ContextKeyInterface<T> $key key to set
+ * @param T|null $value value to set
+ * @return ContextInterface a context with the given key set to `$value`
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#set-value
+ */
+ public function with(ContextKeyInterface $key, $value): ContextInterface;
+
+ /**
+ * Returns a context with the given value set.
+ *
+ * @param ImplicitContextKeyedInterface $value value to set
+ * @return ContextInterface a context with the given `$value`
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#set-value
+ */
+ public function withContextValue(ImplicitContextKeyedInterface $value): ContextInterface;
+
+ /**
+ * Returns the value assigned to the given key.
+ *
+ * @template T
+ * @param ContextKeyInterface<T> $key key to get
+ * @return T|null value assigned to `$key`, or null if no such value exists
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#get-value
+ */
+ public function get(ContextKeyInterface $key);
+}
diff --git a/vendor/open-telemetry/context/ContextKey.php b/vendor/open-telemetry/context/ContextKey.php
new file mode 100644
index 000000000..f7450249e
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextKey.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @internal
+ */
+final class ContextKey implements ContextKeyInterface
+{
+ private ?string $name;
+
+ public function __construct(?string $name=null)
+ {
+ $this->name = $name;
+ }
+
+ public function name(): ?string
+ {
+ return $this->name;
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextKeyInterface.php b/vendor/open-telemetry/context/ContextKeyInterface.php
new file mode 100644
index 000000000..b3ad00814
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextKeyInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @template-covariant T
+ */
+interface ContextKeyInterface
+{
+}
diff --git a/vendor/open-telemetry/context/ContextKeys.php b/vendor/open-telemetry/context/ContextKeys.php
new file mode 100644
index 000000000..bc1022568
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextKeys.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @psalm-internal OpenTelemetry
+ */
+final class ContextKeys
+{
+ public static function span(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey('opentelemetry-trace-span-key');
+ }
+
+ public static function baggage(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey('opentelemetry-trace-baggage-key');
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorage.php b/vendor/open-telemetry/context/ContextStorage.php
new file mode 100644
index 000000000..e82d3d161
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorage.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @internal
+ */
+final class ContextStorage implements ContextStorageInterface, ExecutionContextAwareInterface
+{
+ public ContextStorageHead $current;
+ private ContextStorageHead $main;
+ /** @var array<int|string, ContextStorageHead> */
+ private array $forks = [];
+
+ public function __construct()
+ {
+ $this->current = $this->main = new ContextStorageHead($this);
+ }
+
+ public function fork($id): void
+ {
+ $this->forks[$id] = clone $this->current;
+ }
+
+ public function switch($id): void
+ {
+ $this->current = $this->forks[$id] ?? $this->main;
+ }
+
+ public function destroy($id): void
+ {
+ unset($this->forks[$id]);
+ }
+
+ public function scope(): ?ContextStorageScopeInterface
+ {
+ return ($this->current->node->head ?? null) === $this->current
+ ? $this->current->node
+ : null;
+ }
+
+ public function current(): ContextInterface
+ {
+ return $this->current->node->context ?? Context::getRoot();
+ }
+
+ public function attach(ContextInterface $context): ContextStorageScopeInterface
+ {
+ return $this->current->node = new ContextStorageNode($context, $this->current, $this->current->node);
+ }
+
+ private function __clone()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorageHead.php b/vendor/open-telemetry/context/ContextStorageHead.php
new file mode 100644
index 000000000..3cc4d7181
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageHead.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @internal
+ */
+final class ContextStorageHead
+{
+ public ContextStorage $storage;
+ public ?ContextStorageNode $node = null;
+
+ public function __construct(ContextStorage $storage)
+ {
+ $this->storage = $storage;
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorageInterface.php b/vendor/open-telemetry/context/ContextStorageInterface.php
new file mode 100644
index 000000000..e5a105074
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+interface ContextStorageInterface
+{
+ /**
+ * Returns the current scope.
+ *
+ * @return ContextStorageScopeInterface|null current scope, or null if no
+ * scope was attached in the current execution unit
+ */
+ public function scope(): ?ContextStorageScopeInterface;
+
+ /**
+ * Returns the current context.
+ *
+ * @return ContextInterface current context
+ */
+ public function current(): ContextInterface;
+
+ /**
+ * Attaches the context as active context.
+ *
+ * @param ContextInterface $context context to attach
+ * @return ContextStorageScopeInterface scope to detach the context and
+ * restore the previous context
+ */
+ public function attach(ContextInterface $context): ContextStorageScopeInterface;
+}
diff --git a/vendor/open-telemetry/context/ContextStorageNode.php b/vendor/open-telemetry/context/ContextStorageNode.php
new file mode 100644
index 000000000..12d521660
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageNode.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+
+/**
+ * @internal
+ */
+final class ContextStorageNode implements ScopeInterface, ContextStorageScopeInterface
+{
+ public ContextInterface $context;
+ public ContextStorageHead $head;
+ private ?ContextStorageNode $previous;
+ private array $localStorage = [];
+
+ public function __construct(
+ ContextInterface $context,
+ ContextStorageHead $head,
+ ?ContextStorageNode $previous = null
+ ) {
+ $this->context = $context;
+ $this->head = $head;
+ $this->previous = $previous;
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return isset($this->localStorage[$offset]);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->localStorage[$offset];
+ }
+
+ public function offsetSet($offset, $value): void
+ {
+ $this->localStorage[$offset] = $value;
+ }
+
+ public function offsetUnset($offset): void
+ {
+ unset($this->localStorage[$offset]);
+ }
+
+ public function context(): ContextInterface
+ {
+ return $this->context;
+ }
+
+ public function detach(): int
+ {
+ $flags = 0;
+ if ($this->head !== $this->head->storage->current) {
+ $flags |= ScopeInterface::INACTIVE;
+ }
+
+ if ($this === $this->head->node) {
+ assert($this->previous !== $this);
+ $this->head->node = $this->previous;
+ $this->previous = $this;
+
+ return $flags;
+ }
+
+ if ($this->previous === $this) {
+ return $flags | ScopeInterface::DETACHED;
+ }
+
+ assert($this->head->node !== null);
+ for ($n = $this->head->node, $depth = 1;
+ $n->previous !== $this;
+ $n = $n->previous, $depth++) {
+ assert($n->previous !== null);
+ }
+ $n->previous = $this->previous;
+ $this->previous = $this;
+
+ return $flags | ScopeInterface::MISMATCH | $depth;
+ }
+
+ private function __clone()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorageScopeInterface.php b/vendor/open-telemetry/context/ContextStorageScopeInterface.php
new file mode 100644
index 000000000..5fe58d6eb
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageScopeInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use ArrayAccess;
+
+interface ContextStorageScopeInterface extends ScopeInterface, ArrayAccess
+{
+ /**
+ * Returns the context associated with this scope.
+ *
+ * @return ContextInterface associated context
+ */
+ public function context(): ContextInterface;
+
+ /**
+ * @param string $offset
+ */
+ public function offsetSet($offset, $value): void;
+}
diff --git a/vendor/open-telemetry/context/DebugScope.php b/vendor/open-telemetry/context/DebugScope.php
new file mode 100644
index 000000000..e9e4d53c5
--- /dev/null
+++ b/vendor/open-telemetry/context/DebugScope.php
@@ -0,0 +1,94 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function basename;
+use function count;
+use function debug_backtrace;
+use const DEBUG_BACKTRACE_IGNORE_ARGS;
+use function sprintf;
+use function trigger_error;
+
+/**
+ * @internal
+ */
+final class DebugScope implements ScopeInterface
+{
+ private const DEBUG_TRACE_CREATE = '__debug_trace_create';
+ private const DEBUG_TRACE_DETACH = '__debug_trace_detach';
+
+ private ContextStorageScopeInterface $scope;
+
+ public function __construct(ContextStorageScopeInterface $node)
+ {
+ $this->scope = $node;
+ $this->scope[self::DEBUG_TRACE_CREATE] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+ }
+
+ public function detach(): int
+ {
+ $this->scope[self::DEBUG_TRACE_DETACH] ??= debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+
+ $flags = $this->scope->detach();
+
+ if (($flags & ScopeInterface::DETACHED) !== 0) {
+ trigger_error(sprintf(
+ 'Scope: unexpected call to Scope::detach() for scope #%d, scope was already detached %s',
+ spl_object_id($this),
+ self::formatBacktrace($this->scope[self::DEBUG_TRACE_DETACH]),
+ ));
+ } elseif (($flags & ScopeInterface::MISMATCH) !== 0) {
+ trigger_error(sprintf(
+ 'Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached but another scope should have been detached first',
+ spl_object_id($this),
+ ));
+ } elseif (($flags & ScopeInterface::INACTIVE) !== 0) {
+ trigger_error(sprintf(
+ 'Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached from different execution context',
+ spl_object_id($this),
+ ));
+ }
+
+ return $flags;
+ }
+
+ public function __destruct()
+ {
+ if (!isset($this->scope[self::DEBUG_TRACE_DETACH])) {
+ trigger_error(sprintf(
+ 'Scope: missing call to Scope::detach() for scope #%d, created %s',
+ spl_object_id($this->scope),
+ self::formatBacktrace($this->scope[self::DEBUG_TRACE_CREATE]),
+ ));
+ }
+ }
+
+ private static function formatBacktrace(array $trace): string
+ {
+ $s = '';
+ for ($i = 0, $n = count($trace) + 1; ++$i < $n;) {
+ $s .= "\n\t";
+ $s .= 'at ';
+ if (isset($trace[$i]['class'])) {
+ $s .= strtr($trace[$i]['class'], ['\\' => '.']);
+ $s .= '.';
+ }
+ $s .= strtr($trace[$i]['function'] ?? '{main}', ['\\' => '.']);
+ $s .= '(';
+ if (isset($trace[$i - 1]['file'])) {
+ $s .= basename($trace[$i - 1]['file']);
+ if (isset($trace[$i - 1]['line'])) {
+ $s .= ':';
+ $s .= $trace[$i - 1]['line'];
+ }
+ } else {
+ $s .= 'Unknown Source';
+ }
+ $s .= ')';
+ }
+
+ return $s . "\n";
+ }
+}
diff --git a/vendor/open-telemetry/context/ExecutionContextAwareInterface.php b/vendor/open-telemetry/context/ExecutionContextAwareInterface.php
new file mode 100644
index 000000000..3a955bfae
--- /dev/null
+++ b/vendor/open-telemetry/context/ExecutionContextAwareInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+interface ExecutionContextAwareInterface
+{
+ /**
+ * @param int|string $id
+ */
+ public function fork($id): void;
+
+ /**
+ * @param int|string $id
+ */
+ public function switch($id): void;
+
+ /**
+ * @param int|string $id
+ */
+ public function destroy($id): void;
+}
diff --git a/vendor/open-telemetry/context/FiberBoundContextStorage.php b/vendor/open-telemetry/context/FiberBoundContextStorage.php
new file mode 100644
index 000000000..667f73b3d
--- /dev/null
+++ b/vendor/open-telemetry/context/FiberBoundContextStorage.php
@@ -0,0 +1,84 @@
+<?php
+
+/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+use function class_exists;
+use const E_USER_WARNING;
+use Fiber;
+use function trigger_error;
+
+/**
+ * @internal
+ *
+ * @phan-file-suppress PhanUndeclaredClassReference
+ * @phan-file-suppress PhanUndeclaredClassMethod
+ */
+final class FiberBoundContextStorage implements ContextStorageInterface, ExecutionContextAwareInterface
+{
+ /** @var ContextStorageInterface&ExecutionContextAwareInterface */
+ private ContextStorageInterface $storage;
+
+ /**
+ * @param ContextStorageInterface&ExecutionContextAwareInterface $storage
+ */
+ public function __construct(ContextStorageInterface $storage)
+ {
+ $this->storage = $storage;
+ }
+
+ public function fork($id): void
+ {
+ $this->storage->fork($id);
+ }
+
+ public function switch($id): void
+ {
+ $this->storage->switch($id);
+ }
+
+ public function destroy($id): void
+ {
+ $this->storage->destroy($id);
+ }
+
+ public function scope(): ?ContextStorageScopeInterface
+ {
+ $this->checkFiberMismatch();
+
+ if (($scope = $this->storage->scope()) === null) {
+ return null;
+ }
+
+ return new FiberBoundContextStorageScope($scope);
+ }
+
+ public function current(): ContextInterface
+ {
+ $this->checkFiberMismatch();
+
+ return $this->storage->current();
+ }
+
+ public function attach(ContextInterface $context): ContextStorageScopeInterface
+ {
+ $scope = $this->storage->attach($context);
+ assert(class_exists(Fiber::class, false));
+ $scope[Fiber::class] = Fiber::getCurrent();
+
+ return new FiberBoundContextStorageScope($scope);
+ }
+
+ private function checkFiberMismatch(): void
+ {
+ $scope = $this->storage->scope();
+ assert(class_exists(Fiber::class, false));
+ if ($scope && $scope[Fiber::class] !== Fiber::getCurrent()) {
+ trigger_error('Fiber context switching not supported', E_USER_WARNING);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/context/FiberBoundContextStorageScope.php b/vendor/open-telemetry/context/FiberBoundContextStorageScope.php
new file mode 100644
index 000000000..647552244
--- /dev/null
+++ b/vendor/open-telemetry/context/FiberBoundContextStorageScope.php
@@ -0,0 +1,67 @@
+<?php
+
+/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+use function class_exists;
+use Fiber;
+
+/**
+ * @internal
+ *
+ * @phan-file-suppress PhanUndeclaredClassReference
+ * @phan-file-suppress PhanUndeclaredClassMethod
+ */
+final class FiberBoundContextStorageScope implements ScopeInterface, ContextStorageScopeInterface
+{
+ private ContextStorageScopeInterface $scope;
+
+ public function __construct(ContextStorageScopeInterface $scope)
+ {
+ $this->scope = $scope;
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return $this->scope->offsetExists($offset);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->scope->offsetGet($offset);
+ }
+
+ public function offsetSet($offset, $value): void
+ {
+ $this->scope->offsetSet($offset, $value);
+ }
+
+ public function offsetUnset($offset): void
+ {
+ $this->scope->offsetUnset($offset);
+ }
+
+ public function context(): ContextInterface
+ {
+ return $this->scope->context();
+ }
+
+ public function detach(): int
+ {
+ $flags = $this->scope->detach();
+ assert(class_exists(Fiber::class, false));
+ if ($this->scope[Fiber::class] !== Fiber::getCurrent()) {
+ $flags |= ScopeInterface::INACTIVE;
+ }
+
+ return $flags;
+ }
+}
diff --git a/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php b/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php
new file mode 100644
index 000000000..0af93122c
--- /dev/null
+++ b/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * Represents a value that can be stored within {@see ContextInterface}.
+ * Allows storing themselves without exposing a {@see ContextKeyInterface}.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#context-interaction
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#context-interaction
+ */
+interface ImplicitContextKeyedInterface
+{
+ /**
+ * Adds `$this` to the {@see Context::getCurrent() current context} and makes
+ * the new {@see Context} the current context.
+ *
+ * {@see ScopeInterface::detach()} _MUST_ be called to properly restore the previous context.
+ *
+ * This method is equivalent to `Context::getCurrent().with($value).activate();`.
+ *
+ * @todo: Update this to suggest using the new helper method way to doing something in a specific context/span.
+ */
+ public function activate(): ScopeInterface;
+
+ /**
+ * Returns a new {@see ContextInterface} created by setting `$this` into the provided [@see ContextInterface}.
+ */
+ public function storeInContext(ContextInterface $context): ContextInterface;
+}
diff --git a/vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php b/vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php
new file mode 100644
index 000000000..51263044d
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php
@@ -0,0 +1,129 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use function array_key_first;
+use ArrayAccess;
+use function get_class;
+use function gettype;
+use InvalidArgumentException;
+use function is_array;
+use function is_object;
+use function is_string;
+use function sprintf;
+use function strcasecmp;
+use Traversable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-propagator Getter and Setter.
+ *
+ * Default implementation of {@see PropagationGetterInterface} and {@see PropagationSetterInterface}.
+ * This type is used if no custom getter/setter is provided to {@see TextMapPropagatorInterface::inject()} or {@see TextMapPropagatorInterface::extract()}.
+ */
+final class ArrayAccessGetterSetter implements PropagationGetterInterface, PropagationSetterInterface
+{
+ private static ?self $instance = null;
+
+ /**
+ * Returns a singleton instance of `self` to avoid, multiple runtime allocations.
+ */
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /** {@inheritdoc} */
+ public function keys($carrier): array
+ {
+ if ($this->isSupportedCarrier($carrier)) {
+ $keys = [];
+ foreach ($carrier as $key => $_) {
+ $keys[] = (string) $key;
+ }
+
+ return $keys;
+ }
+
+ throw new InvalidArgumentException(
+ sprintf(
+ 'Unsupported carrier type: %s.',
+ is_object($carrier) ? get_class($carrier) : gettype($carrier),
+ )
+ );
+ }
+
+ /** {@inheritdoc} */
+ public function get($carrier, string $key): ?string
+ {
+ if ($this->isSupportedCarrier($carrier)) {
+ $value = $carrier[$this->resolveKey($carrier, $key)] ?? null;
+ if (is_array($value) && $value) {
+ $value = $value[array_key_first($value)];
+ }
+
+ return is_string($value)
+ ? $value
+ : null;
+ }
+
+ throw new InvalidArgumentException(
+ sprintf(
+ 'Unsupported carrier type: %s. Unable to get value associated with key:%s',
+ is_object($carrier) ? get_class($carrier) : gettype($carrier),
+ $key
+ )
+ );
+ }
+
+ /** {@inheritdoc} */
+ public function set(&$carrier, string $key, string $value): void
+ {
+ if ($key === '') {
+ throw new InvalidArgumentException('Unable to set value with an empty key');
+ }
+ if ($this->isSupportedCarrier($carrier)) {
+ if (($r = $this->resolveKey($carrier, $key)) !== $key) {
+ unset($carrier[$r]);
+ }
+
+ $carrier[$key] = $value;
+
+ return;
+ }
+
+ throw new InvalidArgumentException(
+ sprintf(
+ 'Unsupported carrier type: %s. Unable to set value associated with key:%s',
+ is_object($carrier) ? get_class($carrier) : gettype($carrier),
+ $key
+ )
+ );
+ }
+
+ private function isSupportedCarrier($carrier): bool
+ {
+ return is_array($carrier) || $carrier instanceof ArrayAccess && $carrier instanceof Traversable;
+ }
+
+ private function resolveKey($carrier, string $key): string
+ {
+ if (isset($carrier[$key])) {
+ return $key;
+ }
+
+ foreach ($carrier as $k => $_) {
+ $k = (string) $k;
+ if (strcasecmp($k, $key) === 0) {
+ return $k;
+ }
+ }
+
+ return $key;
+ }
+}
diff --git a/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php b/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php
new file mode 100644
index 000000000..075fe98fe
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php
@@ -0,0 +1,83 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use function array_map;
+use function array_merge;
+use function array_unique;
+use function array_values;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+
+final class MultiTextMapPropagator implements TextMapPropagatorInterface
+{
+ /**
+ * @readonly
+ *
+ * @var list<TextMapPropagatorInterface>
+ */
+ private array $propagators = [];
+
+ /**
+ * @readonly
+ *
+ * @var list<string>
+ */
+ private array $fields;
+
+ /**
+ * @no-named-arguments
+ *
+ * @param list<TextMapPropagatorInterface> $propagators
+ */
+ public function __construct(array $propagators)
+ {
+ $this->propagators = $propagators;
+ $this->fields = $this->extractFields($propagators);
+ }
+
+ public function fields(): array
+ {
+ return $this->fields;
+ }
+
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
+ {
+ foreach ($this->propagators as $propagator) {
+ $propagator->inject($carrier, $setter, $context);
+ }
+ }
+
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
+ {
+ $context ??= Context::getCurrent();
+
+ foreach ($this->propagators as $propagator) {
+ $context = $propagator->extract($carrier, $getter, $context);
+ }
+
+ return $context;
+ }
+
+ /**
+ * @param list<TextMapPropagatorInterface> $propagators
+ * @return list<string>
+ */
+ private function extractFields(array $propagators): array
+ {
+ return array_values(
+ array_unique(
+ // Phan seems to struggle here with the variadic argument
+ // @phan-suppress-next-line PhanParamTooFewInternalUnpack
+ array_merge(
+ ...array_map(
+ static fn (TextMapPropagatorInterface $propagator) => $propagator->fields(),
+ $propagators
+ )
+ )
+ )
+ );
+ }
+}
diff --git a/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php b/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php
new file mode 100644
index 000000000..c408cfc79
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+
+final class NoopTextMapPropagator implements TextMapPropagatorInterface
+{
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ public function fields(): array
+ {
+ return [];
+ }
+
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
+ {
+ return $context ?? Context::getCurrent();
+ }
+
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
+ {
+ }
+}
diff --git a/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php b/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php
new file mode 100644
index 000000000..d2976c63d
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#getter-argument
+ */
+interface PropagationGetterInterface
+{
+ /**
+ * Returns the list of all the keys in the carrier.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#keys
+ *
+ * @return list<string>
+ */
+ public function keys($carrier): array;
+
+ /**
+ * Gets the value of a given key from a carrier.
+ */
+ public function get($carrier, string $key) : ?string;
+}
diff --git a/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php b/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php
new file mode 100644
index 000000000..75e205628
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#setter-argument
+ */
+interface PropagationSetterInterface
+{
+ /**
+ * Set the value for a given key on the associated carrier.
+ */
+ public function set(&$carrier, string $key, string $value) : void;
+}
diff --git a/vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php b/vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php
new file mode 100644
index 000000000..40652982e
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use function preg_replace;
+
+/**
+ * Some servers concatenate multiple headers with ';' -- we need to replace these with ','
+ * This is still a workaround and doesn't get around the problem fully, specifically it doesn't
+ * handle edge cases where the header has a trailing ';' or an empty trace state.
+ * We also need to trim trailing separators from the header, found when a header is empty.
+ */
+final class SanitizeCombinedHeadersPropagationGetter implements PropagationGetterInterface
+{
+ private const LIST_MEMBERS_SEPARATOR = ',';
+ private const SERVER_CONCAT_HEADERS_REGEX = '/;(?=[^,=;]*=|$)/';
+ private const TRAILING_LEADING_SEPARATOR_REGEX = '/^' . self::LIST_MEMBERS_SEPARATOR . '+|' . self::LIST_MEMBERS_SEPARATOR . '+$/';
+
+ private PropagationGetterInterface $getter;
+
+ public function __construct(PropagationGetterInterface $getter)
+ {
+ $this->getter = $getter;
+ }
+
+ public function keys($carrier): array
+ {
+ return $this->getter->keys($carrier);
+ }
+
+ public function get($carrier, string $key): ?string
+ {
+ $value = $this->getter->get($carrier, $key);
+ if ($value === null) {
+ return null;
+ }
+
+ return preg_replace(
+ [self::SERVER_CONCAT_HEADERS_REGEX, self::TRAILING_LEADING_SEPARATOR_REGEX],
+ [self::LIST_MEMBERS_SEPARATOR],
+ $value,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php b/vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php
new file mode 100644
index 000000000..fdf2d5141
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use OpenTelemetry\Context\ContextInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-propagator
+ */
+interface TextMapPropagatorInterface
+{
+ /**
+ * Returns list of fields that will be used by this propagator.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#fields
+ *
+ * @return list<string>
+ */
+ public function fields() : array;
+
+ /**
+ * Injects specific values from the provided {@see ContextInterface} into the provided carrier
+ * via an {@see PropagationSetterInterface}.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-inject
+ *
+ * @param mixed $carrier
+ */
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void;
+
+ /**
+ * Extracts specific values from the provided carrier into the provided {@see ContextInterface}
+ * via an {@see PropagationGetterInterface}.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-extract
+ */
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface;
+}
diff --git a/vendor/open-telemetry/context/README.md b/vendor/open-telemetry/context/README.md
new file mode 100644
index 000000000..4dfe0e23f
--- /dev/null
+++ b/vendor/open-telemetry/context/README.md
@@ -0,0 +1,63 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/context/releases)
+[![Source](https://img.shields.io/badge/source-context-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/Context)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:context-blue)](https://github.com/opentelemetry-php/context)
+[![Latest Version](http://poser.pugx.org/open-telemetry/context/v/unstable)](https://packagist.org/packages/open-telemetry/context/)
+[![Stable](http://poser.pugx.org/open-telemetry/context/v/stable)](https://packagist.org/packages/open-telemetry/context/)
+
+# OpenTelemetry Context
+
+Immutable execution scoped propagation mechanism, for further details see [opentelemetry-specification][1].
+
+## Installation
+
+```shell
+composer require open-telemetry/context
+```
+
+## Usage
+
+### Implicit propagation
+
+```php
+$context = Context::getCurrent();
+// modify context
+$scope = $context->activate();
+try {
+ // run within new context
+} finally {
+ $scope->detach();
+}
+```
+
+It is recommended to use a `try-finally` statement after `::activate()` to ensure that the created scope is properly `::detach()`ed.
+
+## Async applications
+
+### Fiber support
+
+Requires `PHP >= 8.1`, an NTS build, `ext-ffi`, and setting the environment variable `OTEL_PHP_FIBERS_ENABLED` to a truthy value. Additionally `vendor/autoload.php` has to be preloaded for non-CLI SAPIs if [`ffi.enable`](https://www.php.net/manual/en/ffi.configuration.php#ini.ffi.enable) is set to `preload`.
+
+### Event loops
+
+Event loops have to restore the original context on callback execution. A basic implementation could look like the following, though implementations should avoid keeping unnecessary references to arguments if possible:
+
+```php
+function bindContext(Closure $closure): Closure {
+ $context = Context::getCurrent();
+ return static function (mixed ...$args) use ($closure, $context): mixed {
+ $scope = $context->activate();
+ try {
+ return $closure(...$args);
+ } finally {
+ $scope->detach();
+ }
+ };
+}
+```
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
+
+[1]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context
diff --git a/vendor/open-telemetry/context/ScopeInterface.php b/vendor/open-telemetry/context/ScopeInterface.php
new file mode 100644
index 000000000..05319b8fc
--- /dev/null
+++ b/vendor/open-telemetry/context/ScopeInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use const PHP_INT_SIZE;
+
+interface ScopeInterface
+{
+ /** The associated context was already detached. */
+ public const DETACHED = 1 << (PHP_INT_SIZE << 3) - 1;
+ /** The associated context is not in the active execution context. */
+ public const INACTIVE = 1 << (PHP_INT_SIZE << 3) - 2;
+ /** The associated context is not the active context. */
+ public const MISMATCH = 1 << (PHP_INT_SIZE << 3) - 3;
+
+ /**
+ * Detaches the context associated with this scope and restores the
+ * previously associated context.
+ *
+ * @return int zero indicating an expected call, or a non-zero value
+ * indicating that the call was unexpected
+ *
+ * @see self::DETACHED
+ * @see self::INACTIVE
+ * @see self::MISMATCH
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#detach-context
+ */
+ public function detach(): int;
+}
diff --git a/vendor/open-telemetry/context/ZendObserverFiber.php b/vendor/open-telemetry/context/ZendObserverFiber.php
new file mode 100644
index 000000000..4d3d0c5ef
--- /dev/null
+++ b/vendor/open-telemetry/context/ZendObserverFiber.php
@@ -0,0 +1,67 @@
+<?php
+
+/** @noinspection PhpUndefinedMethodInspection */
+/** @phan-file-suppress PhanUndeclaredClassCatch */
+/** @phan-file-suppress PhanUndeclaredClassMethod */
+/** @phan-file-suppress PhanUndeclaredMethod */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function extension_loaded;
+use FFI;
+use const FILTER_VALIDATE_BOOLEAN;
+use function filter_var;
+use function is_string;
+use const PHP_VERSION_ID;
+use const PHP_ZTS;
+use function sprintf;
+use function trigger_error;
+
+/**
+ * @internal
+ */
+final class ZendObserverFiber
+{
+ public static function isEnabled(): bool
+ {
+ $enabled = $_SERVER['OTEL_PHP_FIBERS_ENABLED'] ?? false;
+
+ return is_string($enabled)
+ ? filter_var($enabled, FILTER_VALIDATE_BOOLEAN)
+ : (bool) $enabled;
+ }
+
+ public static function init(): bool
+ {
+ static $fibers;
+ if ($fibers) {
+ return true;
+ }
+
+ if (PHP_ZTS || PHP_VERSION_ID < 80100 || !extension_loaded('ffi')) {
+ trigger_error('Context: Fiber context switching not supported, requires PHP >= 8.1, an NTS build, and the FFI extension');
+
+ return false;
+ }
+
+ try {
+ $fibers = FFI::scope('OTEL_ZEND_OBSERVER_FIBER');
+ } catch (FFI\Exception $e) {
+ try {
+ $fibers = FFI::load(__DIR__ . '/fiber/zend_observer_fiber.h');
+ } catch (FFI\Exception $e) {
+ trigger_error(sprintf('Context: Fiber context switching not supported, %s', $e->getMessage()));
+
+ return false;
+ }
+ }
+
+ $fibers->zend_observer_fiber_init_register(static fn (int $initializing) => Context::storage()->fork($initializing)); //@phpstan-ignore-line
+ $fibers->zend_observer_fiber_switch_register(static fn (int $from, int $to) => Context::storage()->switch($to)); //@phpstan-ignore-line
+ $fibers->zend_observer_fiber_destroy_register(static fn (int $destroying) => Context::storage()->destroy($destroying)); //@phpstan-ignore-line
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/context/composer.json b/vendor/open-telemetry/context/composer.json
new file mode 100644
index 000000000..348b57f73
--- /dev/null
+++ b/vendor/open-telemetry/context/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "open-telemetry/context",
+ "description": "Context implementation for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "context"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\Context\\": "."
+ },
+ "files": [
+ "fiber/initialize_fiber_handler.php"
+ ]
+ },
+ "suggest": {
+ "ext-ffi": "To allow context switching in Fibers"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php b/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php
new file mode 100644
index 000000000..b9c706395
--- /dev/null
+++ b/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php
@@ -0,0 +1,20 @@
+<?php
+
+/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection */
+/** @phan-file-suppress PhanUndeclaredClassReference */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use Fiber;
+
+if (!class_exists(Fiber::class)) {
+ return;
+}
+
+if (ZendObserverFiber::isEnabled() && ZendObserverFiber::init()) {
+ // ffi fiber support enabled
+} else {
+ Context::setStorage(new FiberBoundContextStorage(Context::storage()));
+}
diff --git a/vendor/open-telemetry/context/fiber/zend_observer_fiber.h b/vendor/open-telemetry/context/fiber/zend_observer_fiber.h
new file mode 100644
index 000000000..6a8e4e98d
--- /dev/null
+++ b/vendor/open-telemetry/context/fiber/zend_observer_fiber.h
@@ -0,0 +1,9 @@
+#define FFI_SCOPE "OTEL_ZEND_OBSERVER_FIBER"
+
+typedef void (*zend_observer_fiber_init_handler)(intptr_t initializing);
+typedef void (*zend_observer_fiber_switch_handler)(intptr_t from, intptr_t to);
+typedef void (*zend_observer_fiber_destroy_handler)(intptr_t destroying);
+
+void zend_observer_fiber_init_register(zend_observer_fiber_init_handler handler);
+void zend_observer_fiber_switch_register(zend_observer_fiber_switch_handler handler);
+void zend_observer_fiber_destroy_register(zend_observer_fiber_destroy_handler handler);
diff --git a/vendor/open-telemetry/exporter-otlp/AttributesConverter.php b/vendor/open-telemetry/exporter-otlp/AttributesConverter.php
new file mode 100644
index 000000000..4a349ab67
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/AttributesConverter.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use function is_array;
+use function is_bool;
+use function is_float;
+use function is_int;
+use function is_string;
+use Opentelemetry\Proto\Common\V1\AnyValue;
+use Opentelemetry\Proto\Common\V1\ArrayValue;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Common\V1\KeyValueList;
+
+final class AttributesConverter
+{
+ public static function convertAnyValue($value): AnyValue
+ {
+ $result = new AnyValue();
+ if (is_array($value)) {
+ if (self::isSimpleArray($value)) {
+ $values = new ArrayValue();
+ foreach ($value as $element) {
+ /** @psalm-suppress InvalidArgument */
+ $values->getValues()[] = self::convertAnyValue($element);
+ }
+ $result->setArrayValue($values);
+ } else {
+ $values = new KeyValueList();
+ foreach ($value as $key => $element) {
+ /** @psalm-suppress InvalidArgument */
+ $values->getValues()[] = new KeyValue(['key' => $key, 'value' => self::convertAnyValue($element)]);
+ }
+ $result->setKvlistValue($values);
+ }
+ }
+ if (is_int($value)) {
+ $result->setIntValue($value);
+ }
+ if (is_bool($value)) {
+ $result->setBoolValue($value);
+ }
+ if (is_float($value)) {
+ $result->setDoubleValue($value);
+ }
+ if (is_string($value)) {
+ $result->setStringValue($value);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Test whether an array is simple (non-KeyValue)
+ */
+ public static function isSimpleArray(array $value): bool
+ {
+ return $value === [] || array_key_first($value) === 0;
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/ContentTypes.php b/vendor/open-telemetry/exporter-otlp/ContentTypes.php
new file mode 100644
index 000000000..8ac70d54a
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/ContentTypes.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+interface ContentTypes
+{
+ public const PROTOBUF = 'application/x-protobuf';
+ public const JSON = 'application/json';
+ public const NDJSON = 'application/x-ndjson';
+}
diff --git a/vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php
new file mode 100644
index 000000000..b50346427
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php
@@ -0,0 +1,145 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Adapter\HttpDiscovery\MessageFactoryResolver;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Resolves non-signal-specific OTLP HTTP endpoints to signal-specific ones according to the specification.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#endpoint-urls-for-otlphttp
+ */
+class HttpEndpointResolver implements HttpEndpointResolverInterface
+{
+ private const SCHEME_ATTRIBUTE = 'scheme';
+ private const HOST_ATTRIBUTE = 'host';
+ private const PORT_ATTRIBUTE = 'port';
+ private const USER_ATTRIBUTE = 'user';
+ private const PASS_ATTRIBUTE = 'pass';
+ private const PATH_ATTRIBUTE = 'path';
+ private const DEFAULT_SCHEME = 'https';
+ private const ROOT_PATH = '/';
+
+ private FactoryResolverInterface $httpFactoryResolver;
+
+ public function __construct(?FactoryResolverInterface $httpFactoryResolver = null)
+ {
+ $this->httpFactoryResolver = $httpFactoryResolver ?? MessageFactoryResolver::create();
+ }
+
+ public static function create(?FactoryResolverInterface $httpFactoryResolver = null): self
+ {
+ return new self($httpFactoryResolver);
+ }
+
+ public function resolve(string $endpoint, string $signal): UriInterface
+ {
+ $components = self::parseEndpoint($endpoint);
+
+ return self::addPort(
+ self::addUserInfo(
+ $this->createDefaultUri($components, $signal),
+ $components
+ ),
+ $components
+ );
+ }
+
+ public function resolveToString(string $endpoint, string $signal): string
+ {
+ return (string) $this->resolve($endpoint, $signal);
+ }
+
+ private function createUri(): UriInterface
+ {
+ return $this->httpFactoryResolver->resolveUriFactory()
+ ->createUri();
+ }
+
+ private function createDefaultUri(array $components, string $signal): UriInterface
+ {
+ if (isset($components[self::SCHEME_ATTRIBUTE])) {
+ self::validateScheme($components[self::SCHEME_ATTRIBUTE]);
+ }
+
+ return $this->createUri()
+ ->withScheme($components[self::SCHEME_ATTRIBUTE] ?? self::DEFAULT_SCHEME)
+ ->withPath(self::resolvePath($components[self::PATH_ATTRIBUTE] ?? self::ROOT_PATH, $signal))
+ ->withHost($components[self::HOST_ATTRIBUTE]);
+ }
+
+ private static function validateScheme(string $protocol): void
+ {
+ if (!in_array($protocol, HttpEndpointResolverInterface::VALID_SCHEMES, true)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Expected protocol to be http or https, given: "%s"',
+ $protocol
+ ));
+ }
+ }
+
+ private static function validateSignal(string $signal): void
+ {
+ if (!in_array($signal, Signals::SIGNALS)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Signal must be one of "%s". Given "%s"',
+ implode(', ', Signals::SIGNALS),
+ $signal
+ ));
+ }
+ }
+
+ private static function parseEndpoint(string $endpoint): array
+ {
+ $result = parse_url($endpoint);
+
+ if (!is_array($result) || !isset($result[self::HOST_ATTRIBUTE])) {
+ throw new InvalidArgumentException(sprintf(
+ 'Failed to parse endpoint "%s"',
+ $endpoint
+ ));
+ }
+
+ return $result;
+ }
+
+ private static function addUserInfo(UriInterface $uri, array $components): UriInterface
+ {
+ if (isset($components[self::USER_ATTRIBUTE])) {
+ $uri = $uri->withUserInfo(
+ $components[self::USER_ATTRIBUTE],
+ $components[self::PASS_ATTRIBUTE] ?? null
+ );
+ }
+
+ return $uri;
+ }
+
+ private static function addPort(UriInterface $uri, array $components): UriInterface
+ {
+ if (isset($components[self::PORT_ATTRIBUTE])) {
+ $uri = $uri->withPort(
+ $components[self::PORT_ATTRIBUTE]
+ );
+ }
+
+ return $uri;
+ }
+
+ private static function resolvePath(string $path, string $signal): string
+ {
+ self::validateSignal($signal);
+
+ return str_replace('//', '/', sprintf('%s/%s', $path, self::getDefaultPath($signal)));
+ }
+
+ private static function getDefaultPath(string $signal): string
+ {
+ return HttpEndpointResolverInterface::DEFAULT_PATHS[$signal];
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php
new file mode 100644
index 000000000..fe165bd8a
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use Psr\Http\Message\UriInterface;
+
+interface HttpEndpointResolverInterface
+{
+ public const TRACE_DEFAULT_PATH = 'v1/traces';
+ public const METRICS_DEFAULT_PATH = 'v1/metrics';
+ public const LOGS_DEFAULT_PATH = 'v1/logs';
+ public const DEFAULT_PATHS = [
+ Signals::TRACE => self::TRACE_DEFAULT_PATH,
+ Signals::METRICS => self::METRICS_DEFAULT_PATH,
+ Signals::LOGS => self::LOGS_DEFAULT_PATH,
+ ];
+ public const VALID_SCHEMES = [
+ 'http',
+ 'https',
+ ];
+
+ public function resolve(string $endpoint, string $signal): UriInterface;
+
+ public function resolveToString(string $endpoint, string $signal): string;
+}
diff --git a/vendor/open-telemetry/exporter-otlp/LogsConverter.php b/vendor/open-telemetry/exporter-otlp/LogsConverter.php
new file mode 100644
index 000000000..1da53ad1f
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/LogsConverter.php
@@ -0,0 +1,142 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest;
+use Opentelemetry\Proto\Common\V1\InstrumentationScope;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Logs\V1\LogRecord;
+use Opentelemetry\Proto\Logs\V1\ResourceLogs;
+use Opentelemetry\Proto\Logs\V1\ScopeLogs;
+use Opentelemetry\Proto\Resource\V1\Resource as Resource_;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Logs\ReadableLogRecord;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class LogsConverter
+{
+ private ProtobufSerializer $serializer;
+
+ public function __construct(?ProtobufSerializer $serializer = null)
+ {
+ $this->serializer = $serializer ?? ProtobufSerializer::getDefault();
+ }
+
+ /**
+ * @param iterable<ReadableLogRecord> $logs
+ * @psalm-suppress InvalidArgument
+ */
+ public function convert(iterable $logs): ExportLogsServiceRequest
+ {
+ $pExportLogsServiceRequest = new ExportLogsServiceRequest();
+ $scopeLogs = [];
+ $resourceLogs = [];
+ $resourceCache = [];
+ $scopeCache = [];
+
+ foreach ($logs as $log) {
+ $resource = $log->getResource();
+ $instrumentationScope = $log->getInstrumentationScope();
+
+ $resourceId = $resourceCache[spl_object_id($resource)] ??= serialize([
+ $resource->getSchemaUrl(),
+ $resource->getAttributes()->toArray(),
+ $resource->getAttributes()->getDroppedAttributesCount(),
+ ]);
+ $instrumentationScopeId = $scopeCache[spl_object_id($instrumentationScope)] ??= serialize([
+ $instrumentationScope->getName(),
+ $instrumentationScope->getVersion(),
+ $instrumentationScope->getSchemaUrl(),
+ $instrumentationScope->getAttributes()->toArray(),
+ $instrumentationScope->getAttributes()->getDroppedAttributesCount(),
+ ]);
+
+ if (($pResourceLogs = $resourceLogs[$resourceId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pExportLogsServiceRequest->getResourceLogs()[]
+ = $resourceLogs[$resourceId]
+ = $pResourceLogs
+ = $this->convertResourceLogs($resource);
+ }
+
+ if (($pScopeLogs = $scopeLogs[$resourceId][$instrumentationScopeId] ?? null) === null) {
+ $pResourceLogs->getScopeLogs()[]
+ = $scopeLogs[$resourceId][$instrumentationScopeId]
+ = $pScopeLogs
+ = $this->convertInstrumentationScope($instrumentationScope);
+ }
+
+ $pScopeLogs->getLogRecords()[] = $this->convertLogRecord($log);
+ }
+
+ return $pExportLogsServiceRequest;
+ }
+
+ private function convertLogRecord(ReadableLogRecord $record): LogRecord
+ {
+ $pLogRecord = new LogRecord();
+ $pLogRecord->setBody(AttributesConverter::convertAnyValue($record->getBody()));
+ $pLogRecord->setTimeUnixNano($record->getTimestamp() ?? 0);
+ $pLogRecord->setObservedTimeUnixNano($record->getObservedTimestamp() ?? 0);
+ $spanContext = $record->getSpanContext();
+ if ($spanContext !== null && $spanContext->isValid()) {
+ $pLogRecord->setTraceId($this->serializer->serializeTraceId($spanContext->getTraceIdBinary()));
+ $pLogRecord->setSpanId($this->serializer->serializeSpanId($spanContext->getSpanIdBinary()));
+ $pLogRecord->setFlags($spanContext->getTraceFlags());
+ }
+ $severityNumber = $record->getSeverityNumber();
+ if ($severityNumber !== null) {
+ $pLogRecord->setSeverityNumber($severityNumber);
+ }
+ $severityText = $record->getSeverityText();
+ if ($severityText !== null) {
+ $pLogRecord->setSeverityText($severityText);
+ }
+ $this->setAttributes($pLogRecord, $record->getAttributes());
+ $pLogRecord->setDroppedAttributesCount($record->getAttributes()->getDroppedAttributesCount());
+
+ return $pLogRecord;
+ }
+
+ private function convertInstrumentationScope(InstrumentationScopeInterface $instrumentationScope): ScopeLogs
+ {
+ $pScopeLogs = new ScopeLogs();
+ $pInstrumentationScope = new InstrumentationScope();
+ $pInstrumentationScope->setName($instrumentationScope->getName());
+ $pInstrumentationScope->setVersion((string) $instrumentationScope->getVersion());
+ $this->setAttributes($pInstrumentationScope, $instrumentationScope->getAttributes());
+ $pInstrumentationScope->setDroppedAttributesCount($instrumentationScope->getAttributes()->getDroppedAttributesCount());
+ $pScopeLogs->setScope($pInstrumentationScope);
+ $pScopeLogs->setSchemaUrl((string) $instrumentationScope->getSchemaUrl());
+
+ return $pScopeLogs;
+ }
+
+ private function convertResourceLogs(ResourceInfo $resource): ResourceLogs
+ {
+ $pResourceLogs = new ResourceLogs();
+ $pResource = new Resource_();
+ $this->setAttributes($pResource, $resource->getAttributes());
+ $pResource->setDroppedAttributesCount($resource->getAttributes()->getDroppedAttributesCount());
+ $pResourceLogs->setResource($pResource);
+
+ return $pResourceLogs;
+ }
+
+ /**
+ * @param Resource_|LogRecord|InstrumentationScope $pElement
+ */
+ private function setAttributes($pElement, AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getAttributes()[] = (new KeyValue())
+ ->setKey($key)
+ ->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ $pElement->setDroppedAttributesCount($attributes->getDroppedAttributesCount());
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/LogsExporter.php b/vendor/open-telemetry/exporter-otlp/LogsExporter.php
new file mode 100644
index 000000000..fb100391f
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/LogsExporter.php
@@ -0,0 +1,85 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceResponse;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\ReadableLogRecord;
+use RuntimeException;
+use Throwable;
+
+/**
+ * @psalm-import-type SUPPORTED_CONTENT_TYPES from ProtobufSerializer
+ */
+class LogsExporter implements LogRecordExporterInterface
+{
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+ private ProtobufSerializer $serializer;
+
+ /**
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public function __construct(TransportInterface $transport)
+ {
+ if (!class_exists('\Google\Protobuf\Api')) {
+ throw new RuntimeException('No protobuf implementation found (ext-protobuf or google/protobuf)');
+ }
+ $this->transport = $transport;
+ $this->serializer = ProtobufSerializer::forTransport($transport);
+ }
+
+ /**
+ * @param iterable<ReadableLogRecord> $batch
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ return $this->transport
+ ->send($this->serializer->serialize((new LogsConverter($this->serializer))->convert($batch)), $cancellation)
+ ->map(function (?string $payload): bool {
+ if ($payload === null) {
+ return true;
+ }
+
+ $serviceResponse = new ExportLogsServiceResponse();
+ $this->serializer->hydrate($serviceResponse, $payload);
+
+ $partialSuccess = $serviceResponse->getPartialSuccess();
+ if ($partialSuccess !== null && $partialSuccess->getRejectedLogRecords()) {
+ self::logError('Export partial success', [
+ 'rejected_logs' => $partialSuccess->getRejectedLogRecords(),
+ 'error_message' => $partialSuccess->getErrorMessage(),
+ ]);
+
+ return false;
+ }
+ if ($partialSuccess !== null && $partialSuccess->getErrorMessage()) {
+ self::logWarning('Export success with warnings/suggestions', ['error_message' => $partialSuccess->getErrorMessage()]);
+ }
+
+ return true;
+ })
+ ->catch(static function (Throwable $throwable): bool {
+ self::logError('Export failure', ['exception' => $throwable]);
+
+ return false;
+ });
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->forceFlush($cancellation);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->shutdown($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php b/vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php
new file mode 100644
index 000000000..17fd68887
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php
@@ -0,0 +1,85 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Defaults;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Registry;
+
+class LogsExporterFactory implements LogRecordExporterFactoryInterface
+{
+ private const DEFAULT_COMPRESSION = 'none';
+
+ private ?TransportFactoryInterface $transportFactory;
+
+ public function __construct(?TransportFactoryInterface $transportFactory = null)
+ {
+ $this->transportFactory = $transportFactory;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public function create(): LogRecordExporterInterface
+ {
+ $protocol = Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_PROTOCOL)
+ ? Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_LOGS_PROTOCOL)
+ : Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_PROTOCOL);
+
+ return new LogsExporter($this->buildTransport($protocol));
+ }
+
+ /**
+ * @psalm-suppress UndefinedClass
+ */
+ private function buildTransport(string $protocol): TransportInterface
+ {
+ $endpoint = $this->getEndpoint($protocol);
+
+ $headers = Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_HEADERS)
+ ? Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_LOGS_HEADERS)
+ : Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_HEADERS);
+ $headers += OtlpUtil::getUserAgentHeader();
+ $compression = $this->getCompression();
+
+ $factoryClass = Registry::transportFactory($protocol);
+ $factory = $this->transportFactory ?: new $factoryClass();
+
+ return $factory->create(
+ $endpoint,
+ Protocols::contentType($protocol),
+ $headers,
+ $compression,
+ );
+ }
+
+ private function getCompression(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_COMPRESSION) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_LOGS_COMPRESSION) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_COMPRESSION, self::DEFAULT_COMPRESSION);
+ }
+
+ private function getEndpoint(string $protocol): string
+ {
+ if (Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_ENDPOINT)) {
+ return Configuration::getString(Variables::OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);
+ }
+ $endpoint = Configuration::has(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ ? Configuration::getString(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ : Defaults::OTEL_EXPORTER_OTLP_ENDPOINT;
+ if ($protocol === Protocols::GRPC) {
+ return $endpoint . OtlpUtil::method(Signals::LOGS);
+ }
+
+ return HttpEndpointResolver::create()->resolveToString($endpoint, Signals::LOGS);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/MetricConverter.php b/vendor/open-telemetry/exporter-otlp/MetricConverter.php
new file mode 100644
index 000000000..584c41365
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/MetricConverter.php
@@ -0,0 +1,265 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use function hex2bin;
+use function is_float;
+use function is_int;
+use function method_exists;
+use Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest;
+use Opentelemetry\Proto\Common\V1\InstrumentationScope;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Metrics\V1\AggregationTemporality;
+use Opentelemetry\Proto\Metrics\V1\Exemplar;
+use Opentelemetry\Proto\Metrics\V1\Gauge;
+use Opentelemetry\Proto\Metrics\V1\Histogram;
+use Opentelemetry\Proto\Metrics\V1\HistogramDataPoint;
+use Opentelemetry\Proto\Metrics\V1\Metric;
+use Opentelemetry\Proto\Metrics\V1\NumberDataPoint;
+use Opentelemetry\Proto\Metrics\V1\ResourceMetrics;
+use Opentelemetry\Proto\Metrics\V1\ScopeMetrics;
+use Opentelemetry\Proto\Metrics\V1\Sum;
+use Opentelemetry\Proto\Resource\V1\Resource as Resource_;
+use OpenTelemetry\SDK;
+use function serialize;
+
+final class MetricConverter
+{
+ private ProtobufSerializer $serializer;
+
+ public function __construct(?ProtobufSerializer $serializer = null)
+ {
+ $this->serializer = $serializer ?? ProtobufSerializer::getDefault();
+ }
+
+ /**
+ * @param iterable<SDK\Metrics\Data\Metric> $batch
+ */
+ public function convert(iterable $batch): ExportMetricsServiceRequest
+ {
+ $pExportMetricsServiceRequest = new ExportMetricsServiceRequest();
+
+ $resourceMetrics = [];
+ $resourceCache = [];
+ $scopeMetrics = [];
+ $scopeCache = [];
+ foreach ($batch as $metric) {
+ $resource = $metric->resource;
+ $instrumentationScope = $metric->instrumentationScope;
+
+ $resourceId = $resourceCache[spl_object_id($resource)] ??= serialize([
+ $resource->getSchemaUrl(),
+ $resource->getAttributes()->toArray(),
+ $resource->getAttributes()->getDroppedAttributesCount(),
+ ]);
+ $instrumentationScopeId = $scopeCache[spl_object_id($instrumentationScope)] ??= serialize([
+ $instrumentationScope->getName(),
+ $instrumentationScope->getVersion(),
+ $instrumentationScope->getSchemaUrl(),
+ $instrumentationScope->getAttributes()->toArray(),
+ $instrumentationScope->getAttributes()->getDroppedAttributesCount(),
+ ]);
+
+ if (($pResourceMetrics = $resourceMetrics[$resourceId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pExportMetricsServiceRequest->getResourceMetrics()[]
+ = $resourceMetrics[$resourceId]
+ = $pResourceMetrics
+ = $this->convertResourceMetrics($resource);
+ }
+
+ if (($pScopeMetrics = $scopeMetrics[$resourceId][$instrumentationScopeId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pResourceMetrics->getScopeMetrics()[]
+ = $scopeMetrics[$resourceId][$instrumentationScopeId]
+ = $pScopeMetrics
+ = $this->convertScopeMetrics($instrumentationScope);
+ }
+
+ /** @psalm-suppress InvalidArgument */
+ $pScopeMetrics->getMetrics()[] = $this->convertMetric($metric);
+ }
+
+ return $pExportMetricsServiceRequest;
+ }
+
+ private function convertResourceMetrics(SDK\Resource\ResourceInfo $resource): ResourceMetrics
+ {
+ $pResourceMetrics = new ResourceMetrics();
+ $pResource = new Resource_();
+ $this->setAttributes($pResource, $resource->getAttributes());
+ $pResourceMetrics->setResource($pResource);
+ $pResourceMetrics->setSchemaUrl((string) $resource->getSchemaUrl());
+
+ return $pResourceMetrics;
+ }
+
+ private function convertScopeMetrics(SDK\Common\Instrumentation\InstrumentationScopeInterface $instrumentationScope): ScopeMetrics
+ {
+ $pScopeMetrics = new ScopeMetrics();
+ $pInstrumentationScope = new InstrumentationScope();
+ $pInstrumentationScope->setName($instrumentationScope->getName());
+ $pInstrumentationScope->setVersion((string) $instrumentationScope->getVersion());
+ $this->setAttributes($pInstrumentationScope, $instrumentationScope->getAttributes());
+ $pScopeMetrics->setScope($pInstrumentationScope);
+ $pScopeMetrics->setSchemaUrl((string) $instrumentationScope->getSchemaUrl());
+
+ return $pScopeMetrics;
+ }
+
+ private function convertMetric(SDK\Metrics\Data\Metric $metric): Metric
+ {
+ $pMetric = new Metric();
+ $pMetric->setName($metric->name);
+ $pMetric->setDescription((string) $metric->description);
+ $pMetric->setUnit((string) $metric->unit);
+
+ $data = $metric->data;
+ if ($data instanceof SDK\Metrics\Data\Gauge) {
+ $pMetric->setGauge($this->convertGauge($data));
+ }
+ if ($data instanceof SDK\Metrics\Data\Histogram) {
+ $pMetric->setHistogram($this->convertHistogram($data));
+ }
+ if ($data instanceof SDK\Metrics\Data\Sum) {
+ $pMetric->setSum($this->convertSum($data));
+ }
+
+ return $pMetric;
+ }
+
+ private function convertTemporality($temporality): int
+ {
+ switch ($temporality) {
+ case SDK\Metrics\Data\Temporality::DELTA:
+ return AggregationTemporality::AGGREGATION_TEMPORALITY_DELTA;
+ case SDK\Metrics\Data\Temporality::CUMULATIVE:
+ return AggregationTemporality::AGGREGATION_TEMPORALITY_CUMULATIVE;
+ }
+
+ // @codeCoverageIgnoreStart
+ return AggregationTemporality::AGGREGATION_TEMPORALITY_UNSPECIFIED;
+ // @codeCoverageIgnoreEnd
+ }
+
+ private function convertGauge(SDK\Metrics\Data\Gauge $gauge): Gauge
+ {
+ $pGauge = new Gauge();
+ foreach ($gauge->dataPoints as $dataPoint) {
+ /** @psalm-suppress InvalidArgument */
+ $pGauge->getDataPoints()[] = $this->convertNumberDataPoint($dataPoint);
+ }
+
+ return $pGauge;
+ }
+
+ private function convertHistogram(SDK\Metrics\Data\Histogram $histogram): Histogram
+ {
+ $pHistogram = new Histogram();
+ foreach ($histogram->dataPoints as $dataPoint) {
+ /** @psalm-suppress InvalidArgument */
+ $pHistogram->getDataPoints()[] = $this->convertHistogramDataPoint($dataPoint);
+ }
+ $pHistogram->setAggregationTemporality($this->convertTemporality($histogram->temporality));
+
+ return $pHistogram;
+ }
+
+ private function convertSum(SDK\Metrics\Data\Sum $sum): Sum
+ {
+ $pSum = new Sum();
+ foreach ($sum->dataPoints as $dataPoint) {
+ /** @psalm-suppress InvalidArgument */
+ $pSum->getDataPoints()[] = $this->convertNumberDataPoint($dataPoint);
+ }
+ $pSum->setAggregationTemporality($this->convertTemporality($sum->temporality));
+ $pSum->setIsMonotonic($sum->monotonic);
+
+ return $pSum;
+ }
+
+ private function convertNumberDataPoint(SDK\Metrics\Data\NumberDataPoint $dataPoint): NumberDataPoint
+ {
+ $pNumberDataPoint = new NumberDataPoint();
+ $this->setAttributes($pNumberDataPoint, $dataPoint->attributes);
+ $pNumberDataPoint->setStartTimeUnixNano($dataPoint->startTimestamp);
+ $pNumberDataPoint->setTimeUnixNano($dataPoint->timestamp);
+ if (is_int($dataPoint->value)) {
+ $pNumberDataPoint->setAsInt($dataPoint->value);
+ }
+ if (is_float($dataPoint->value)) {
+ $pNumberDataPoint->setAsDouble($dataPoint->value);
+ }
+ foreach ($dataPoint->exemplars as $exemplar) {
+ /** @psalm-suppress InvalidArgument */
+ $pNumberDataPoint->getExemplars()[] = $this->convertExemplar($exemplar);
+ }
+
+ return $pNumberDataPoint;
+ }
+
+ private function convertHistogramDataPoint(SDK\Metrics\Data\HistogramDataPoint $dataPoint): HistogramDataPoint
+ {
+ $pHistogramDataPoint = new HistogramDataPoint();
+ $this->setAttributes($pHistogramDataPoint, $dataPoint->attributes);
+ $pHistogramDataPoint->setStartTimeUnixNano($dataPoint->startTimestamp);
+ $pHistogramDataPoint->setTimeUnixNano($dataPoint->timestamp);
+ $pHistogramDataPoint->setCount($dataPoint->count);
+ $pHistogramDataPoint->setSum($dataPoint->sum);
+ /** @phpstan-ignore-next-line */
+ $pHistogramDataPoint->setBucketCounts($dataPoint->bucketCounts);
+ /** @phpstan-ignore-next-line */
+ $pHistogramDataPoint->setExplicitBounds($dataPoint->explicitBounds);
+ foreach ($dataPoint->exemplars as $exemplar) {
+ /** @psalm-suppress InvalidArgument */
+ $pHistogramDataPoint->getExemplars()[] = $this->convertExemplar($exemplar);
+ }
+
+ return $pHistogramDataPoint;
+ }
+
+ private function convertExemplar(SDK\Metrics\Data\Exemplar $exemplar): Exemplar
+ {
+ $pExemplar = new Exemplar();
+ $this->setFilteredAttributes($pExemplar, $exemplar->attributes);
+ $pExemplar->setTimeUnixNano($exemplar->timestamp);
+ $pExemplar->setSpanId($this->serializer->serializeSpanId(hex2bin((string) $exemplar->spanId)));
+ $pExemplar->setTraceId($this->serializer->serializeTraceId(hex2bin((string) $exemplar->traceId)));
+ if (is_int($exemplar->value)) {
+ $pExemplar->setAsInt($exemplar->value);
+ }
+ if (is_float($exemplar->value)) {
+ $pExemplar->setAsDouble($exemplar->value);
+ }
+
+ return $pExemplar;
+ }
+
+ /**
+ * @param Resource_|NumberDataPoint|HistogramDataPoint|InstrumentationScope $pElement
+ */
+ private function setAttributes($pElement, SDK\Common\Attribute\AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getAttributes()[] = $pAttribute = new KeyValue();
+ $pAttribute->setKey($key);
+ $pAttribute->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ if (method_exists($pElement, 'setDroppedAttributesCount')) {
+ $pElement->setDroppedAttributesCount($attributes->getDroppedAttributesCount());
+ }
+ }
+
+ private function setFilteredAttributes(Exemplar $pElement, SDK\Common\Attribute\AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getFilteredAttributes()[] = $pAttribute = new KeyValue();
+ $pAttribute->setKey($key);
+ $pAttribute->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/MetricExporter.php b/vendor/open-telemetry/exporter-otlp/MetricExporter.php
new file mode 100644
index 000000000..efd149c7f
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/MetricExporter.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceResponse;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\PushMetricExporterInterface;
+use RuntimeException;
+use Throwable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/stdout.md#opentelemetry-metrics-exporter---standard-output
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/file-exporter.md#json-file-serialization
+ * @psalm-import-type SUPPORTED_CONTENT_TYPES from ProtobufSerializer
+ */
+final class MetricExporter implements PushMetricExporterInterface, AggregationTemporalitySelectorInterface
+{
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+ private ProtobufSerializer $serializer;
+ /**
+ * @var string|Temporality|null
+ */
+ private $temporality;
+
+ /**
+ * @param string|Temporality|null $temporality
+ *
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public function __construct(TransportInterface $transport, $temporality = null)
+ {
+ if (!class_exists('\Google\Protobuf\Api')) {
+ throw new RuntimeException('No protobuf implementation found (ext-protobuf or google/protobuf)');
+ }
+ $this->transport = $transport;
+ $this->serializer = ProtobufSerializer::forTransport($transport);
+ $this->temporality = $temporality;
+ }
+
+ public function temporality(MetricMetadataInterface $metric)
+ {
+ return $this->temporality ?? $metric->temporality();
+ }
+
+ public function export(iterable $batch): bool
+ {
+ return $this->transport
+ ->send($this->serializer->serialize((new MetricConverter($this->serializer))->convert($batch)))
+ ->map(function (?string $payload): bool {
+ if ($payload === null) {
+ return true;
+ }
+
+ $serviceResponse = new ExportMetricsServiceResponse();
+ $this->serializer->hydrate($serviceResponse, $payload);
+
+ $partialSuccess = $serviceResponse->getPartialSuccess();
+ if ($partialSuccess !== null && $partialSuccess->getRejectedDataPoints()) {
+ self::logError('Export partial success', [
+ 'rejected_data_points' => $partialSuccess->getRejectedDataPoints(),
+ 'error_message' => $partialSuccess->getErrorMessage(),
+ ]);
+
+ return false;
+ }
+ if ($partialSuccess !== null && $partialSuccess->getErrorMessage()) {
+ self::logWarning('Export success with warnings/suggestions', ['error_message' => $partialSuccess->getErrorMessage()]);
+ }
+
+ return true;
+ })
+ ->catch(static function (Throwable $throwable): bool {
+ self::logError('Export failure', ['exception' => $throwable]);
+
+ return false;
+ })
+ ->await();
+ }
+
+ public function shutdown(): bool
+ {
+ return $this->transport->shutdown();
+ }
+
+ public function forceFlush(): bool
+ {
+ return $this->transport->forceFlush();
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php b/vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php
new file mode 100644
index 000000000..284428b73
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php
@@ -0,0 +1,110 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Defaults;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+use OpenTelemetry\SDK\Registry;
+
+class MetricExporterFactory implements MetricExporterFactoryInterface
+{
+ private const DEFAULT_COMPRESSION = 'none';
+
+ private ?TransportFactoryInterface $transportFactory;
+
+ public function __construct(?TransportFactoryInterface $transportFactory = null)
+ {
+ $this->transportFactory = $transportFactory;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public function create(): MetricExporterInterface
+ {
+ $protocol = Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_PROTOCOL)
+ ? Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_METRICS_PROTOCOL)
+ : Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_PROTOCOL);
+ $temporality = $this->getTemporality();
+
+ return new MetricExporter($this->buildTransport($protocol), $temporality);
+ }
+
+ /**
+ * @psalm-suppress UndefinedClass
+ */
+ private function buildTransport(string $protocol): TransportInterface
+ {
+ /**
+ * @todo (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#periodic-exporting-metricreader)
+ * - OTEL_METRIC_EXPORT_INTERVAL
+ * - OTEL_METRIC_EXPORT_TIMEOUT
+ */
+ $endpoint = $this->getEndpoint($protocol);
+
+ $headers = Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_HEADERS)
+ ? Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_METRICS_HEADERS)
+ : Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_HEADERS);
+ $headers += OtlpUtil::getUserAgentHeader();
+ $compression = $this->getCompression();
+
+ $factoryClass = Registry::transportFactory($protocol);
+ $factory = $this->transportFactory ?: new $factoryClass();
+
+ return $factory->create(
+ $endpoint,
+ Protocols::contentType($protocol),
+ $headers,
+ $compression,
+ );
+ }
+
+ /**
+ * @todo return string|Temporality|null (php >= 8.0)
+ */
+ private function getTemporality()
+ {
+ $value = Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE);
+ switch (strtolower($value)) {
+ case 'cumulative':
+ return Temporality::CUMULATIVE;
+ case 'delta':
+ return Temporality::DELTA;
+ case 'lowmemory':
+ return null;
+ default:
+ throw new \UnexpectedValueException('Unknown temporality: ' . $value);
+ }
+ }
+
+ private function getCompression(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_COMPRESSION) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_METRICS_COMPRESSION) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_COMPRESSION, self::DEFAULT_COMPRESSION);
+ }
+
+ private function getEndpoint(string $protocol): string
+ {
+ if (Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)) {
+ return Configuration::getString(Variables::OTEL_EXPORTER_OTLP_METRICS_ENDPOINT);
+ }
+ $endpoint = Configuration::has(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ ? Configuration::getString(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ : Defaults::OTEL_EXPORTER_OTLP_ENDPOINT;
+ if ($protocol === Protocols::GRPC) {
+ return $endpoint . OtlpUtil::method(Signals::METRICS);
+ }
+
+ return HttpEndpointResolver::create()->resolveToString($endpoint, Signals::METRICS);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php b/vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php
new file mode 100644
index 000000000..5cf3ff9e4
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\SDK\Common\Export\Http\PsrTransport;
+use OpenTelemetry\SDK\Common\Export\Http\PsrTransportFactory;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+
+class OtlpHttpTransportFactory implements TransportFactoryInterface
+{
+ private const DEFAULT_COMPRESSION = 'none';
+
+ public function create(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): PsrTransport {
+ if ($compression === self::DEFAULT_COMPRESSION) {
+ $compression = null;
+ }
+
+ return PsrTransportFactory::discover()->create($endpoint, $contentType, $headers, $compression, $timeout, $retryDelay, $maxRetries, $cacert, $cert, $key);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/OtlpUtil.php b/vendor/open-telemetry/exporter-otlp/OtlpUtil.php
new file mode 100644
index 000000000..6901c1324
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/OtlpUtil.php
@@ -0,0 +1,45 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Resource\Detectors\Sdk;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use UnexpectedValueException;
+
+class OtlpUtil
+{
+ /**
+ * gRPC per-signal methods
+ * @see protobuf *ServiceClient
+ */
+ private const METHODS = [
+ Signals::TRACE => '/opentelemetry.proto.collector.trace.v1.TraceService/Export',
+ Signals::METRICS => '/opentelemetry.proto.collector.metrics.v1.MetricsService/Export',
+ Signals::LOGS => '/opentelemetry.proto.collector.logs.v1.LogsService/Export',
+ ];
+
+ public static function method(string $signal): string
+ {
+ if (!array_key_exists($signal, self::METHODS)) {
+ throw new UnexpectedValueException('gRPC method not defined for signal: ' . $signal);
+ }
+
+ return self::METHODS[$signal];
+ }
+
+ /**
+ * @link https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#user-agent
+ */
+ public static function getUserAgentHeader(): array
+ {
+ $resource = (new Sdk())->getResource();
+
+ return ['User-Agent' => sprintf(
+ 'OTel OTLP Exporter PHP/%s',
+ $resource->getAttributes()->get(ResourceAttributes::TELEMETRY_SDK_VERSION) ?: 'unknown'
+ )];
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php b/vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php
new file mode 100644
index 000000000..c244d0066
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php
@@ -0,0 +1,115 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use AssertionError;
+use function base64_decode;
+use function bin2hex;
+use Exception;
+use Google\Protobuf\Internal\Message;
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use function sprintf;
+
+/**
+ * @internal
+ *
+ * @psalm-type SUPPORTED_CONTENT_TYPES = self::PROTOBUF|self::JSON|self::NDJSON
+ */
+final class ProtobufSerializer
+{
+ private const PROTOBUF = 'application/x-protobuf';
+ private const JSON = 'application/json';
+ private const NDJSON = 'application/x-ndjson';
+
+ private string $contentType;
+
+ private function __construct(string $contentType)
+ {
+ $this->contentType = $contentType;
+ }
+
+ public static function getDefault(): ProtobufSerializer
+ {
+ return new self(self::PROTOBUF);
+ }
+
+ /**
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public static function forTransport(TransportInterface $transport): ProtobufSerializer
+ {
+ switch ($contentType = $transport->contentType()) {
+ case self::PROTOBUF:
+ case self::JSON:
+ case self::NDJSON:
+ return new self($contentType);
+ default:
+ throw new InvalidArgumentException(sprintf('Not supported content type "%s"', $contentType));
+ }
+ }
+
+ public function serializeTraceId(string $traceId): string
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ return $traceId;
+ case self::JSON:
+ case self::NDJSON:
+ return base64_decode(bin2hex($traceId));
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ public function serializeSpanId(string $spanId): string
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ return $spanId;
+ case self::JSON:
+ case self::NDJSON:
+ return base64_decode(bin2hex($spanId));
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ public function serialize(Message $message): string
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ return $message->serializeToString();
+ case self::JSON:
+ //@todo https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#json-protobuf-encoding
+ return $message->serializeToJsonString();
+ case self::NDJSON:
+ return $message->serializeToJsonString() . "\n";
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ /**
+ * @throws Exception
+ */
+ public function hydrate(Message $message, string $payload): void
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ $message->mergeFromString($payload);
+
+ break;
+ case self::JSON:
+ case self::NDJSON:
+ // @phan-suppress-next-line PhanParamTooManyInternal
+ $message->mergeFromJsonString($payload, true);
+
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/Protocols.php b/vendor/open-telemetry/exporter-otlp/Protocols.php
new file mode 100644
index 000000000..96b04d8bf
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/Protocols.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\SDK\Common\Configuration\KnownValues;
+use UnexpectedValueException;
+
+class Protocols
+{
+ public const GRPC = KnownValues::VALUE_GRPC;
+ public const HTTP_PROTOBUF = KnownValues::VALUE_HTTP_PROTOBUF;
+ public const HTTP_JSON = KnownValues::VALUE_HTTP_JSON;
+ public const HTTP_NDJSON = KnownValues::VALUE_HTTP_NDJSON;
+ private const PROTOCOLS = [
+ self::GRPC => ContentTypes::PROTOBUF,
+ self::HTTP_PROTOBUF => ContentTypes::PROTOBUF,
+ self::HTTP_JSON => ContentTypes::JSON,
+ self::HTTP_NDJSON => ContentTypes::NDJSON,
+ ];
+
+ public static function validate(string $protocol): void
+ {
+ if (!array_key_exists($protocol, self::PROTOCOLS)) {
+ throw new UnexpectedValueException('Unknown protocol: ' . $protocol);
+ }
+ }
+
+ public static function contentType(string $protocol): string
+ {
+ self::validate($protocol);
+
+ return self::PROTOCOLS[$protocol];
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/README.md b/vendor/open-telemetry/exporter-otlp/README.md
new file mode 100644
index 000000000..a41349da0
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/README.md
@@ -0,0 +1,45 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/exporter-otlp/releases)
+[![Source](https://img.shields.io/badge/source-exporter--otlp-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/Contrib/Otlp)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:exporter--otlp-blue)](https://github.com/opentelemetry-php/exporter-otlp)
+[![Latest Version](http://poser.pugx.org/open-telemetry/exporter-otlp/v/unstable)](https://packagist.org/packages/open-telemetry/exporter-otlp/)
+[![Stable](http://poser.pugx.org/open-telemetry/exporter-otlp/v/stable)](https://packagist.org/packages/open-telemetry/exporter-otlp/)
+
+# OpenTelemetry OTLP exporter
+
+## Documentation
+
+https://opentelemetry.io/docs/instrumentation/php/exporters/#otlp
+
+## Usage
+
+See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/traces/exporters/otlp_http.php
+
+## Http transport
+
+```php
+$transport = (new \OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory())->create('http://collector:4318');
+$exporter = new \OpenTelemetry\Contrib\Otlp\SpanExporter($transport);
+```
+
+## gRPC transport
+
+To export over gRPC, you will need to additionally install the `open-telemetry/transport-grpc` package.
+
+## Protobuf Runtime library
+
+OTLP exporting requires a [protobuf implementation](https://github.com/protocolbuffers/protobuf/tree/main/php).
+
+The `open-telemetry/gen-otlp-protobuf` requires the `google/protobuf` native implementation. It's fine for development, but
+not recommended for production usage.
+
+The recommended option for production is to install the Protobuf C extension for PHP. The extension
+makes exporting _significantly_ more performant. This can be easily installed with the following command:
+
+```shell
+pecl install protobuf
+```
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/exporter-otlp/SpanConverter.php b/vendor/open-telemetry/exporter-otlp/SpanConverter.php
new file mode 100644
index 000000000..1a8b4369e
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/SpanConverter.php
@@ -0,0 +1,187 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Trace as API;
+use Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest;
+use Opentelemetry\Proto\Common\V1\InstrumentationScope;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Resource\V1\Resource as Resource_;
+use Opentelemetry\Proto\Trace\V1\ResourceSpans;
+use Opentelemetry\Proto\Trace\V1\ScopeSpans;
+use Opentelemetry\Proto\Trace\V1\Span;
+use Opentelemetry\Proto\Trace\V1\Span\Event;
+use Opentelemetry\Proto\Trace\V1\Span\Link;
+use Opentelemetry\Proto\Trace\V1\Span\SpanKind;
+use Opentelemetry\Proto\Trace\V1\Status;
+use Opentelemetry\Proto\Trace\V1\Status\StatusCode;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use function serialize;
+use function spl_object_id;
+
+final class SpanConverter
+{
+ private ProtobufSerializer $serializer;
+
+ public function __construct(?ProtobufSerializer $serializer = null)
+ {
+ $this->serializer = $serializer ?? ProtobufSerializer::getDefault();
+ }
+
+ public function convert(iterable $spans): ExportTraceServiceRequest
+ {
+ $pExportTraceServiceRequest = new ExportTraceServiceRequest();
+
+ $resourceSpans = [];
+ $resourceCache = [];
+ $scopeSpans = [];
+ $scopeCache = [];
+ foreach ($spans as $span) {
+ $resource = $span->getResource();
+ $instrumentationScope = $span->getInstrumentationScope();
+
+ $resourceId = $resourceCache[spl_object_id($resource)] ??= serialize([
+ $resource->getSchemaUrl(),
+ $resource->getAttributes()->toArray(),
+ $resource->getAttributes()->getDroppedAttributesCount(),
+ ]);
+ $instrumentationScopeId = $scopeCache[spl_object_id($instrumentationScope)] ??= serialize([
+ $instrumentationScope->getName(),
+ $instrumentationScope->getVersion(),
+ $instrumentationScope->getSchemaUrl(),
+ $instrumentationScope->getAttributes()->toArray(),
+ $instrumentationScope->getAttributes()->getDroppedAttributesCount(),
+ ]);
+
+ if (($pResourceSpans = $resourceSpans[$resourceId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pExportTraceServiceRequest->getResourceSpans()[]
+ = $resourceSpans[$resourceId]
+ = $pResourceSpans
+ = $this->convertResourceSpans($resource);
+ }
+
+ if (($pScopeSpans = $scopeSpans[$resourceId][$instrumentationScopeId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pResourceSpans->getScopeSpans()[]
+ = $scopeSpans[$resourceId][$instrumentationScopeId]
+ = $pScopeSpans
+ = $this->convertScopeSpans($instrumentationScope);
+ }
+
+ /** @psalm-suppress InvalidArgument */
+ $pScopeSpans->getSpans()[] = $this->convertSpan($span);
+ }
+
+ return $pExportTraceServiceRequest;
+ }
+
+ private function convertResourceSpans(ResourceInfo $resource): ResourceSpans
+ {
+ $pResourceSpans = new ResourceSpans();
+ $pResource = new Resource_();
+ $this->setAttributes($pResource, $resource->getAttributes());
+ $pResourceSpans->setResource($pResource);
+ $pResourceSpans->setSchemaUrl((string) $resource->getSchemaUrl());
+
+ return $pResourceSpans;
+ }
+
+ private function convertScopeSpans(InstrumentationScopeInterface $instrumentationScope): ScopeSpans
+ {
+ $pScopeSpans = new ScopeSpans();
+ $pInstrumentationScope = new InstrumentationScope();
+ $pInstrumentationScope->setName($instrumentationScope->getName());
+ $pInstrumentationScope->setVersion((string) $instrumentationScope->getVersion());
+ $this->setAttributes($pInstrumentationScope, $instrumentationScope->getAttributes());
+ $pScopeSpans->setScope($pInstrumentationScope);
+ $pScopeSpans->setSchemaUrl((string) $instrumentationScope->getSchemaUrl());
+
+ return $pScopeSpans;
+ }
+
+ /**
+ * @param Resource_|Span|Event|Link|InstrumentationScope $pElement
+ */
+ private function setAttributes($pElement, AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getAttributes()[] = (new KeyValue())
+ ->setKey($key)
+ ->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ $pElement->setDroppedAttributesCount($attributes->getDroppedAttributesCount());
+ }
+
+ private function convertSpanKind(int $kind): int
+ {
+ switch ($kind) {
+ case API\SpanKind::KIND_INTERNAL: return SpanKind::SPAN_KIND_INTERNAL;
+ case API\SpanKind::KIND_CLIENT: return SpanKind::SPAN_KIND_CLIENT;
+ case API\SpanKind::KIND_SERVER: return SpanKind::SPAN_KIND_SERVER;
+ case API\SpanKind::KIND_PRODUCER: return SpanKind::SPAN_KIND_PRODUCER;
+ case API\SpanKind::KIND_CONSUMER: return SpanKind::SPAN_KIND_CONSUMER;
+ }
+
+ return SpanKind::SPAN_KIND_UNSPECIFIED;
+ }
+
+ private function convertStatusCode(string $status): int
+ {
+ switch ($status) {
+ case API\StatusCode::STATUS_UNSET: return StatusCode::STATUS_CODE_UNSET;
+ case API\StatusCode::STATUS_OK: return StatusCode::STATUS_CODE_OK;
+ case API\StatusCode::STATUS_ERROR: return StatusCode::STATUS_CODE_ERROR;
+ }
+
+ return StatusCode::STATUS_CODE_UNSET;
+ }
+
+ private function convertSpan(SpanDataInterface $span): Span
+ {
+ $pSpan = new Span();
+ $pSpan->setTraceId($this->serializer->serializeTraceId($span->getContext()->getTraceIdBinary()));
+ $pSpan->setSpanId($this->serializer->serializeSpanId($span->getContext()->getSpanIdBinary()));
+ $pSpan->setTraceState((string) $span->getContext()->getTraceState());
+ if ($span->getParentContext()->isValid()) {
+ $pSpan->setParentSpanId($this->serializer->serializeSpanId($span->getParentContext()->getSpanIdBinary()));
+ }
+ $pSpan->setName($span->getName());
+ $pSpan->setKind($this->convertSpanKind($span->getKind()));
+ $pSpan->setStartTimeUnixNano($span->getStartEpochNanos());
+ $pSpan->setEndTimeUnixNano($span->getEndEpochNanos());
+ $this->setAttributes($pSpan, $span->getAttributes());
+
+ foreach ($span->getEvents() as $event) {
+ /** @psalm-suppress InvalidArgument */
+ $pSpan->getEvents()[] = $pEvent = new Event();
+ $pEvent->setTimeUnixNano($event->getEpochNanos());
+ $pEvent->setName($event->getName());
+ $this->setAttributes($pEvent, $event->getAttributes());
+ }
+ $pSpan->setDroppedEventsCount($span->getTotalDroppedEvents());
+
+ foreach ($span->getLinks() as $link) {
+ /** @psalm-suppress InvalidArgument */
+ $pSpan->getLinks()[] = $pLink = new Link();
+ $pLink->setTraceId($this->serializer->serializeTraceId($link->getSpanContext()->getTraceIdBinary()));
+ $pLink->setSpanId($this->serializer->serializeSpanId($link->getSpanContext()->getSpanIdBinary()));
+ $pLink->setTraceState((string) $link->getSpanContext()->getTraceState());
+ $this->setAttributes($pLink, $link->getAttributes());
+ }
+ $pSpan->setDroppedLinksCount($span->getTotalDroppedLinks());
+
+ $pStatus = new Status();
+ $pStatus->setMessage($span->getStatus()->getDescription());
+ $pStatus->setCode($this->convertStatusCode($span->getStatus()->getCode()));
+ $pSpan->setStatus($pStatus);
+
+ return $pSpan;
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/SpanExporter.php b/vendor/open-telemetry/exporter-otlp/SpanExporter.php
new file mode 100644
index 000000000..a496206f4
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/SpanExporter.php
@@ -0,0 +1,81 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceResponse;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use RuntimeException;
+use Throwable;
+
+/**
+ * @psalm-import-type SUPPORTED_CONTENT_TYPES from ProtobufSerializer
+ */
+final class SpanExporter implements SpanExporterInterface
+{
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+ private ProtobufSerializer $serializer;
+
+ /**
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public function __construct(TransportInterface $transport)
+ {
+ if (!class_exists('\Google\Protobuf\Api')) {
+ throw new RuntimeException('No protobuf implementation found (ext-protobuf or google/protobuf)');
+ }
+ $this->transport = $transport;
+ $this->serializer = ProtobufSerializer::forTransport($transport);
+ }
+
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ return $this->transport
+ ->send($this->serializer->serialize((new SpanConverter($this->serializer))->convert($batch)), $cancellation)
+ ->map(function (?string $payload): bool {
+ if ($payload === null) {
+ return true;
+ }
+
+ $serviceResponse = new ExportTraceServiceResponse();
+ $this->serializer->hydrate($serviceResponse, $payload);
+
+ $partialSuccess = $serviceResponse->getPartialSuccess();
+ if ($partialSuccess !== null && $partialSuccess->getRejectedSpans()) {
+ self::logError('Export partial success', [
+ 'rejected_spans' => $partialSuccess->getRejectedSpans(),
+ 'error_message' => $partialSuccess->getErrorMessage(),
+ ]);
+
+ return false;
+ }
+ if ($partialSuccess !== null && $partialSuccess->getErrorMessage()) {
+ self::logWarning('Export success with warnings/suggestions', ['error_message' => $partialSuccess->getErrorMessage()]);
+ }
+
+ return true;
+ })
+ ->catch(static function (Throwable $throwable): bool {
+ self::logError('Export failure', ['exception' => $throwable]);
+
+ return false;
+ });
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->shutdown($cancellation);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->forceFlush($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php b/vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php
new file mode 100644
index 000000000..ce0550735
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php
@@ -0,0 +1,96 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Defaults;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Registry;
+use OpenTelemetry\SDK\Trace\SpanExporter\SpanExporterFactoryInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class SpanExporterFactory implements SpanExporterFactoryInterface
+{
+ use LogsMessagesTrait;
+
+ private ?TransportFactoryInterface $transportFactory;
+
+ private const DEFAULT_COMPRESSION = 'none';
+
+ public function __construct(?TransportFactoryInterface $transportFactory = null)
+ {
+ $this->transportFactory = $transportFactory;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public function create(): SpanExporterInterface
+ {
+ $transport = $this->buildTransport();
+
+ return new SpanExporter($transport);
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ * @psalm-suppress UndefinedClass
+ */
+ private function buildTransport(): TransportInterface
+ {
+ $protocol = $this->getProtocol();
+ $contentType = Protocols::contentType($protocol);
+ $endpoint = $this->getEndpoint($protocol);
+ $headers = $this->getHeaders();
+ $compression = $this->getCompression();
+
+ $factoryClass = Registry::transportFactory($protocol);
+ $factory = $this->transportFactory ?: new $factoryClass();
+
+ return $factory->create($endpoint, $contentType, $headers, $compression);
+ }
+
+ private function getProtocol(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_PROTOCOL);
+ }
+
+ private function getEndpoint(string $protocol): string
+ {
+ if (Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)) {
+ return Configuration::getString(Variables::OTEL_EXPORTER_OTLP_TRACES_ENDPOINT);
+ }
+ $endpoint = Configuration::has(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ ? Configuration::getString(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ : Defaults::OTEL_EXPORTER_OTLP_ENDPOINT;
+ if ($protocol === Protocols::GRPC) {
+ return $endpoint . OtlpUtil::method(Signals::TRACE);
+ }
+
+ return HttpEndpointResolver::create()->resolveToString($endpoint, Signals::TRACE);
+ }
+
+ private function getHeaders(): array
+ {
+ $headers = Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_HEADERS) ?
+ Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_TRACES_HEADERS) :
+ Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_HEADERS);
+
+ return $headers + OtlpUtil::getUserAgentHeader();
+ }
+
+ private function getCompression(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_COMPRESSION) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_TRACES_COMPRESSION) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_COMPRESSION, self::DEFAULT_COMPRESSION);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/_register.php b/vendor/open-telemetry/exporter-otlp/_register.php
new file mode 100644
index 000000000..b3acdc3af
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/_register.php
@@ -0,0 +1,9 @@
+<?php
+
+declare(strict_types=1);
+\OpenTelemetry\SDK\Registry::registerSpanExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\SpanExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\MetricExporterFactory::class);
+
+\OpenTelemetry\SDK\Registry::registerTransportFactory('http', \OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory::class);
+
+\OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\LogsExporterFactory::class);
diff --git a/vendor/open-telemetry/exporter-otlp/composer.json b/vendor/open-telemetry/exporter-otlp/composer.json
new file mode 100644
index 000000000..fdb13362d
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "open-telemetry/exporter-otlp",
+ "description": "OTLP exporter for OpenTelemetry.",
+ "keywords": ["opentelemetry", "otel", "tracing", "metrics", "exporter", "otlp", "grpc", "http"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "php-http/discovery": "^1.14",
+ "open-telemetry/gen-otlp-protobuf": "^1.0",
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/sdk": "^1.0"
+ },
+ "suggest": {
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\Contrib\\Otlp\\": "."
+ },
+ "files": [
+ "_register.php"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/.gitignore b/vendor/open-telemetry/gen-otlp-protobuf/.gitignore
new file mode 100644
index 000000000..b02a72bf6
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/.gitignore
@@ -0,0 +1 @@
+opentelemetry-proto
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php
new file mode 100644
index 000000000..4f1de339a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php
new file mode 100644
index 000000000..54090aeee
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php
new file mode 100644
index 000000000..1cb45f810
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php
new file mode 100644
index 000000000..811dc86c5
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php
new file mode 100644
index 000000000..9af0fcc0f
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php
new file mode 100644
index 000000000..398396939
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php
new file mode 100644
index 000000000..cbb09509a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php
new file mode 100644
index 000000000..70c1d08fb
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php
@@ -0,0 +1,32 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/resource/v1/resource.proto
+
+namespace GPBMetadata\Opentelemetry\Proto\Resource\V1;
+
+class Resource
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ $pool->internalAddGeneratedFile(
+ '
+�
+.opentelemetry/proto/resource/v1/resource.protoopentelemetry.proto.resource.v1"i
+Resource;
+
+attributes ( 2\'.opentelemetry.proto.common.v1.KeyValue
+dropped_attributes_count ( B�
+"io.opentelemetry.proto.resource.v1B ResourceProtoPZ*go.opentelemetry.io/proto/otlp/resource/v1�OpenTelemetry.Proto.Resource.V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php
new file mode 100644
index 000000000..35c1ebbf1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php
new file mode 100644
index 000000000..cf25a1656
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php
new file mode 100644
index 000000000..044cdffdd
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php
@@ -0,0 +1,127 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/logs/v1/logs_service.proto
+
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess</code>
+ */
+class ExportLogsPartialSuccess extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_log_records = 1;</code>
+ */
+ protected $rejected_log_records = 0;
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ */
+ protected $error_message = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $rejected_log_records
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ * @type string $error_message
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Logs\V1\LogsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_log_records = 1;</code>
+ * @return int|string
+ */
+ public function getRejectedLogRecords()
+ {
+ return $this->rejected_log_records;
+ }
+
+ /**
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_log_records = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setRejectedLogRecords($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->rejected_log_records = $var;
+
+ return $this;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @return string
+ */
+ public function getErrorMessage()
+ {
+ return $this->error_message;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setErrorMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->error_message = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php
new file mode 100644
index 000000000..e6f4147c4
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php
@@ -0,0 +1,81 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/logs/v1/logs_service.proto
+
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest</code>
+ */
+class ExportLogsServiceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ */
+ private $resource_logs;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $resource_logs
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Logs\V1\LogsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceLogs()
+ {
+ return $this->resource_logs;
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\ResourceLogs::class);
+ $this->resource_logs = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php
new file mode 100644
index 000000000..34e76a836
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php
@@ -0,0 +1,119 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/logs/v1/logs_service.proto
+
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse</code>
+ */
+class ExportLogsServiceResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;</code>
+ */
+ protected $partial_success = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess $partial_success
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Logs\V1\LogsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;</code>
+ * @return \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess|null
+ */
+ public function getPartialSuccess()
+ {
+ return $this->partial_success;
+ }
+
+ public function hasPartialSuccess()
+ {
+ return isset($this->partial_success);
+ }
+
+ public function clearPartialSuccess()
+ {
+ unset($this->partial_success);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;</code>
+ * @param \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess $var
+ * @return $this
+ */
+ public function setPartialSuccess($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess::class);
+ $this->partial_success = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php
new file mode 100644
index 000000000..e3249d73e
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php
@@ -0,0 +1,53 @@
+<?php
+// GENERATED CODE -- DO NOT EDIT!
+
+// Original file comments:
+// Copyright 2020, OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+/**
+ * Service that can be used to push logs between one Application instrumented with
+ * OpenTelemetry and an collector, or between an collector and a central collector (in this
+ * case logs are sent/received to/from multiple Applications).
+ */
+class LogsServiceClient extends \Grpc\BaseStub {
+
+ /**
+ * @param string $hostname hostname
+ * @param array $opts channel options
+ * @param \Grpc\Channel $channel (optional) re-use channel object
+ */
+ public function __construct($hostname, $opts, $channel = null) {
+ parent::__construct($hostname, $opts, $channel);
+ }
+
+ /**
+ * For performance reasons, it is recommended to keep this RPC
+ * alive for the entire life of the application.
+ * @param \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest $argument input argument
+ * @param array $metadata metadata
+ * @param array $options call options
+ * @return \Grpc\UnaryCall
+ */
+ public function Export(\Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest $argument,
+ $metadata = [], $options = []) {
+ return $this->_simpleRequest('/opentelemetry.proto.collector.logs.v1.LogsService/Export',
+ $argument,
+ ['\Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceResponse', 'decode'],
+ $metadata, $options);
+ }
+
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php
new file mode 100644
index 000000000..872d3b5e0
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php
@@ -0,0 +1,127 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto
+
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess</code>
+ */
+class ExportMetricsPartialSuccess extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_data_points = 1;</code>
+ */
+ protected $rejected_data_points = 0;
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ */
+ protected $error_message = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $rejected_data_points
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ * @type string $error_message
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Metrics\V1\MetricsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_data_points = 1;</code>
+ * @return int|string
+ */
+ public function getRejectedDataPoints()
+ {
+ return $this->rejected_data_points;
+ }
+
+ /**
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_data_points = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setRejectedDataPoints($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->rejected_data_points = $var;
+
+ return $this;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @return string
+ */
+ public function getErrorMessage()
+ {
+ return $this->error_message;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setErrorMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->error_message = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php
new file mode 100644
index 000000000..1fa5ac3bf
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php
@@ -0,0 +1,81 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto
+
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest</code>
+ */
+class ExportMetricsServiceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ */
+ private $resource_metrics;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $resource_metrics
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Metrics\V1\MetricsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceMetrics()
+ {
+ return $this->resource_metrics;
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ResourceMetrics::class);
+ $this->resource_metrics = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php
new file mode 100644
index 000000000..1f3bff5aa
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php
@@ -0,0 +1,119 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto
+
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse</code>
+ */
+class ExportMetricsServiceResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;</code>
+ */
+ protected $partial_success = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess $partial_success
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Metrics\V1\MetricsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;</code>
+ * @return \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess|null
+ */
+ public function getPartialSuccess()
+ {
+ return $this->partial_success;
+ }
+
+ public function hasPartialSuccess()
+ {
+ return isset($this->partial_success);
+ }
+
+ public function clearPartialSuccess()
+ {
+ unset($this->partial_success);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;</code>
+ * @param \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess $var
+ * @return $this
+ */
+ public function setPartialSuccess($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess::class);
+ $this->partial_success = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php
new file mode 100644
index 000000000..b5cddb55a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php
@@ -0,0 +1,53 @@
+<?php
+// GENERATED CODE -- DO NOT EDIT!
+
+// Original file comments:
+// Copyright 2019, OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+/**
+ * Service that can be used to push metrics between one Application
+ * instrumented with OpenTelemetry and a collector, or between a collector and a
+ * central collector.
+ */
+class MetricsServiceClient extends \Grpc\BaseStub {
+
+ /**
+ * @param string $hostname hostname
+ * @param array $opts channel options
+ * @param \Grpc\Channel $channel (optional) re-use channel object
+ */
+ public function __construct($hostname, $opts, $channel = null) {
+ parent::__construct($hostname, $opts, $channel);
+ }
+
+ /**
+ * For performance reasons, it is recommended to keep this RPC
+ * alive for the entire life of the application.
+ * @param \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest $argument input argument
+ * @param array $metadata metadata
+ * @param array $options call options
+ * @return \Grpc\UnaryCall
+ */
+ public function Export(\Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest $argument,
+ $metadata = [], $options = []) {
+ return $this->_simpleRequest('/opentelemetry.proto.collector.metrics.v1.MetricsService/Export',
+ $argument,
+ ['\Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceResponse', 'decode'],
+ $metadata, $options);
+ }
+
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php
new file mode 100644
index 000000000..56bf54dda
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php
@@ -0,0 +1,127 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess</code>
+ */
+class ExportTracePartialSuccess extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_spans = 1;</code>
+ */
+ protected $rejected_spans = 0;
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ */
+ protected $error_message = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $rejected_spans
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ * @type string $error_message
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Trace\V1\TraceService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_spans = 1;</code>
+ * @return int|string
+ */
+ public function getRejectedSpans()
+ {
+ return $this->rejected_spans;
+ }
+
+ /**
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_spans = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setRejectedSpans($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->rejected_spans = $var;
+
+ return $this;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @return string
+ */
+ public function getErrorMessage()
+ {
+ return $this->error_message;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setErrorMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->error_message = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php
new file mode 100644
index 000000000..dc8bced18
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php
@@ -0,0 +1,81 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest</code>
+ */
+class ExportTraceServiceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ */
+ private $resource_spans;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $resource_spans
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Trace\V1\TraceService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceSpans()
+ {
+ return $this->resource_spans;
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\ResourceSpans::class);
+ $this->resource_spans = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php
new file mode 100644
index 000000000..27b03030a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php
@@ -0,0 +1,119 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse</code>
+ */
+class ExportTraceServiceResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;</code>
+ */
+ protected $partial_success = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess $partial_success
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Trace\V1\TraceService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;</code>
+ * @return \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess|null
+ */
+ public function getPartialSuccess()
+ {
+ return $this->partial_success;
+ }
+
+ public function hasPartialSuccess()
+ {
+ return isset($this->partial_success);
+ }
+
+ public function clearPartialSuccess()
+ {
+ unset($this->partial_success);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;</code>
+ * @param \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess $var
+ * @return $this
+ */
+ public function setPartialSuccess($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess::class);
+ $this->partial_success = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php
new file mode 100644
index 000000000..7a676b3e1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php
@@ -0,0 +1,53 @@
+<?php
+// GENERATED CODE -- DO NOT EDIT!
+
+// Original file comments:
+// Copyright 2019, OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+/**
+ * Service that can be used to push spans between one Application instrumented with
+ * OpenTelemetry and a collector, or between a collector and a central collector (in this
+ * case spans are sent/received to/from multiple Applications).
+ */
+class TraceServiceClient extends \Grpc\BaseStub {
+
+ /**
+ * @param string $hostname hostname
+ * @param array $opts channel options
+ * @param \Grpc\Channel $channel (optional) re-use channel object
+ */
+ public function __construct($hostname, $opts, $channel = null) {
+ parent::__construct($hostname, $opts, $channel);
+ }
+
+ /**
+ * For performance reasons, it is recommended to keep this RPC
+ * alive for the entire life of the application.
+ * @param \Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest $argument input argument
+ * @param array $metadata metadata
+ * @param array $options call options
+ * @return \Grpc\UnaryCall
+ */
+ public function Export(\Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest $argument,
+ $metadata = [], $options = []) {
+ return $this->_simpleRequest('/opentelemetry.proto.collector.trace.v1.TraceService/Export',
+ $argument,
+ ['\Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceResponse', 'decode'],
+ $metadata, $options);
+ }
+
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
new file mode 100644
index 000000000..89079de89
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
@@ -0,0 +1,240 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * AnyValue is used to represent any type of attribute value. AnyValue may contain a
+ * primitive value such as a string or integer or it may contain an arbitrary nested
+ * object containing arrays, key-value lists and primitives.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.AnyValue</code>
+ */
+class AnyValue extends \Google\Protobuf\Internal\Message
+{
+ protected $value;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $string_value
+ * @type bool $bool_value
+ * @type int|string $int_value
+ * @type float $double_value
+ * @type \Opentelemetry\Proto\Common\V1\ArrayValue $array_value
+ * @type \Opentelemetry\Proto\Common\V1\KeyValueList $kvlist_value
+ * @type string $bytes_value
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string string_value = 1;</code>
+ * @return string
+ */
+ public function getStringValue()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasStringValue()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Generated from protobuf field <code>string string_value = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStringValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>bool bool_value = 2;</code>
+ * @return bool
+ */
+ public function getBoolValue()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasBoolValue()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Generated from protobuf field <code>bool bool_value = 2;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setBoolValue($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>int64 int_value = 3;</code>
+ * @return int|string
+ */
+ public function getIntValue()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasIntValue()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Generated from protobuf field <code>int64 int_value = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setIntValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>double double_value = 4;</code>
+ * @return float
+ */
+ public function getDoubleValue()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasDoubleValue()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Generated from protobuf field <code>double double_value = 4;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setDoubleValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.ArrayValue array_value = 5;</code>
+ * @return \Opentelemetry\Proto\Common\V1\ArrayValue|null
+ */
+ public function getArrayValue()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasArrayValue()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.ArrayValue array_value = 5;</code>
+ * @param \Opentelemetry\Proto\Common\V1\ArrayValue $var
+ * @return $this
+ */
+ public function setArrayValue($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\ArrayValue::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6;</code>
+ * @return \Opentelemetry\Proto\Common\V1\KeyValueList|null
+ */
+ public function getKvlistValue()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasKvlistValue()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValueList $var
+ * @return $this
+ */
+ public function setKvlistValue($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\KeyValueList::class);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>bytes bytes_value = 7;</code>
+ * @return string
+ */
+ public function getBytesValue()
+ {
+ return $this->readOneof(7);
+ }
+
+ public function hasBytesValue()
+ {
+ return $this->hasOneof(7);
+ }
+
+ /**
+ * Generated from protobuf field <code>bytes bytes_value = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setBytesValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->writeOneof(7, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->whichOneof("value");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php
new file mode 100644
index 000000000..eccbba997
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * ArrayValue is a list of AnyValue messages. We need ArrayValue as a message
+ * since oneof in AnyValue does not allow repeated fields.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.ArrayValue</code>
+ */
+class ArrayValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Array of values. The array may be empty (contain 0 elements).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.AnyValue values = 1;</code>
+ */
+ private $values;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\AnyValue[]|\Google\Protobuf\Internal\RepeatedField $values
+ * Array of values. The array may be empty (contain 0 elements).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Array of values. The array may be empty (contain 0 elements).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.AnyValue values = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * Array of values. The array may be empty (contain 0 elements).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.AnyValue values = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\AnyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\AnyValue::class);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php
new file mode 100644
index 000000000..7d012ad19
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php
@@ -0,0 +1,98 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * InstrumentationLibrary is a message representing the instrumentation library information
+ * such as the fully qualified name and version.
+ * InstrumentationLibrary is wire-compatible with InstrumentationScope for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.InstrumentationLibrary</code>
+ */
+class InstrumentationLibrary extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An empty instrumentation library name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ */
+ protected $version = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * An empty instrumentation library name means the name is unknown.
+ * @type string $version
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An empty instrumentation library name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * An empty instrumentation library name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php
new file mode 100644
index 000000000..d2b4b6f05
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php
@@ -0,0 +1,164 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * InstrumentationScope is a message representing the instrumentation scope information
+ * such as the fully qualified name and version.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.InstrumentationScope</code>
+ */
+class InstrumentationScope extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An empty instrumentation scope name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ */
+ protected $version = '';
+ /**
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ */
+ private $attributes;
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * An empty instrumentation scope name means the name is unknown.
+ * @type string $version
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An empty instrumentation scope name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * An empty instrumentation scope name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+ /**
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php
new file mode 100644
index 000000000..6dfbdeb40
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php
@@ -0,0 +1,98 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * KeyValue is a key-value pair that is used to store Span attributes, Link
+ * attributes, etc.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.KeyValue</code>
+ */
+class KeyValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ */
+ protected $key = '';
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue value = 2;</code>
+ */
+ protected $value = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * @type \Opentelemetry\Proto\Common\V1\AnyValue $value
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @return string
+ */
+ public function getKey()
+ {
+ return $this->key;
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue value = 2;</code>
+ * @return \Opentelemetry\Proto\Common\V1\AnyValue|null
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ public function hasValue()
+ {
+ return isset($this->value);
+ }
+
+ public function clearValue()
+ {
+ unset($this->value);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue value = 2;</code>
+ * @param \Opentelemetry\Proto\Common\V1\AnyValue $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\AnyValue::class);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php
new file mode 100644
index 000000000..51fb628ae
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php
@@ -0,0 +1,83 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * KeyValueList is a list of KeyValue messages. We need KeyValueList as a message
+ * since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need
+ * a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to
+ * avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches
+ * are semantically equivalent.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.KeyValueList</code>
+ */
+class KeyValueList extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue values = 1;</code>
+ */
+ private $values;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $values
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue values = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue values = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php
new file mode 100644
index 000000000..c508dd1aa
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php
@@ -0,0 +1,88 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version
+ * of KeyValue that only supports string values.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.StringKeyValue</code>
+ */
+class StringKeyValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ */
+ protected $key = '';
+ /**
+ * Generated from protobuf field <code>string value = 2;</code>
+ */
+ protected $value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * @type string $value
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @return string
+ */
+ public function getKey()
+ {
+ return $this->key;
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string value = 2;</code>
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Generated from protobuf field <code>string value = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php
new file mode 100644
index 000000000..e43654641
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php
@@ -0,0 +1,156 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Logs produced by an InstrumentationLibrary.
+ * InstrumentationLibraryLogs is wire-compatible with ScopeLogs for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.InstrumentationLibraryLogs</code>
+ */
+class InstrumentationLibraryLogs extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ */
+ protected $instrumentation_library = null;
+ /**
+ * A list of logs that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ */
+ private $log_records;
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $instrumentation_library
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ * @type \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $log_records
+ * A list of logs that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all logs in the "logs" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationLibrary|null
+ */
+ public function getInstrumentationLibrary()
+ {
+ return $this->instrumentation_library;
+ }
+
+ public function hasInstrumentationLibrary()
+ {
+ return isset($this->instrumentation_library);
+ }
+
+ public function clearInstrumentationLibrary()
+ {
+ unset($this->instrumentation_library);
+ }
+
+ /**
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $var
+ * @return $this
+ */
+ public function setInstrumentationLibrary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationLibrary::class);
+ $this->instrumentation_library = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of logs that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLogRecords()
+ {
+ return $this->log_records;
+ }
+
+ /**
+ * A list of logs that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLogRecords($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\LogRecord::class);
+ $this->log_records = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php
new file mode 100644
index 000000000..caca11f87
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php
@@ -0,0 +1,541 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A log record according to OpenTelemetry Log Data Model:
+ * https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.LogRecord</code>
+ */
+class LogRecord extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 observed_time_unix_nano = 11;</code>
+ */
+ protected $observed_time_unix_nano = 0;
+ /**
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;</code>
+ */
+ protected $severity_number = 0;
+ /**
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ *
+ * Generated from protobuf field <code>string severity_text = 3;</code>
+ */
+ protected $severity_text = '';
+ /**
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue body = 5;</code>
+ */
+ protected $body = null;
+ /**
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;</code>
+ */
+ private $attributes;
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 7;</code>
+ */
+ protected $dropped_attributes_count = 0;
+ /**
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ *
+ * Generated from protobuf field <code>fixed32 flags = 8;</code>
+ */
+ protected $flags = 0;
+ /**
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 9;</code>
+ */
+ protected $trace_id = '';
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes span_id = 10;</code>
+ */
+ protected $span_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ * @type int|string $observed_time_unix_nano
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ * @type int $severity_number
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ * @type string $severity_text
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ * @type \Opentelemetry\Proto\Common\V1\AnyValue $body
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * @type int $flags
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ * @type string $trace_id
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ * @type string $span_id
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 observed_time_unix_nano = 11;</code>
+ * @return int|string
+ */
+ public function getObservedTimeUnixNano()
+ {
+ return $this->observed_time_unix_nano;
+ }
+
+ /**
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 observed_time_unix_nano = 11;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setObservedTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->observed_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;</code>
+ * @return int
+ */
+ public function getSeverityNumber()
+ {
+ return $this->severity_number;
+ }
+
+ /**
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSeverityNumber($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Logs\V1\SeverityNumber::class);
+ $this->severity_number = $var;
+
+ return $this;
+ }
+
+ /**
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ *
+ * Generated from protobuf field <code>string severity_text = 3;</code>
+ * @return string
+ */
+ public function getSeverityText()
+ {
+ return $this->severity_text;
+ }
+
+ /**
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ *
+ * Generated from protobuf field <code>string severity_text = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSeverityText($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->severity_text = $var;
+
+ return $this;
+ }
+
+ /**
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue body = 5;</code>
+ * @return \Opentelemetry\Proto\Common\V1\AnyValue|null
+ */
+ public function getBody()
+ {
+ return $this->body;
+ }
+
+ public function hasBody()
+ {
+ return isset($this->body);
+ }
+
+ public function clearBody()
+ {
+ unset($this->body);
+ }
+
+ /**
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue body = 5;</code>
+ * @param \Opentelemetry\Proto\Common\V1\AnyValue $var
+ * @return $this
+ */
+ public function setBody($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\AnyValue::class);
+ $this->body = $var;
+
+ return $this;
+ }
+
+ /**
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 7;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ *
+ * Generated from protobuf field <code>fixed32 flags = 8;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ *
+ * Generated from protobuf field <code>fixed32 flags = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 9;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 9;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes span_id = 10;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes span_id = 10;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php
new file mode 100644
index 000000000..de6f38899
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php
@@ -0,0 +1,58 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use UnexpectedValueException;
+
+/**
+ * LogRecordFlags is defined as a protobuf 'uint32' type and is to be used as
+ * bit-fields. Each non-zero value defined in this enum is a bit-mask.
+ * To extract the bit-field, for example, use an expression like:
+ * (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)
+ *
+ * Protobuf type <code>opentelemetry.proto.logs.v1.LogRecordFlags</code>
+ */
+class LogRecordFlags
+{
+ /**
+ * The zero value for the enum. Should not be used for comparisons.
+ * Instead use bitwise "and" with the appropriate mask as shown above.
+ *
+ * Generated from protobuf enum <code>LOG_RECORD_FLAGS_DO_NOT_USE = 0;</code>
+ */
+ const LOG_RECORD_FLAGS_DO_NOT_USE = 0;
+ /**
+ * Bits 0-7 are used for trace flags.
+ *
+ * Generated from protobuf enum <code>LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;</code>
+ */
+ const LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;
+
+ private static $valueToName = [
+ self::LOG_RECORD_FLAGS_DO_NOT_USE => 'LOG_RECORD_FLAGS_DO_NOT_USE',
+ self::LOG_RECORD_FLAGS_TRACE_FLAGS_MASK => 'LOG_RECORD_FLAGS_TRACE_FLAGS_MASK',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php
new file mode 100644
index 000000000..90db06035
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php
@@ -0,0 +1,90 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * LogsData represents the logs data that can be stored in a persistent storage,
+ * OR can be embedded by other protocols that transfer OTLP logs data but do not
+ * implement the OTLP protocol.
+ * The main difference between this message and collector protocol is that
+ * in this message there will not be any "control" or "metadata" specific to
+ * OTLP protocol.
+ * When new fields are added into this message, the OTLP request MUST be updated
+ * as well.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.LogsData</code>
+ */
+class LogsData extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ */
+ private $resource_logs;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $resource_logs
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceLogs()
+ {
+ return $this->resource_logs;
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\ResourceLogs::class);
+ $this->resource_logs = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php
new file mode 100644
index 000000000..2049339d4
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of ScopeLogs from a Resource.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.ResourceLogs</code>
+ */
+class ResourceLogs extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * A list of ScopeLogs that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;</code>
+ */
+ private $scope_logs;
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ * @type \Opentelemetry\Proto\Logs\V1\ScopeLogs[]|\Google\Protobuf\Internal\RepeatedField $scope_logs
+ * A list of ScopeLogs that originate from a resource.
+ * @type string $schema_url
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource|null
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of ScopeLogs that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getScopeLogs()
+ {
+ return $this->scope_logs;
+ }
+
+ /**
+ * A list of ScopeLogs that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\ScopeLogs[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setScopeLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\ScopeLogs::class);
+ $this->scope_logs = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php
new file mode 100644
index 000000000..8c5a94821
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Logs produced by a Scope.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.ScopeLogs</code>
+ */
+class ScopeLogs extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ */
+ protected $scope = null;
+ /**
+ * A list of log records.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ */
+ private $log_records;
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationScope $scope
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ * @type \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $log_records
+ * A list of log records.
+ * @type string $schema_url
+ * This schema_url applies to all logs in the "logs" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationScope|null
+ */
+ public function getScope()
+ {
+ return $this->scope;
+ }
+
+ public function hasScope()
+ {
+ return isset($this->scope);
+ }
+
+ public function clearScope()
+ {
+ unset($this->scope);
+ }
+
+ /**
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationScope $var
+ * @return $this
+ */
+ public function setScope($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationScope::class);
+ $this->scope = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of log records.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLogRecords()
+ {
+ return $this->log_records;
+ }
+
+ /**
+ * A list of log records.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLogRecords($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\LogRecord::class);
+ $this->log_records = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php
new file mode 100644
index 000000000..ad89442b0
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php
@@ -0,0 +1,167 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use UnexpectedValueException;
+
+/**
+ * Possible values for LogRecord.SeverityNumber.
+ *
+ * Protobuf type <code>opentelemetry.proto.logs.v1.SeverityNumber</code>
+ */
+class SeverityNumber
+{
+ /**
+ * UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.
+ *
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_UNSPECIFIED = 0;</code>
+ */
+ const SEVERITY_NUMBER_UNSPECIFIED = 0;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE = 1;</code>
+ */
+ const SEVERITY_NUMBER_TRACE = 1;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE2 = 2;</code>
+ */
+ const SEVERITY_NUMBER_TRACE2 = 2;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE3 = 3;</code>
+ */
+ const SEVERITY_NUMBER_TRACE3 = 3;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE4 = 4;</code>
+ */
+ const SEVERITY_NUMBER_TRACE4 = 4;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG = 5;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG = 5;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG2 = 6;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG2 = 6;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG3 = 7;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG3 = 7;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG4 = 8;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG4 = 8;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO = 9;</code>
+ */
+ const SEVERITY_NUMBER_INFO = 9;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO2 = 10;</code>
+ */
+ const SEVERITY_NUMBER_INFO2 = 10;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO3 = 11;</code>
+ */
+ const SEVERITY_NUMBER_INFO3 = 11;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO4 = 12;</code>
+ */
+ const SEVERITY_NUMBER_INFO4 = 12;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN = 13;</code>
+ */
+ const SEVERITY_NUMBER_WARN = 13;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN2 = 14;</code>
+ */
+ const SEVERITY_NUMBER_WARN2 = 14;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN3 = 15;</code>
+ */
+ const SEVERITY_NUMBER_WARN3 = 15;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN4 = 16;</code>
+ */
+ const SEVERITY_NUMBER_WARN4 = 16;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR = 17;</code>
+ */
+ const SEVERITY_NUMBER_ERROR = 17;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR2 = 18;</code>
+ */
+ const SEVERITY_NUMBER_ERROR2 = 18;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR3 = 19;</code>
+ */
+ const SEVERITY_NUMBER_ERROR3 = 19;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR4 = 20;</code>
+ */
+ const SEVERITY_NUMBER_ERROR4 = 20;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL = 21;</code>
+ */
+ const SEVERITY_NUMBER_FATAL = 21;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL2 = 22;</code>
+ */
+ const SEVERITY_NUMBER_FATAL2 = 22;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL3 = 23;</code>
+ */
+ const SEVERITY_NUMBER_FATAL3 = 23;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL4 = 24;</code>
+ */
+ const SEVERITY_NUMBER_FATAL4 = 24;
+
+ private static $valueToName = [
+ self::SEVERITY_NUMBER_UNSPECIFIED => 'SEVERITY_NUMBER_UNSPECIFIED',
+ self::SEVERITY_NUMBER_TRACE => 'SEVERITY_NUMBER_TRACE',
+ self::SEVERITY_NUMBER_TRACE2 => 'SEVERITY_NUMBER_TRACE2',
+ self::SEVERITY_NUMBER_TRACE3 => 'SEVERITY_NUMBER_TRACE3',
+ self::SEVERITY_NUMBER_TRACE4 => 'SEVERITY_NUMBER_TRACE4',
+ self::SEVERITY_NUMBER_DEBUG => 'SEVERITY_NUMBER_DEBUG',
+ self::SEVERITY_NUMBER_DEBUG2 => 'SEVERITY_NUMBER_DEBUG2',
+ self::SEVERITY_NUMBER_DEBUG3 => 'SEVERITY_NUMBER_DEBUG3',
+ self::SEVERITY_NUMBER_DEBUG4 => 'SEVERITY_NUMBER_DEBUG4',
+ self::SEVERITY_NUMBER_INFO => 'SEVERITY_NUMBER_INFO',
+ self::SEVERITY_NUMBER_INFO2 => 'SEVERITY_NUMBER_INFO2',
+ self::SEVERITY_NUMBER_INFO3 => 'SEVERITY_NUMBER_INFO3',
+ self::SEVERITY_NUMBER_INFO4 => 'SEVERITY_NUMBER_INFO4',
+ self::SEVERITY_NUMBER_WARN => 'SEVERITY_NUMBER_WARN',
+ self::SEVERITY_NUMBER_WARN2 => 'SEVERITY_NUMBER_WARN2',
+ self::SEVERITY_NUMBER_WARN3 => 'SEVERITY_NUMBER_WARN3',
+ self::SEVERITY_NUMBER_WARN4 => 'SEVERITY_NUMBER_WARN4',
+ self::SEVERITY_NUMBER_ERROR => 'SEVERITY_NUMBER_ERROR',
+ self::SEVERITY_NUMBER_ERROR2 => 'SEVERITY_NUMBER_ERROR2',
+ self::SEVERITY_NUMBER_ERROR3 => 'SEVERITY_NUMBER_ERROR3',
+ self::SEVERITY_NUMBER_ERROR4 => 'SEVERITY_NUMBER_ERROR4',
+ self::SEVERITY_NUMBER_FATAL => 'SEVERITY_NUMBER_FATAL',
+ self::SEVERITY_NUMBER_FATAL2 => 'SEVERITY_NUMBER_FATAL2',
+ self::SEVERITY_NUMBER_FATAL3 => 'SEVERITY_NUMBER_FATAL3',
+ self::SEVERITY_NUMBER_FATAL4 => 'SEVERITY_NUMBER_FATAL4',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php
new file mode 100644
index 000000000..bdf9ea2fa
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php
@@ -0,0 +1,113 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigRequest</code>
+ */
+class MetricConfigRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource for which configuration should be returned.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ *
+ * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
+ */
+ protected $last_known_fingerprint = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * Required. The resource for which configuration should be returned.
+ * @type string $last_known_fingerprint
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource for which configuration should be returned.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource
+ */
+ public function getResource()
+ {
+ return isset($this->resource) ? $this->resource : null;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * Required. The resource for which configuration should be returned.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ *
+ * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
+ * @return string
+ */
+ public function getLastKnownFingerprint()
+ {
+ return $this->last_known_fingerprint;
+ }
+
+ /**
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ *
+ * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setLastKnownFingerprint($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->last_known_fingerprint = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php
new file mode 100644
index 000000000..0993a59ea
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php
@@ -0,0 +1,201 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse</code>
+ */
+class MetricConfigResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ *
+ * Generated from protobuf field <code>bytes fingerprint = 1;</code>
+ */
+ protected $fingerprint = '';
+ /**
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule schedules = 2;</code>
+ */
+ private $schedules;
+ /**
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ *
+ * Generated from protobuf field <code>int32 suggested_wait_time_sec = 3;</code>
+ */
+ protected $suggested_wait_time_sec = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $fingerprint
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ * @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule[]|\Google\Protobuf\Internal\RepeatedField $schedules
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ * @type int $suggested_wait_time_sec
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ *
+ * Generated from protobuf field <code>bytes fingerprint = 1;</code>
+ * @return string
+ */
+ public function getFingerprint()
+ {
+ return $this->fingerprint;
+ }
+
+ /**
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ *
+ * Generated from protobuf field <code>bytes fingerprint = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFingerprint($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->fingerprint = $var;
+
+ return $this;
+ }
+
+ /**
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule schedules = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSchedules()
+ {
+ return $this->schedules;
+ }
+
+ /**
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule schedules = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSchedules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule::class);
+ $this->schedules = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ *
+ * Generated from protobuf field <code>int32 suggested_wait_time_sec = 3;</code>
+ * @return int
+ */
+ public function getSuggestedWaitTimeSec()
+ {
+ return $this->suggested_wait_time_sec;
+ }
+
+ /**
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ *
+ * Generated from protobuf field <code>int32 suggested_wait_time_sec = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSuggestedWaitTimeSec($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->suggested_wait_time_sec = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php
new file mode 100644
index 000000000..07091928d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php
@@ -0,0 +1,149 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A Schedule is used to apply a particular scheduling configuration to
+ * a metric. If a metric name matches a schedule's patterns, then the metric
+ * adopts the configuration specified by the schedule.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule</code>
+ */
+class Schedule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
+ */
+ private $exclusion_patterns;
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
+ */
+ private $inclusion_patterns;
+ /**
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ *
+ * Generated from protobuf field <code>int32 period_sec = 3;</code>
+ */
+ protected $period_sec = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $exclusion_patterns
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ * @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $inclusion_patterns
+ * @type int $period_sec
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExclusionPatterns()
+ {
+ return $this->exclusion_patterns;
+ }
+
+ /**
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExclusionPatterns($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern::class);
+ $this->exclusion_patterns = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getInclusionPatterns()
+ {
+ return $this->inclusion_patterns;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setInclusionPatterns($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern::class);
+ $this->inclusion_patterns = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ *
+ * Generated from protobuf field <code>int32 period_sec = 3;</code>
+ * @return int
+ */
+ public function getPeriodSec()
+ {
+ return $this->period_sec;
+ }
+
+ /**
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ *
+ * Generated from protobuf field <code>int32 period_sec = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setPeriodSec($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->period_sec = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Schedule::class, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php
new file mode 100644
index 000000000..839c097fb
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php
@@ -0,0 +1,113 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A light-weight pattern that can match 1 or more
+ * metrics, for which this schedule will apply. The string is used to
+ * match against metric names. It should not exceed 100k characters.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern</code>
+ */
+class Pattern extends \Google\Protobuf\Internal\Message
+{
+ protected $match;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $equals
+ * matches the metric name exactly
+ * @type string $starts_with
+ * prefix-matches the metric name
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * matches the metric name exactly
+ *
+ * Generated from protobuf field <code>string equals = 1;</code>
+ * @return string
+ */
+ public function getEquals()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasEquals()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * matches the metric name exactly
+ *
+ * Generated from protobuf field <code>string equals = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setEquals($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * prefix-matches the metric name
+ *
+ * Generated from protobuf field <code>string starts_with = 2;</code>
+ * @return string
+ */
+ public function getStartsWith()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasStartsWith()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * prefix-matches the metric name
+ *
+ * Generated from protobuf field <code>string starts_with = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStartsWith($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getMatch()
+ {
+ return $this->whichOneof("match");
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Pattern::class, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule_Pattern::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php
new file mode 100644
index 000000000..5486976fc
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule instead.
+ * @deprecated
+ */
+ class MetricConfigResponse_Schedule {}
+}
+class_exists(MetricConfigResponse\Schedule::class);
+@trigger_error('Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php
new file mode 100644
index 000000000..cd516c784
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern instead.
+ * @deprecated
+ */
+ class MetricConfigResponse_Schedule_Pattern {}
+}
+class_exists(MetricConfigResponse\Schedule\Pattern::class);
+@trigger_error('Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule_Pattern is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php
new file mode 100644
index 000000000..93fb0ea97
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php
@@ -0,0 +1,114 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use UnexpectedValueException;
+
+/**
+ * AggregationTemporality defines how a metric aggregator reports aggregated
+ * values. It describes how those values relate to the time interval over
+ * which they are aggregated.
+ *
+ * Protobuf type <code>opentelemetry.proto.metrics.v1.AggregationTemporality</code>
+ */
+class AggregationTemporality
+{
+ /**
+ * UNSPECIFIED is the default AggregationTemporality, it MUST not be used.
+ *
+ * Generated from protobuf enum <code>AGGREGATION_TEMPORALITY_UNSPECIFIED = 0;</code>
+ */
+ const AGGREGATION_TEMPORALITY_UNSPECIFIED = 0;
+ /**
+ * DELTA is an AggregationTemporality for a metric aggregator which reports
+ * changes since last report time. Successive metrics contain aggregation of
+ * values from continuous and non-overlapping intervals.
+ * The values for a DELTA metric are based only on the time interval
+ * associated with one measurement cycle. There is no dependency on
+ * previous measurements like is the case for CUMULATIVE metrics.
+ * For example, consider a system measuring the number of requests that
+ * it receives and reports the sum of these requests every second as a
+ * DELTA metric:
+ * 1. The system starts receiving at time=t_0.
+ * 2. A request is received, the system measures 1 request.
+ * 3. A request is received, the system measures 1 request.
+ * 4. A request is received, the system measures 1 request.
+ * 5. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0 to
+ * t_0+1 with a value of 3.
+ * 6. A request is received, the system measures 1 request.
+ * 7. A request is received, the system measures 1 request.
+ * 8. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0+1 to
+ * t_0+2 with a value of 2.
+ *
+ * Generated from protobuf enum <code>AGGREGATION_TEMPORALITY_DELTA = 1;</code>
+ */
+ const AGGREGATION_TEMPORALITY_DELTA = 1;
+ /**
+ * CUMULATIVE is an AggregationTemporality for a metric aggregator which
+ * reports changes since a fixed start time. This means that current values
+ * of a CUMULATIVE metric depend on all previous measurements since the
+ * start time. Because of this, the sender is required to retain this state
+ * in some form. If this state is lost or invalidated, the CUMULATIVE metric
+ * values MUST be reset and a new fixed start time following the last
+ * reported measurement time sent MUST be used.
+ * For example, consider a system measuring the number of requests that
+ * it receives and reports the sum of these requests every second as a
+ * CUMULATIVE metric:
+ * 1. The system starts receiving at time=t_0.
+ * 2. A request is received, the system measures 1 request.
+ * 3. A request is received, the system measures 1 request.
+ * 4. A request is received, the system measures 1 request.
+ * 5. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0 to
+ * t_0+1 with a value of 3.
+ * 6. A request is received, the system measures 1 request.
+ * 7. A request is received, the system measures 1 request.
+ * 8. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0 to
+ * t_0+2 with a value of 5.
+ * 9. The system experiences a fault and loses state.
+ * 10. The system recovers and resumes receiving at time=t_1.
+ * 11. A request is received, the system measures 1 request.
+ * 12. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_1 to
+ * t_0+1 with a value of 1.
+ * Note: Even though, when reporting changes since last report time, using
+ * CUMULATIVE is valid, it is not recommended. This may cause problems for
+ * systems that do not use start_time to determine when the aggregation
+ * value was reset (e.g. Prometheus).
+ *
+ * Generated from protobuf enum <code>AGGREGATION_TEMPORALITY_CUMULATIVE = 2;</code>
+ */
+ const AGGREGATION_TEMPORALITY_CUMULATIVE = 2;
+
+ private static $valueToName = [
+ self::AGGREGATION_TEMPORALITY_UNSPECIFIED => 'AGGREGATION_TEMPORALITY_UNSPECIFIED',
+ self::AGGREGATION_TEMPORALITY_DELTA => 'AGGREGATION_TEMPORALITY_DELTA',
+ self::AGGREGATION_TEMPORALITY_CUMULATIVE => 'AGGREGATION_TEMPORALITY_CUMULATIVE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php
new file mode 100644
index 000000000..f11029d02
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php
@@ -0,0 +1,61 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use UnexpectedValueException;
+
+/**
+ * DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a
+ * bit-field representing 32 distinct boolean flags. Each flag defined in this
+ * enum is a bit-mask. To test the presence of a single flag in the flags of
+ * a data point, for example, use an expression like:
+ * (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK
+ *
+ * Protobuf type <code>opentelemetry.proto.metrics.v1.DataPointFlags</code>
+ */
+class DataPointFlags
+{
+ /**
+ * The zero value for the enum. Should not be used for comparisons.
+ * Instead use bitwise "and" with the appropriate mask as shown above.
+ *
+ * Generated from protobuf enum <code>DATA_POINT_FLAGS_DO_NOT_USE = 0;</code>
+ */
+ const DATA_POINT_FLAGS_DO_NOT_USE = 0;
+ /**
+ * This DataPoint is valid but has no recorded value. This value
+ * SHOULD be used to reflect explicitly missing data in a series, as
+ * for an equivalent to the Prometheus "staleness marker".
+ *
+ * Generated from protobuf enum <code>DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1;</code>
+ */
+ const DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1;
+
+ private static $valueToName = [
+ self::DATA_POINT_FLAGS_DO_NOT_USE => 'DATA_POINT_FLAGS_DO_NOT_USE',
+ self::DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK => 'DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php
new file mode 100644
index 000000000..a0387ede1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php
@@ -0,0 +1,269 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A representation of an exemplar, which is a sample input measurement.
+ * Exemplars also hold information about the environment when the measurement
+ * was recorded, for example the span and trace ID of the active span when the
+ * exemplar was recorded.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Exemplar</code>
+ */
+class Exemplar extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;</code>
+ */
+ private $filtered_attributes;
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ */
+ protected $span_id = '';
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ */
+ protected $trace_id = '';
+ protected $value;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $filtered_attributes
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type float $as_double
+ * @type int|string $as_int
+ * @type string $span_id
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * @type string $trace_id
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFilteredAttributes()
+ {
+ return $this->filtered_attributes;
+ }
+
+ /**
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setFilteredAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->filtered_attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 3;</code>
+ * @return float
+ */
+ public function getAsDouble()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasAsDouble()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 3;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setAsDouble($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @return int|string
+ */
+ public function getAsInt()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasAsInt()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setAsInt($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->whichOneof("value");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php
new file mode 100644
index 000000000..2a5c4cc90
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * ExponentialHistogram represents the type of a metric that is calculated by aggregating
+ * as a ExponentialHistogram of all reported double measurements over a time interval.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ExponentialHistogram</code>
+ */
+class ExponentialHistogram extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php
new file mode 100644
index 000000000..62cb6f5d6
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php
@@ -0,0 +1,718 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * ExponentialHistogramDataPoint is a single data point in a timeseries that describes the
+ * time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains
+ * summary statistics for a population of values, it may optionally contain the
+ * distribution of those values across a set of buckets.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint</code>
+ */
+class ExponentialHistogramDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ */
+ protected $sum = null;
+ /**
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ *
+ * Generated from protobuf field <code>sint32 scale = 6;</code>
+ */
+ protected $scale = 0;
+ /**
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ *
+ * Generated from protobuf field <code>fixed64 zero_count = 7;</code>
+ */
+ protected $zero_count = 0;
+ /**
+ * positive carries the positive range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;</code>
+ */
+ protected $positive = null;
+ /**
+ * negative carries the negative range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;</code>
+ */
+ protected $negative = null;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ */
+ protected $flags = 0;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;</code>
+ */
+ private $exemplars;
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 12;</code>
+ */
+ protected $min = null;
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 13;</code>
+ */
+ protected $max = null;
+ /**
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ *
+ * Generated from protobuf field <code>double zero_threshold = 14;</code>
+ */
+ protected $zero_threshold = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ * @type float $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ * @type int $scale
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ * @type int|string $zero_count
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $positive
+ * positive carries the positive range of exponential bucket counts.
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $negative
+ * negative carries the negative range of exponential bucket counts.
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * @type \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * @type float $min
+ * min is the minimum value over (start_time, end_time].
+ * @type float $max
+ * max is the maximum value over (start_time, end_time].
+ * @type float $zero_threshold
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @return float
+ */
+ public function getSum()
+ {
+ return isset($this->sum) ? $this->sum : 0.0;
+ }
+
+ public function hasSum()
+ {
+ return isset($this->sum);
+ }
+
+ public function clearSum()
+ {
+ unset($this->sum);
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ *
+ * Generated from protobuf field <code>sint32 scale = 6;</code>
+ * @return int
+ */
+ public function getScale()
+ {
+ return $this->scale;
+ }
+
+ /**
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ *
+ * Generated from protobuf field <code>sint32 scale = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setScale($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->scale = $var;
+
+ return $this;
+ }
+
+ /**
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ *
+ * Generated from protobuf field <code>fixed64 zero_count = 7;</code>
+ * @return int|string
+ */
+ public function getZeroCount()
+ {
+ return $this->zero_count;
+ }
+
+ /**
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ *
+ * Generated from protobuf field <code>fixed64 zero_count = 7;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setZeroCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->zero_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * positive carries the positive range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets|null
+ */
+ public function getPositive()
+ {
+ return $this->positive;
+ }
+
+ public function hasPositive()
+ {
+ return isset($this->positive);
+ }
+
+ public function clearPositive()
+ {
+ unset($this->positive);
+ }
+
+ /**
+ * positive carries the positive range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $var
+ * @return $this
+ */
+ public function setPositive($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets::class);
+ $this->positive = $var;
+
+ return $this;
+ }
+
+ /**
+ * negative carries the negative range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets|null
+ */
+ public function getNegative()
+ {
+ return $this->negative;
+ }
+
+ public function hasNegative()
+ {
+ return isset($this->negative);
+ }
+
+ public function clearNegative()
+ {
+ unset($this->negative);
+ }
+
+ /**
+ * negative carries the negative range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $var
+ * @return $this
+ */
+ public function setNegative($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets::class);
+ $this->negative = $var;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Exemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 12;</code>
+ * @return float
+ */
+ public function getMin()
+ {
+ return isset($this->min) ? $this->min : 0.0;
+ }
+
+ public function hasMin()
+ {
+ return isset($this->min);
+ }
+
+ public function clearMin()
+ {
+ unset($this->min);
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 12;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMin($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->min = $var;
+
+ return $this;
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 13;</code>
+ * @return float
+ */
+ public function getMax()
+ {
+ return isset($this->max) ? $this->max : 0.0;
+ }
+
+ public function hasMax()
+ {
+ return isset($this->max);
+ }
+
+ public function clearMax()
+ {
+ unset($this->max);
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 13;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMax($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->max = $var;
+
+ return $this;
+ }
+
+ /**
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ *
+ * Generated from protobuf field <code>double zero_threshold = 14;</code>
+ * @return float
+ */
+ public function getZeroThreshold()
+ {
+ return $this->zero_threshold;
+ }
+
+ /**
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ *
+ * Generated from protobuf field <code>double zero_threshold = 14;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setZeroThreshold($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->zero_threshold = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php
new file mode 100644
index 000000000..e1a90a34a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php
@@ -0,0 +1,141 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Buckets are a set of bucket counts, encoded in a contiguous array
+ * of counts.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets</code>
+ */
+class Buckets extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ *
+ * Generated from protobuf field <code>sint32 offset = 1;</code>
+ */
+ protected $offset = 0;
+ /**
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ *
+ * Generated from protobuf field <code>repeated uint64 bucket_counts = 2;</code>
+ */
+ private $bucket_counts;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $offset
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ * @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $bucket_counts
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ *
+ * Generated from protobuf field <code>sint32 offset = 1;</code>
+ * @return int
+ */
+ public function getOffset()
+ {
+ return $this->offset;
+ }
+
+ /**
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ *
+ * Generated from protobuf field <code>sint32 offset = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setOffset($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->offset = $var;
+
+ return $this;
+ }
+
+ /**
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ *
+ * Generated from protobuf field <code>repeated uint64 bucket_counts = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBucketCounts()
+ {
+ return $this->bucket_counts;
+ }
+
+ /**
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ *
+ * Generated from protobuf field <code>repeated uint64 bucket_counts = 2;</code>
+ * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBucketCounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
+ $this->bucket_counts = $arr;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Buckets::class, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint_Buckets::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php
new file mode 100644
index 000000000..a002399a8
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets instead.
+ * @deprecated
+ */
+ class ExponentialHistogramDataPoint_Buckets {}
+}
+class_exists(ExponentialHistogramDataPoint\Buckets::class);
+@trigger_error('Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint_Buckets is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php
new file mode 100644
index 000000000..da56e2a44
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php
@@ -0,0 +1,67 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Gauge represents the type of a scalar metric that always exports the
+ * "current value" for every data point. It should be used for an "unknown"
+ * aggregation.
+ * A Gauge does not support different aggregation temporalities. Given the
+ * aggregation is unknown, points cannot be combined using the same
+ * aggregation, regardless of aggregation temporalities. Therefore,
+ * AggregationTemporality is not included. Consequently, this also means
+ * "StartTimeUnixNano" is ignored for all data points.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Gauge</code>
+ */
+class Gauge extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\NumberDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php
new file mode 100644
index 000000000..e6643b89e
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Histogram represents the type of a metric that is calculated by aggregating
+ * as a Histogram of all reported measurements over a time interval.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Histogram</code>
+ */
+class Histogram extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\HistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\HistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\HistogramDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php
new file mode 100644
index 000000000..2b19dd856
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php
@@ -0,0 +1,565 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * HistogramDataPoint is a single data point in a timeseries that describes the
+ * time-varying values of a Histogram. A Histogram contains summary statistics
+ * for a population of values, it may optionally contain the distribution of
+ * those values across a set of buckets.
+ * If the histogram contains the distribution of values, then both
+ * "explicit_bounds" and "bucket counts" fields must be defined.
+ * If the histogram does not contain the distribution of values, then both
+ * "explicit_bounds" and "bucket_counts" must be omitted and only "count" and
+ * "sum" are known.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.HistogramDataPoint</code>
+ */
+class HistogramDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ */
+ protected $sum = null;
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ */
+ private $bucket_counts;
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ */
+ private $explicit_bounds;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;</code>
+ */
+ private $exemplars;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ */
+ protected $flags = 0;
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 11;</code>
+ */
+ protected $min = null;
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 12;</code>
+ */
+ protected $max = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ * @type float $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ * @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $bucket_counts
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ * @type float[]|\Google\Protobuf\Internal\RepeatedField $explicit_bounds
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ * @type \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * @type float $min
+ * min is the minimum value over (start_time, end_time].
+ * @type float $max
+ * max is the maximum value over (start_time, end_time].
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @return float
+ */
+ public function getSum()
+ {
+ return isset($this->sum) ? $this->sum : 0.0;
+ }
+
+ public function hasSum()
+ {
+ return isset($this->sum);
+ }
+
+ public function clearSum()
+ {
+ unset($this->sum);
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBucketCounts()
+ {
+ return $this->bucket_counts;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBucketCounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FIXED64);
+ $this->bucket_counts = $arr;
+
+ return $this;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExplicitBounds()
+ {
+ return $this->explicit_bounds;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExplicitBounds($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
+ $this->explicit_bounds = $arr;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Exemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 11;</code>
+ * @return float
+ */
+ public function getMin()
+ {
+ return isset($this->min) ? $this->min : 0.0;
+ }
+
+ public function hasMin()
+ {
+ return isset($this->min);
+ }
+
+ public function clearMin()
+ {
+ unset($this->min);
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 11;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMin($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->min = $var;
+
+ return $this;
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 12;</code>
+ * @return float
+ */
+ public function getMax()
+ {
+ return isset($this->max) ? $this->max : 0.0;
+ }
+
+ public function hasMax()
+ {
+ return isset($this->max);
+ }
+
+ public function clearMax()
+ {
+ unset($this->max);
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 12;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMax($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->max = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php
new file mode 100644
index 000000000..807aa1054
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php
@@ -0,0 +1,156 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Metrics produced by an InstrumentationLibrary.
+ * InstrumentationLibraryMetrics is wire-compatible with ScopeMetrics for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics</code>
+ */
+class InstrumentationLibraryMetrics extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ */
+ protected $instrumentation_library = null;
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ */
+ private $metrics;
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $instrumentation_library
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ * @type \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
+ * A list of metrics that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all metrics in the "metrics" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationLibrary|null
+ */
+ public function getInstrumentationLibrary()
+ {
+ return $this->instrumentation_library;
+ }
+
+ public function hasInstrumentationLibrary()
+ {
+ return isset($this->instrumentation_library);
+ }
+
+ public function clearInstrumentationLibrary()
+ {
+ unset($this->instrumentation_library);
+ }
+
+ /**
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $var
+ * @return $this
+ */
+ public function setInstrumentationLibrary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationLibrary::class);
+ $this->instrumentation_library = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetrics()
+ {
+ return $this->metrics;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Metric::class);
+ $this->metrics = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php
new file mode 100644
index 000000000..2eac03fcb
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php
@@ -0,0 +1,227 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntDataPoint is deprecated. Use integer value in NumberDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntDataPoint</code>
+ */
+class IntDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ */
+ private $labels;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * value itself.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 4;</code>
+ */
+ protected $value = 0;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 5;</code>
+ */
+ private $exemplars;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $labels
+ * The set of labels that uniquely identify this timeseries.
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $value
+ * value itself.
+ * @type \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\StringKeyValue::class);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * value itself.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 4;</code>
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * value itself.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 5;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntExemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php
new file mode 100644
index 000000000..319c0ff27
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php
@@ -0,0 +1,235 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntExemplar is deprecated. Use Exemplar with as_int for value
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntExemplar</code>
+ */
+class IntExemplar extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1;</code>
+ */
+ private $filtered_labels;
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * Numerical int value of the measurement that was recorded.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 3;</code>
+ */
+ protected $value = 0;
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ */
+ protected $span_id = '';
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ */
+ protected $trace_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $filtered_labels
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $value
+ * Numerical int value of the measurement that was recorded.
+ * @type string $span_id
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * @type string $trace_id
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFilteredLabels()
+ {
+ return $this->filtered_labels;
+ }
+
+ /**
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setFilteredLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\StringKeyValue::class);
+ $this->filtered_labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Numerical int value of the measurement that was recorded.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 3;</code>
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Numerical int value of the measurement that was recorded.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php
new file mode 100644
index 000000000..37fece6dd
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php
@@ -0,0 +1,60 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntGauge is deprecated. Use Gauge with an integer value in NumberDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntGauge</code>
+ */
+class IntGauge extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php
new file mode 100644
index 000000000..934649310
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntHistogram is deprecated, replaced by Histogram points using double-
+ * valued exemplars.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntHistogram</code>
+ */
+class IntHistogram extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntHistogramDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\IntHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntHistogramDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntHistogramDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntHistogramDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php
new file mode 100644
index 000000000..cf0e4898b
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php
@@ -0,0 +1,393 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntHistogramDataPoint is deprecated; use HistogramDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntHistogramDataPoint</code>
+ */
+class IntHistogramDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ */
+ private $labels;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ *
+ * Generated from protobuf field <code>sfixed64 sum = 5;</code>
+ */
+ protected $sum = 0;
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ */
+ private $bucket_counts;
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ */
+ private $explicit_bounds;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 8;</code>
+ */
+ private $exemplars;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $labels
+ * The set of labels that uniquely identify this timeseries.
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ * @type int|string $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ * @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $bucket_counts
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ * @type float[]|\Google\Protobuf\Internal\RepeatedField $explicit_bounds
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ * @type \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\StringKeyValue::class);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ *
+ * Generated from protobuf field <code>sfixed64 sum = 5;</code>
+ * @return int|string
+ */
+ public function getSum()
+ {
+ return $this->sum;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ *
+ * Generated from protobuf field <code>sfixed64 sum = 5;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBucketCounts()
+ {
+ return $this->bucket_counts;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBucketCounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FIXED64);
+ $this->bucket_counts = $arr;
+
+ return $this;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExplicitBounds()
+ {
+ return $this->explicit_bounds;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExplicitBounds($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
+ $this->explicit_bounds = $arr;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 8;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 8;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntExemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php
new file mode 100644
index 000000000..aaa313d7d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php
@@ -0,0 +1,132 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntSum is deprecated. Use Sum with an integer value in NumberDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntSum</code>
+ */
+class IntSum extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ */
+ protected $is_monotonic = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * @type bool $is_monotonic
+ * If "true" means that the sum is monotonic.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @return bool
+ */
+ public function getIsMonotonic()
+ {
+ return $this->is_monotonic;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setIsMonotonic($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->is_monotonic = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php
new file mode 100644
index 000000000..3d2538314
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php
@@ -0,0 +1,358 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Defines a Metric which has one or more timeseries. The following is a
+ * brief summary of the Metric data model. For more details, see:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md
+ * The data model and relation between entities is shown in the
+ * diagram below. Here, "DataPoint" is the term used to refer to any
+ * one of the specific data point value types, and "points" is the term used
+ * to refer to any one of the lists of points contained in the Metric.
+ * - Metric is composed of a metadata and data.
+ * - Metadata part contains a name, description, unit.
+ * - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
+ * - DataPoint contains timestamps, attributes, and one of the possible value type
+ * fields.
+ * Metric
+ * +------------+
+ * |name |
+ * |description |
+ * |unit | +------------------------------------+
+ * |data |---> |Gauge, Sum, Histogram, Summary, ... |
+ * +------------+ +------------------------------------+
+ * Data [One of Gauge, Sum, Histogram, Summary, ...]
+ * +-----------+
+ * |... | // Metadata about the Data.
+ * |points |--+
+ * +-----------+ |
+ * | +---------------------------+
+ * | |DataPoint 1 |
+ * v |+------+------+ +------+ |
+ * +-----+ ||label |label |...|label | |
+ * | 1 |-->||value1|value2|...|valueN| |
+ * +-----+ |+------+------+ +------+ |
+ * | . | |+-----+ |
+ * | . | ||value| |
+ * | . | |+-----+ |
+ * | . | +---------------------------+
+ * | . | .
+ * | . | .
+ * | . | .
+ * | . | +---------------------------+
+ * | . | |DataPoint M |
+ * +-----+ |+------+------+ +------+ |
+ * | M |-->||label |label |...|label | |
+ * +-----+ ||value1|value2|...|valueN| |
+ * |+------+------+ +------+ |
+ * |+-----+ |
+ * ||value| |
+ * |+-----+ |
+ * +---------------------------+
+ * Each distinct type of DataPoint represents the output of a specific
+ * aggregation function, the result of applying the DataPoint's
+ * associated function of to one or more measurements.
+ * All DataPoint types have three common fields:
+ * - Attributes includes key-value pairs associated with the data point
+ * - TimeUnixNano is required, set to the end time of the aggregation
+ * - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
+ * having an AggregationTemporality field, as discussed below.
+ * Both TimeUnixNano and StartTimeUnixNano values are expressed as
+ * UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * # TimeUnixNano
+ * This field is required, having consistent interpretation across
+ * DataPoint types. TimeUnixNano is the moment corresponding to when
+ * the data point's aggregate value was captured.
+ * Data points with the 0 value for TimeUnixNano SHOULD be rejected
+ * by consumers.
+ * # StartTimeUnixNano
+ * StartTimeUnixNano in general allows detecting when a sequence of
+ * observations is unbroken. This field indicates to consumers the
+ * start time for points with cumulative and delta
+ * AggregationTemporality, and it should be included whenever possible
+ * to support correct rate calculation. Although it may be omitted
+ * when the start time is truly unknown, setting StartTimeUnixNano is
+ * strongly encouraged.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Metric</code>
+ */
+class Metric extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * name of the metric, including its DNS name prefix. It must be unique.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field <code>string description = 2;</code>
+ */
+ protected $description = '';
+ /**
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ *
+ * Generated from protobuf field <code>string unit = 3;</code>
+ */
+ protected $unit = '';
+ protected $data;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * name of the metric, including its DNS name prefix. It must be unique.
+ * @type string $description
+ * description of the metric, which can be used in documentation.
+ * @type string $unit
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ * @type \Opentelemetry\Proto\Metrics\V1\Gauge $gauge
+ * @type \Opentelemetry\Proto\Metrics\V1\Sum $sum
+ * @type \Opentelemetry\Proto\Metrics\V1\Histogram $histogram
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram $exponential_histogram
+ * @type \Opentelemetry\Proto\Metrics\V1\Summary $summary
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * name of the metric, including its DNS name prefix. It must be unique.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * name of the metric, including its DNS name prefix. It must be unique.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field <code>string description = 2;</code>
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field <code>string description = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ *
+ * Generated from protobuf field <code>string unit = 3;</code>
+ * @return string
+ */
+ public function getUnit()
+ {
+ return $this->unit;
+ }
+
+ /**
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ *
+ * Generated from protobuf field <code>string unit = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setUnit($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->unit = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Gauge gauge = 5;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Gauge|null
+ */
+ public function getGauge()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasGauge()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Gauge gauge = 5;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Gauge $var
+ * @return $this
+ */
+ public function setGauge($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Gauge::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Sum sum = 7;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Sum|null
+ */
+ public function getSum()
+ {
+ return $this->readOneof(7);
+ }
+
+ public function hasSum()
+ {
+ return $this->hasOneof(7);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Sum sum = 7;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Sum $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Sum::class);
+ $this->writeOneof(7, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Histogram histogram = 9;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Histogram|null
+ */
+ public function getHistogram()
+ {
+ return $this->readOneof(9);
+ }
+
+ public function hasHistogram()
+ {
+ return $this->hasOneof(9);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Histogram histogram = 9;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Histogram $var
+ * @return $this
+ */
+ public function setHistogram($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Histogram::class);
+ $this->writeOneof(9, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram|null
+ */
+ public function getExponentialHistogram()
+ {
+ return $this->readOneof(10);
+ }
+
+ public function hasExponentialHistogram()
+ {
+ return $this->hasOneof(10);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram $var
+ * @return $this
+ */
+ public function setExponentialHistogram($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram::class);
+ $this->writeOneof(10, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Summary summary = 11;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Summary|null
+ */
+ public function getSummary()
+ {
+ return $this->readOneof(11);
+ }
+
+ public function hasSummary()
+ {
+ return $this->hasOneof(11);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Summary summary = 11;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Summary $var
+ * @return $this
+ */
+ public function setSummary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Summary::class);
+ $this->writeOneof(11, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getData()
+ {
+ return $this->whichOneof("data");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php
new file mode 100644
index 000000000..ce144d8f3
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php
@@ -0,0 +1,90 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * MetricsData represents the metrics data that can be stored in a persistent
+ * storage, OR can be embedded by other protocols that transfer OTLP metrics
+ * data but do not implement the OTLP protocol.
+ * The main difference between this message and collector protocol is that
+ * in this message there will not be any "control" or "metadata" specific to
+ * OTLP protocol.
+ * When new fields are added into this message, the OTLP request MUST be updated
+ * as well.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.MetricsData</code>
+ */
+class MetricsData extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ */
+ private $resource_metrics;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $resource_metrics
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceMetrics()
+ {
+ return $this->resource_metrics;
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ResourceMetrics::class);
+ $this->resource_metrics = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php
new file mode 100644
index 000000000..d9fa829e0
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php
@@ -0,0 +1,309 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * NumberDataPoint is a single data point in a timeseries that describes the
+ * time-varying scalar value of a metric.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.NumberDataPoint</code>
+ */
+class NumberDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;</code>
+ */
+ private $exemplars;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ */
+ protected $flags = 0;
+ protected $value;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type float $as_double
+ * @type int|string $as_int
+ * @type \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 4;</code>
+ * @return float
+ */
+ public function getAsDouble()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasAsDouble()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 4;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setAsDouble($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @return int|string
+ */
+ public function getAsInt()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasAsInt()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setAsInt($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Exemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->whichOneof("value");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php
new file mode 100644
index 000000000..a5e2a7b0d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of ScopeMetrics from a Resource.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ResourceMetrics</code>
+ */
+class ResourceMetrics extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * A list of metrics that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;</code>
+ */
+ private $scope_metrics;
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ * @type \Opentelemetry\Proto\Metrics\V1\ScopeMetrics[]|\Google\Protobuf\Internal\RepeatedField $scope_metrics
+ * A list of metrics that originate from a resource.
+ * @type string $schema_url
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource|null
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of metrics that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getScopeMetrics()
+ {
+ return $this->scope_metrics;
+ }
+
+ /**
+ * A list of metrics that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ScopeMetrics[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setScopeMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ScopeMetrics::class);
+ $this->scope_metrics = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php
new file mode 100644
index 000000000..71f5cdb86
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Metrics produced by an Scope.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ScopeMetrics</code>
+ */
+class ScopeMetrics extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ */
+ protected $scope = null;
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ */
+ private $metrics;
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationScope $scope
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ * @type \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
+ * A list of metrics that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all metrics in the "metrics" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationScope|null
+ */
+ public function getScope()
+ {
+ return $this->scope;
+ }
+
+ public function hasScope()
+ {
+ return isset($this->scope);
+ }
+
+ public function clearScope()
+ {
+ unset($this->scope);
+ }
+
+ /**
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationScope $var
+ * @return $this
+ */
+ public function setScope($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationScope::class);
+ $this->scope = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetrics()
+ {
+ return $this->metrics;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Metric::class);
+ $this->metrics = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php
new file mode 100644
index 000000000..0251ecd9f
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php
@@ -0,0 +1,133 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sum represents the type of a scalar metric that is calculated as a sum of all
+ * reported measurements over a time interval.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Sum</code>
+ */
+class Sum extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ */
+ protected $is_monotonic = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * @type bool $is_monotonic
+ * If "true" means that the sum is monotonic.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\NumberDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @return bool
+ */
+ public function getIsMonotonic()
+ {
+ return $this->is_monotonic;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setIsMonotonic($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->is_monotonic = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php
new file mode 100644
index 000000000..adb5eceb9
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php
@@ -0,0 +1,65 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Summary metric data are used to convey quantile summaries,
+ * a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)
+ * and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)
+ * data type. These data points cannot always be merged in a meaningful way.
+ * While they can be useful in some applications, histogram data points are
+ * recommended for new applications.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Summary</code>
+ */
+class Summary extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php
new file mode 100644
index 000000000..30cf4ade4
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php
@@ -0,0 +1,336 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * SummaryDataPoint is a single data point in a timeseries that describes the
+ * time-varying values of a Summary metric.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.SummaryDataPoint</code>
+ */
+class SummaryDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be non-negative.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ *
+ * Generated from protobuf field <code>double sum = 5;</code>
+ */
+ protected $sum = 0.0;
+ /**
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;</code>
+ */
+ private $quantile_values;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ */
+ protected $flags = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be non-negative.
+ * @type float $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ * @type \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile[]|\Google\Protobuf\Internal\RepeatedField $quantile_values
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ *
+ * Generated from protobuf field <code>double sum = 5;</code>
+ * @return float
+ */
+ public function getSum()
+ {
+ return $this->sum;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ *
+ * Generated from protobuf field <code>double sum = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getQuantileValues()
+ {
+ return $this->quantile_values;
+ }
+
+ /**
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setQuantileValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile::class);
+ $this->quantile_values = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php
new file mode 100644
index 000000000..8200b6d26
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php
@@ -0,0 +1,117 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1\SummaryDataPoint;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Represents the value at a given quantile of a distribution.
+ * To record Min and Max values following conventions are used:
+ * - The 1.0 quantile is equivalent to the maximum value observed.
+ * - The 0.0 quantile is equivalent to the minimum value observed.
+ * See the following issue for more context:
+ * https://github.com/open-telemetry/opentelemetry-proto/issues/125
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile</code>
+ */
+class ValueAtQuantile extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double quantile = 1;</code>
+ */
+ protected $quantile = 0.0;
+ /**
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ *
+ * Generated from protobuf field <code>double value = 2;</code>
+ */
+ protected $value = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $quantile
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ * @type float $value
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double quantile = 1;</code>
+ * @return float
+ */
+ public function getQuantile()
+ {
+ return $this->quantile;
+ }
+
+ /**
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double quantile = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setQuantile($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->quantile = $var;
+
+ return $this;
+ }
+
+ /**
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ *
+ * Generated from protobuf field <code>double value = 2;</code>
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ *
+ * Generated from protobuf field <code>double value = 2;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ValueAtQuantile::class, \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint_ValueAtQuantile::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php
new file mode 100644
index 000000000..c1f41e749
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile instead.
+ * @deprecated
+ */
+ class SummaryDataPoint_ValueAtQuantile {}
+}
+class_exists(SummaryDataPoint\ValueAtQuantile::class);
+@trigger_error('Opentelemetry\Proto\Metrics\V1\SummaryDataPoint_ValueAtQuantile is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php
new file mode 100644
index 000000000..d9062eeb1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php
@@ -0,0 +1,113 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/resource/v1/resource.proto
+
+namespace Opentelemetry\Proto\Resource\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Resource information.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.resource.v1.Resource</code>
+ */
+class Resource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 2;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Resource\V1\Resource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 2;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php
new file mode 100644
index 000000000..c21482623
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php
@@ -0,0 +1,60 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sampler that always makes a constant decision on span sampling.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.ConstantSampler</code>
+ */
+class ConstantSampler extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision decision = 1;</code>
+ */
+ protected $decision = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $decision
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision decision = 1;</code>
+ * @return int
+ */
+ public function getDecision()
+ {
+ return $this->decision;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision decision = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDecision($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Trace\V1\ConstantSampler\ConstantDecision::class);
+ $this->decision = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php
new file mode 100644
index 000000000..04c1950ca
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php
@@ -0,0 +1,61 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1\ConstantSampler;
+
+use UnexpectedValueException;
+
+/**
+ * How spans should be sampled:
+ * - Always off
+ * - Always on
+ * - Always follow the parent Span's decision (off if no parent).
+ *
+ * Protobuf type <code>opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision</code>
+ */
+class ConstantDecision
+{
+ /**
+ * Generated from protobuf enum <code>ALWAYS_OFF = 0;</code>
+ */
+ const ALWAYS_OFF = 0;
+ /**
+ * Generated from protobuf enum <code>ALWAYS_ON = 1;</code>
+ */
+ const ALWAYS_ON = 1;
+ /**
+ * Generated from protobuf enum <code>ALWAYS_PARENT = 2;</code>
+ */
+ const ALWAYS_PARENT = 2;
+
+ private static $valueToName = [
+ self::ALWAYS_OFF => 'ALWAYS_OFF',
+ self::ALWAYS_ON => 'ALWAYS_ON',
+ self::ALWAYS_PARENT => 'ALWAYS_PARENT',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ConstantDecision::class, \Opentelemetry\Proto\Trace\V1\ConstantSampler_ConstantDecision::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php
new file mode 100644
index 000000000..e252f5f4b
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\ConstantSampler\ConstantDecision instead.
+ * @deprecated
+ */
+ class ConstantSampler_ConstantDecision {}
+}
+class_exists(ConstantSampler\ConstantDecision::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\ConstantSampler_ConstantDecision is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\ConstantSampler\ConstantDecision instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php
new file mode 100644
index 000000000..c5cc122e7
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php
@@ -0,0 +1,156 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Spans produced by an InstrumentationLibrary.
+ * InstrumentationLibrarySpans is wire-compatible with ScopeSpans for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.InstrumentationLibrarySpans</code>
+ */
+class InstrumentationLibrarySpans extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ */
+ protected $instrumentation_library = null;
+ /**
+ * A list of Spans that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ */
+ private $spans;
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $instrumentation_library
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ * @type \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $spans
+ * A list of Spans that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all spans and span events in the "spans" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationLibrary|null
+ */
+ public function getInstrumentationLibrary()
+ {
+ return $this->instrumentation_library;
+ }
+
+ public function hasInstrumentationLibrary()
+ {
+ return isset($this->instrumentation_library);
+ }
+
+ public function clearInstrumentationLibrary()
+ {
+ unset($this->instrumentation_library);
+ }
+
+ /**
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $var
+ * @return $this
+ */
+ public function setInstrumentationLibrary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationLibrary::class);
+ $this->instrumentation_library = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSpans()
+ {
+ return $this->spans;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span::class);
+ $this->spans = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php
new file mode 100644
index 000000000..3fd17fb01
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php
@@ -0,0 +1,67 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sampler that tries to sample with a rate per time window.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.RateLimitingSampler</code>
+ */
+class RateLimitingSampler extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Rate per second.
+ *
+ * Generated from protobuf field <code>int64 qps = 1;</code>
+ */
+ protected $qps = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $qps
+ * Rate per second.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Rate per second.
+ *
+ * Generated from protobuf field <code>int64 qps = 1;</code>
+ * @return int|string
+ */
+ public function getQps()
+ {
+ return $this->qps;
+ }
+
+ /**
+ * Rate per second.
+ *
+ * Generated from protobuf field <code>int64 qps = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setQps($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->qps = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php
new file mode 100644
index 000000000..521250920
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of ScopeSpans from a Resource.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.ResourceSpans</code>
+ */
+class ResourceSpans extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * A list of ScopeSpans that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;</code>
+ */
+ private $scope_spans;
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ * @type \Opentelemetry\Proto\Trace\V1\ScopeSpans[]|\Google\Protobuf\Internal\RepeatedField $scope_spans
+ * A list of ScopeSpans that originate from a resource.
+ * @type string $schema_url
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource|null
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of ScopeSpans that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getScopeSpans()
+ {
+ return $this->scope_spans;
+ }
+
+ /**
+ * A list of ScopeSpans that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ScopeSpans[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setScopeSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\ScopeSpans::class);
+ $this->scope_spans = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php
new file mode 100644
index 000000000..098376f7d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Spans produced by an InstrumentationScope.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.ScopeSpans</code>
+ */
+class ScopeSpans extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ */
+ protected $scope = null;
+ /**
+ * A list of Spans that originate from an instrumentation scope.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ */
+ private $spans;
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationScope $scope
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ * @type \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $spans
+ * A list of Spans that originate from an instrumentation scope.
+ * @type string $schema_url
+ * This schema_url applies to all spans and span events in the "spans" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationScope|null
+ */
+ public function getScope()
+ {
+ return $this->scope;
+ }
+
+ public function hasScope()
+ {
+ return isset($this->scope);
+ }
+
+ public function clearScope()
+ {
+ unset($this->scope);
+ }
+
+ /**
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationScope $var
+ * @return $this
+ */
+ public function setScope($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationScope::class);
+ $this->scope = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation scope.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSpans()
+ {
+ return $this->spans;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation scope.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span::class);
+ $this->spans = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php
new file mode 100644
index 000000000..4b1dc138c
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php
@@ -0,0 +1,726 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A Span represents a single operation performed by a single component of the system.
+ * The next available field id is 17.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span</code>
+ */
+class Span extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ */
+ protected $trace_id = '';
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ */
+ protected $span_id = '';
+ /**
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ */
+ protected $trace_state = '';
+ /**
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
+ */
+ protected $parent_span_id = '';
+ /**
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ *
+ * Generated from protobuf field <code>string name = 5;</code>
+ */
+ protected $name = '';
+ /**
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
+ */
+ protected $kind = 0;
+ /**
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
+ */
+ protected $end_time_unix_nano = 0;
+ /**
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
+ */
+ protected $dropped_attributes_count = 0;
+ /**
+ * events is a collection of Event items.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
+ */
+ private $events;
+ /**
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
+ */
+ protected $dropped_events_count = 0;
+ /**
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
+ */
+ private $links;
+ /**
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
+ */
+ protected $dropped_links_count = 0;
+ /**
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
+ */
+ protected $status = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $trace_id
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ * @type string $span_id
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ * @type string $trace_state
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ * @type string $parent_span_id
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ * @type string $name
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ * @type int $kind
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ * @type int|string $start_time_unix_nano
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ * @type int|string $end_time_unix_nano
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ * @type \Opentelemetry\Proto\Trace\V1\Span\Event[]|\Google\Protobuf\Internal\RepeatedField $events
+ * events is a collection of Event items.
+ * @type int $dropped_events_count
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ * @type \Opentelemetry\Proto\Trace\V1\Span\Link[]|\Google\Protobuf\Internal\RepeatedField $links
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ * @type int $dropped_links_count
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ * @type \Opentelemetry\Proto\Trace\V1\Status $status
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @return string
+ */
+ public function getTraceState()
+ {
+ return $this->trace_state;
+ }
+
+ /**
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceState($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trace_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
+ * @return string
+ */
+ public function getParentSpanId()
+ {
+ return $this->parent_span_id;
+ }
+
+ /**
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setParentSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->parent_span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ *
+ * Generated from protobuf field <code>string name = 5;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ *
+ * Generated from protobuf field <code>string name = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
+ * @return int
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+
+ /**
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setKind($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Trace\V1\Span\SpanKind::class);
+ $this->kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
+ * @return int|string
+ */
+ public function getEndTimeUnixNano()
+ {
+ return $this->end_time_unix_nano;
+ }
+
+ /**
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setEndTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->end_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * events is a collection of Event items.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEvents()
+ {
+ return $this->events;
+ }
+
+ /**
+ * events is a collection of Event items.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span\Event[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEvents($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span\Event::class);
+ $this->events = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
+ * @return int
+ */
+ public function getDroppedEventsCount()
+ {
+ return $this->dropped_events_count;
+ }
+
+ /**
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedEventsCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_events_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLinks()
+ {
+ return $this->links;
+ }
+
+ /**
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span\Link[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLinks($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span\Link::class);
+ $this->links = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
+ * @return int
+ */
+ public function getDroppedLinksCount()
+ {
+ return $this->dropped_links_count;
+ }
+
+ /**
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedLinksCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_links_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\Status|null
+ */
+ public function getStatus()
+ {
+ return $this->status;
+ }
+
+ public function hasStatus()
+ {
+ return isset($this->status);
+ }
+
+ public function clearStatus()
+ {
+ unset($this->status);
+ }
+
+ /**
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Status $var
+ * @return $this
+ */
+ public function setStatus($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\Status::class);
+ $this->status = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php
new file mode 100644
index 000000000..c6b7a1807
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php
@@ -0,0 +1,189 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Span;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Event is a time-stamped annotation of the span, consisting of user-supplied
+ * text description and key-value pairs.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span.Event</code>
+ */
+class Event extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * time_unix_nano is the time the event occurred.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ *
+ * Generated from protobuf field <code>string name = 2;</code>
+ */
+ protected $name = '';
+ /**
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the time the event occurred.
+ * @type string $name
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * time_unix_nano is the time the event occurred.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the time the event occurred.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ *
+ * Generated from protobuf field <code>string name = 2;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ *
+ * Generated from protobuf field <code>string name = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Event::class, \Opentelemetry\Proto\Trace\V1\Span_Event::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php
new file mode 100644
index 000000000..3096739de
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php
@@ -0,0 +1,225 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Span;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A pointer from the current span to another span in the same trace or in a
+ * different trace. For example, this can be used in batching operations,
+ * where a single batch handler processes multiple requests from different
+ * traces or when the handler receives a request from a different project.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span.Link</code>
+ */
+class Link extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ */
+ protected $trace_id = '';
+ /**
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ */
+ protected $span_id = '';
+ /**
+ * The trace_state associated with the link.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ */
+ protected $trace_state = '';
+ /**
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $trace_id
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ * @type string $span_id
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ * @type string $trace_state
+ * The trace_state associated with the link.
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The trace_state associated with the link.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @return string
+ */
+ public function getTraceState()
+ {
+ return $this->trace_state;
+ }
+
+ /**
+ * The trace_state associated with the link.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceState($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trace_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Link::class, \Opentelemetry\Proto\Trace\V1\Span_Link::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php
new file mode 100644
index 000000000..9ffa93719
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php
@@ -0,0 +1,94 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Span;
+
+use UnexpectedValueException;
+
+/**
+ * SpanKind is the type of span. Can be used to specify additional relationships between spans
+ * in addition to a parent/child relationship.
+ *
+ * Protobuf type <code>opentelemetry.proto.trace.v1.Span.SpanKind</code>
+ */
+class SpanKind
+{
+ /**
+ * Unspecified. Do NOT use as default.
+ * Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_UNSPECIFIED = 0;</code>
+ */
+ const SPAN_KIND_UNSPECIFIED = 0;
+ /**
+ * Indicates that the span represents an internal operation within an application,
+ * as opposed to an operation happening at the boundaries. Default value.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_INTERNAL = 1;</code>
+ */
+ const SPAN_KIND_INTERNAL = 1;
+ /**
+ * Indicates that the span covers server-side handling of an RPC or other
+ * remote network request.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_SERVER = 2;</code>
+ */
+ const SPAN_KIND_SERVER = 2;
+ /**
+ * Indicates that the span describes a request to some remote service.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_CLIENT = 3;</code>
+ */
+ const SPAN_KIND_CLIENT = 3;
+ /**
+ * Indicates that the span describes a producer sending a message to a broker.
+ * Unlike CLIENT and SERVER, there is often no direct critical path latency relationship
+ * between producer and consumer spans. A PRODUCER span ends when the message was accepted
+ * by the broker while the logical processing of the message might span a much longer time.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_PRODUCER = 4;</code>
+ */
+ const SPAN_KIND_PRODUCER = 4;
+ /**
+ * Indicates that the span describes consumer receiving a message from a broker.
+ * Like the PRODUCER kind, there is often no direct critical path latency relationship
+ * between producer and consumer spans.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_CONSUMER = 5;</code>
+ */
+ const SPAN_KIND_CONSUMER = 5;
+
+ private static $valueToName = [
+ self::SPAN_KIND_UNSPECIFIED => 'SPAN_KIND_UNSPECIFIED',
+ self::SPAN_KIND_INTERNAL => 'SPAN_KIND_INTERNAL',
+ self::SPAN_KIND_SERVER => 'SPAN_KIND_SERVER',
+ self::SPAN_KIND_CLIENT => 'SPAN_KIND_CLIENT',
+ self::SPAN_KIND_PRODUCER => 'SPAN_KIND_PRODUCER',
+ self::SPAN_KIND_CONSUMER => 'SPAN_KIND_CONSUMER',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(SpanKind::class, \Opentelemetry\Proto\Trace\V1\Span_SpanKind::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php
new file mode 100644
index 000000000..168b7b129
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Span\Event instead.
+ * @deprecated
+ */
+ class Span_Event {}
+}
+class_exists(Span\Event::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Span_Event is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Span\Event instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php
new file mode 100644
index 000000000..311e4023f
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Span\Link instead.
+ * @deprecated
+ */
+ class Span_Link {}
+}
+class_exists(Span\Link::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Span_Link is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Span\Link instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php
new file mode 100644
index 000000000..d517c72fd
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Span\SpanKind instead.
+ * @deprecated
+ */
+ class Span_SpanKind {}
+}
+class_exists(Span\SpanKind::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Span_SpanKind is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Span\SpanKind instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php
new file mode 100644
index 000000000..5fee7292e
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php
@@ -0,0 +1,102 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * The Status type defines a logical error model that is suitable for different
+ * programming environments, including REST APIs and RPC APIs.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Status</code>
+ */
+class Status extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A developer-facing human readable error message.
+ *
+ * Generated from protobuf field <code>string message = 2;</code>
+ */
+ protected $message = '';
+ /**
+ * The status code.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status.StatusCode code = 3;</code>
+ */
+ protected $code = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $message
+ * A developer-facing human readable error message.
+ * @type int $code
+ * The status code.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A developer-facing human readable error message.
+ *
+ * Generated from protobuf field <code>string message = 2;</code>
+ * @return string
+ */
+ public function getMessage()
+ {
+ return $this->message;
+ }
+
+ /**
+ * A developer-facing human readable error message.
+ *
+ * Generated from protobuf field <code>string message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->message = $var;
+
+ return $this;
+ }
+
+ /**
+ * The status code.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status.StatusCode code = 3;</code>
+ * @return int
+ */
+ public function getCode()
+ {
+ return $this->code;
+ }
+
+ /**
+ * The status code.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status.StatusCode code = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setCode($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Trace\V1\Status\StatusCode::class);
+ $this->code = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php
new file mode 100644
index 000000000..9a078e2ef
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php
@@ -0,0 +1,126 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Status;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>opentelemetry.proto.trace.v1.Status.DeprecatedStatusCode</code>
+ */
+class DeprecatedStatusCode
+{
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_OK = 0;</code>
+ */
+ const DEPRECATED_STATUS_CODE_OK = 0;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_CANCELLED = 1;</code>
+ */
+ const DEPRECATED_STATUS_CODE_CANCELLED = 1;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNKNOWN_ERROR = 2;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNKNOWN_ERROR = 2;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_INVALID_ARGUMENT = 3;</code>
+ */
+ const DEPRECATED_STATUS_CODE_INVALID_ARGUMENT = 3;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED = 4;</code>
+ */
+ const DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED = 4;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_NOT_FOUND = 5;</code>
+ */
+ const DEPRECATED_STATUS_CODE_NOT_FOUND = 5;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_ALREADY_EXISTS = 6;</code>
+ */
+ const DEPRECATED_STATUS_CODE_ALREADY_EXISTS = 6;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_PERMISSION_DENIED = 7;</code>
+ */
+ const DEPRECATED_STATUS_CODE_PERMISSION_DENIED = 7;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED = 8;</code>
+ */
+ const DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED = 8;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_FAILED_PRECONDITION = 9;</code>
+ */
+ const DEPRECATED_STATUS_CODE_FAILED_PRECONDITION = 9;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_ABORTED = 10;</code>
+ */
+ const DEPRECATED_STATUS_CODE_ABORTED = 10;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_OUT_OF_RANGE = 11;</code>
+ */
+ const DEPRECATED_STATUS_CODE_OUT_OF_RANGE = 11;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNIMPLEMENTED = 12;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNIMPLEMENTED = 12;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_INTERNAL_ERROR = 13;</code>
+ */
+ const DEPRECATED_STATUS_CODE_INTERNAL_ERROR = 13;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNAVAILABLE = 14;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNAVAILABLE = 14;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_DATA_LOSS = 15;</code>
+ */
+ const DEPRECATED_STATUS_CODE_DATA_LOSS = 15;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNAUTHENTICATED = 16;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNAUTHENTICATED = 16;
+
+ private static $valueToName = [
+ self::DEPRECATED_STATUS_CODE_OK => 'DEPRECATED_STATUS_CODE_OK',
+ self::DEPRECATED_STATUS_CODE_CANCELLED => 'DEPRECATED_STATUS_CODE_CANCELLED',
+ self::DEPRECATED_STATUS_CODE_UNKNOWN_ERROR => 'DEPRECATED_STATUS_CODE_UNKNOWN_ERROR',
+ self::DEPRECATED_STATUS_CODE_INVALID_ARGUMENT => 'DEPRECATED_STATUS_CODE_INVALID_ARGUMENT',
+ self::DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED => 'DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED',
+ self::DEPRECATED_STATUS_CODE_NOT_FOUND => 'DEPRECATED_STATUS_CODE_NOT_FOUND',
+ self::DEPRECATED_STATUS_CODE_ALREADY_EXISTS => 'DEPRECATED_STATUS_CODE_ALREADY_EXISTS',
+ self::DEPRECATED_STATUS_CODE_PERMISSION_DENIED => 'DEPRECATED_STATUS_CODE_PERMISSION_DENIED',
+ self::DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED => 'DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED',
+ self::DEPRECATED_STATUS_CODE_FAILED_PRECONDITION => 'DEPRECATED_STATUS_CODE_FAILED_PRECONDITION',
+ self::DEPRECATED_STATUS_CODE_ABORTED => 'DEPRECATED_STATUS_CODE_ABORTED',
+ self::DEPRECATED_STATUS_CODE_OUT_OF_RANGE => 'DEPRECATED_STATUS_CODE_OUT_OF_RANGE',
+ self::DEPRECATED_STATUS_CODE_UNIMPLEMENTED => 'DEPRECATED_STATUS_CODE_UNIMPLEMENTED',
+ self::DEPRECATED_STATUS_CODE_INTERNAL_ERROR => 'DEPRECATED_STATUS_CODE_INTERNAL_ERROR',
+ self::DEPRECATED_STATUS_CODE_UNAVAILABLE => 'DEPRECATED_STATUS_CODE_UNAVAILABLE',
+ self::DEPRECATED_STATUS_CODE_DATA_LOSS => 'DEPRECATED_STATUS_CODE_DATA_LOSS',
+ self::DEPRECATED_STATUS_CODE_UNAUTHENTICATED => 'DEPRECATED_STATUS_CODE_UNAUTHENTICATED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(DeprecatedStatusCode::class, \Opentelemetry\Proto\Trace\V1\Status_DeprecatedStatusCode::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php
new file mode 100644
index 000000000..954cf1fd2
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php
@@ -0,0 +1,66 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Status;
+
+use UnexpectedValueException;
+
+/**
+ * For the semantics of status codes see
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
+ *
+ * Protobuf type <code>opentelemetry.proto.trace.v1.Status.StatusCode</code>
+ */
+class StatusCode
+{
+ /**
+ * The default status.
+ *
+ * Generated from protobuf enum <code>STATUS_CODE_UNSET = 0;</code>
+ */
+ const STATUS_CODE_UNSET = 0;
+ /**
+ * The Span has been validated by an Application developer or Operator to
+ * have completed successfully.
+ *
+ * Generated from protobuf enum <code>STATUS_CODE_OK = 1;</code>
+ */
+ const STATUS_CODE_OK = 1;
+ /**
+ * The Span contains an error.
+ *
+ * Generated from protobuf enum <code>STATUS_CODE_ERROR = 2;</code>
+ */
+ const STATUS_CODE_ERROR = 2;
+
+ private static $valueToName = [
+ self::STATUS_CODE_UNSET => 'STATUS_CODE_UNSET',
+ self::STATUS_CODE_OK => 'STATUS_CODE_OK',
+ self::STATUS_CODE_ERROR => 'STATUS_CODE_ERROR',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(StatusCode::class, \Opentelemetry\Proto\Trace\V1\Status_StatusCode::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php
new file mode 100644
index 000000000..2235d5b7d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Status\DeprecatedStatusCode instead.
+ * @deprecated
+ */
+ class Status_DeprecatedStatusCode {}
+}
+class_exists(Status\DeprecatedStatusCode::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Status_DeprecatedStatusCode is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Status\DeprecatedStatusCode instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php
new file mode 100644
index 000000000..9de5cbbd9
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Status\StatusCode instead.
+ * @deprecated
+ */
+ class Status_StatusCode {}
+}
+class_exists(Status\StatusCode::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Status_StatusCode is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Status\StatusCode instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php
new file mode 100644
index 000000000..9fb54df9b
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php
@@ -0,0 +1,297 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Global configuration of the trace service. All fields must be specified, or
+ * the default (zero) values will be used for each type.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.TraceConfig</code>
+ */
+class TraceConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
+ */
+ protected $max_number_of_attributes = 0;
+ /**
+ * The global default max number of annotation events per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
+ */
+ protected $max_number_of_timed_events = 0;
+ /**
+ * The global default max number of attributes per timed event.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
+ */
+ protected $max_number_of_attributes_per_timed_event = 0;
+ /**
+ * The global default max number of link entries per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
+ */
+ protected $max_number_of_links = 0;
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
+ */
+ protected $max_number_of_attributes_per_link = 0;
+ protected $sampler;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Trace\V1\ConstantSampler $constant_sampler
+ * @type \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased $trace_id_ratio_based
+ * @type \Opentelemetry\Proto\Trace\V1\RateLimitingSampler $rate_limiting_sampler
+ * @type int|string $max_number_of_attributes
+ * The global default max number of attributes per span.
+ * @type int|string $max_number_of_timed_events
+ * The global default max number of annotation events per span.
+ * @type int|string $max_number_of_attributes_per_timed_event
+ * The global default max number of attributes per timed event.
+ * @type int|string $max_number_of_links
+ * The global default max number of link entries per span.
+ * @type int|string $max_number_of_attributes_per_link
+ * The global default max number of attributes per span.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler constant_sampler = 1;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\ConstantSampler|null
+ */
+ public function getConstantSampler()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasConstantSampler()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler constant_sampler = 1;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ConstantSampler $var
+ * @return $this
+ */
+ public function setConstantSampler($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\ConstantSampler::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.TraceIdRatioBased trace_id_ratio_based = 2;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased|null
+ */
+ public function getTraceIdRatioBased()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasTraceIdRatioBased()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.TraceIdRatioBased trace_id_ratio_based = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased $var
+ * @return $this
+ */
+ public function setTraceIdRatioBased($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\RateLimitingSampler|null
+ */
+ public function getRateLimitingSampler()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasRateLimitingSampler()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\RateLimitingSampler $var
+ * @return $this
+ */
+ public function setRateLimitingSampler($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\RateLimitingSampler::class);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfAttributes()
+ {
+ return $this->max_number_of_attributes;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfAttributes($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_attributes = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of annotation events per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfTimedEvents()
+ {
+ return $this->max_number_of_timed_events;
+ }
+
+ /**
+ * The global default max number of annotation events per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfTimedEvents($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_timed_events = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of attributes per timed event.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfAttributesPerTimedEvent()
+ {
+ return $this->max_number_of_attributes_per_timed_event;
+ }
+
+ /**
+ * The global default max number of attributes per timed event.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfAttributesPerTimedEvent($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_attributes_per_timed_event = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of link entries per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfLinks()
+ {
+ return $this->max_number_of_links;
+ }
+
+ /**
+ * The global default max number of link entries per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfLinks($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_links = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfAttributesPerLink()
+ {
+ return $this->max_number_of_attributes_per_link;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfAttributesPerLink($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_attributes_per_link = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSampler()
+ {
+ return $this->whichOneof("sampler");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php
new file mode 100644
index 000000000..a04435c36
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sampler that tries to uniformly sample traces with a given ratio.
+ * The ratio of sampling a trace is equal to that of the specified ratio.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.TraceIdRatioBased</code>
+ */
+class TraceIdRatioBased extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double samplingRatio = 1;</code>
+ */
+ protected $samplingRatio = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $samplingRatio
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double samplingRatio = 1;</code>
+ * @return float
+ */
+ public function getSamplingRatio()
+ {
+ return $this->samplingRatio;
+ }
+
+ /**
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double samplingRatio = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSamplingRatio($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->samplingRatio = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php
new file mode 100644
index 000000000..cbaf79448
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php
@@ -0,0 +1,90 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * TracesData represents the traces data that can be stored in a persistent storage,
+ * OR can be embedded by other protocols that transfer OTLP traces data but do
+ * not implement the OTLP protocol.
+ * The main difference between this message and collector protocol is that
+ * in this message there will not be any "control" or "metadata" specific to
+ * OTLP protocol.
+ * When new fields are added into this message, the OTLP request MUST be updated
+ * as well.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.TracesData</code>
+ */
+class TracesData extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ */
+ private $resource_spans;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $resource_spans
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceSpans()
+ {
+ return $this->resource_spans;
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\ResourceSpans::class);
+ $this->resource_spans = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/README.md b/vendor/open-telemetry/gen-otlp-protobuf/README.md
new file mode 100644
index 000000000..f1ea7a63a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/README.md
@@ -0,0 +1,31 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/gen-otlp-protobuf/releases)
+[![Source](https://img.shields.io/badge/source-gen--otlp--protobuf-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/proto/otel)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:gen--otlp--protobuf-blue)](https://github.com/opentelemetry-php/gen-otlp-protobuf)
+[![Latest Version](http://poser.pugx.org/open-telemetry/gen-otlp-protobuf/v/unstable)](https://packagist.org/packages/open-telemetry/gen-otlp-protobuf/)
+[![Stable](http://poser.pugx.org/open-telemetry/gen-otlp-protobuf/v/stable)](https://packagist.org/packages/open-telemetry/gen-otlp-protobuf/)
+
+# OpenTelemetry protobuf files
+
+## Protobuf Runtime library
+
+OTLP exporting requires a [protobuf runtime library](https://github.com/protocolbuffers/protobuf/tree/main/php).
+
+There exist two protobuf runtime libraries that offer the same set of APIs, allowing developers to choose the one that
+best suits their needs.
+
+This package requires `google/protobuf`, which is the native implementation. It is easy to install and a good way to get
+started quickly.
+
+Alternatively, and the recommended option for production is to install the Protobuf C extension for PHP. The extension
+makes OTLP exporting _significantly_ more performant. The extension can be installed with the following command:
+
+```shell
+pecl install protobuf
+```
+
+The extension can be installed alongside the native library, and it will be used instead if available.
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/VERSION b/vendor/open-telemetry/gen-otlp-protobuf/VERSION
new file mode 100644
index 000000000..0ec25f750
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/VERSION
@@ -0,0 +1 @@
+v1.0.0
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/composer.json b/vendor/open-telemetry/gen-otlp-protobuf/composer.json
new file mode 100644
index 000000000..dc8d24585
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/composer.json
@@ -0,0 +1,37 @@
+{
+ "name": "open-telemetry/gen-otlp-protobuf",
+ "description": "PHP protobuf files for communication with OpenTelemetry OTLP collectors/servers.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "gRPC", "protobuf", "otlp"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "google/protobuf": "^3.3.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Opentelemetry\\Proto\\": "Opentelemetry/Proto/",
+ "GPBMetadata\\Opentelemetry\\": "GPBMetadata/Opentelemetry/"
+ }
+ },
+ "suggest": {
+ "ext-protobuf": "For better performance, when dealing with the protobuf format"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php
new file mode 100644
index 000000000..8ba992f9a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php
@@ -0,0 +1,83 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Client\HttpAsyncClient;
+use OpenTelemetry\SDK\Common\Http\DependencyResolverInterface;
+use OpenTelemetry\SDK\Common\Http\HttpPlug\Client\ResolverInterface as HttpPlugClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Client\ResolverInterface as PsrClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface as MessageFactoryResolverInterface;
+use Psr\Http\Client\ClientInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+final class DependencyResolver implements DependencyResolverInterface
+{
+ private MessageFactoryResolverInterface $messageFactoryResolver;
+ private PsrClientResolverInterface $psrClientResolver;
+ private HttpPlugClientResolverInterface $httpPlugClientResolver;
+
+ public function __construct(
+ ?MessageFactoryResolverInterface $messageFactoryResolver = null,
+ ?PsrClientResolverInterface $psrClientResolver = null,
+ ?HttpPlugClientResolverInterface $httpPlugClientResolver = null
+ ) {
+ $this->messageFactoryResolver = $messageFactoryResolver ?? MessageFactoryResolver::create();
+ $this->psrClientResolver = $psrClientResolver ?? PsrClientResolver::create();
+ $this->httpPlugClientResolver = $httpPlugClientResolver ?? HttpPlugClientResolver::create();
+ }
+
+ public static function create(
+ ?MessageFactoryResolverInterface $messageFactoryResolver = null,
+ ?PsrClientResolverInterface $psrClientResolver = null,
+ ?HttpPlugClientResolverInterface $httpPlugClientResolver = null
+ ): self {
+ return new self($messageFactoryResolver, $psrClientResolver, $httpPlugClientResolver);
+ }
+
+ public function resolveRequestFactory(): RequestFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveRequestFactory();
+ }
+
+ public function resolveResponseFactory(): ResponseFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveResponseFactory();
+ }
+
+ public function resolveServerRequestFactory(): ServerRequestFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveServerRequestFactory();
+ }
+
+ public function resolveStreamFactory(): StreamFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveStreamFactory();
+ }
+
+ public function resolveUploadedFileFactory(): UploadedFileFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveUploadedFileFactory();
+ }
+
+ public function resolveUriFactory(): UriFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveUriFactory();
+ }
+
+ public function resolveHttpPlugAsyncClient(): HttpAsyncClient
+ {
+ return $this->httpPlugClientResolver->resolveHttpPlugAsyncClient();
+ }
+
+ public function resolvePsrClient(): ClientInterface
+ {
+ return $this->psrClientResolver->resolvePsrClient();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php
new file mode 100644
index 000000000..9751984ee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Client\HttpAsyncClient;
+use Http\Discovery\HttpAsyncClientDiscovery;
+use OpenTelemetry\SDK\Common\Http\HttpPlug\Client\ResolverInterface;
+
+final class HttpPlugClientResolver implements ResolverInterface
+{
+ private ?HttpAsyncClient $httpAsyncClient;
+
+ public function __construct(?HttpAsyncClient $httpAsyncClient = null)
+ {
+ $this->httpAsyncClient = $httpAsyncClient;
+ }
+
+ public static function create(?HttpAsyncClient $httpAsyncClient = null): self
+ {
+ return new self($httpAsyncClient);
+ }
+
+ public function resolveHttpPlugAsyncClient(): HttpAsyncClient
+ {
+ return $this->httpAsyncClient ??= HttpAsyncClientDiscovery::find();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php
new file mode 100644
index 000000000..6ed0895ff
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php
@@ -0,0 +1,88 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Discovery\Psr17FactoryDiscovery;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+final class MessageFactoryResolver implements FactoryResolverInterface
+{
+ private ?RequestFactoryInterface $requestFactory;
+ private ?ResponseFactoryInterface $responseFactory;
+ private ?ServerRequestFactoryInterface $serverRequestFactory;
+ private ?StreamFactoryInterface $streamFactory;
+ private ?UploadedFileFactoryInterface $uploadedFileFactory;
+ private ?UriFactoryInterface $uriFactory;
+
+ public function __construct(
+ ?RequestFactoryInterface $requestFactory = null,
+ ?ResponseFactoryInterface $responseFactory = null,
+ ?ServerRequestFactoryInterface $serverRequestFactory = null,
+ ?StreamFactoryInterface $streamFactory = null,
+ ?UploadedFileFactoryInterface $uploadedFileFactory = null,
+ ?UriFactoryInterface $uriFactory = null
+ ) {
+ $this->requestFactory = $requestFactory;
+ $this->responseFactory = $responseFactory;
+ $this->serverRequestFactory = $serverRequestFactory;
+ $this->streamFactory = $streamFactory;
+ $this->uploadedFileFactory = $uploadedFileFactory;
+ $this->uriFactory = $uriFactory;
+ }
+
+ public static function create(
+ ?RequestFactoryInterface $requestFactory = null,
+ ?ResponseFactoryInterface $responseFactory = null,
+ ?ServerRequestFactoryInterface $serverRequestFactory = null,
+ ?StreamFactoryInterface $streamFactory = null,
+ ?UploadedFileFactoryInterface $uploadedFileFactory = null,
+ ?UriFactoryInterface $uriFactory = null
+ ): self {
+ return new self(
+ $requestFactory,
+ $responseFactory,
+ $serverRequestFactory,
+ $streamFactory,
+ $uploadedFileFactory,
+ $uriFactory
+ );
+ }
+
+ public function resolveRequestFactory(): RequestFactoryInterface
+ {
+ return $this->requestFactory ??= Psr17FactoryDiscovery::findRequestFactory();
+ }
+
+ public function resolveResponseFactory(): ResponseFactoryInterface
+ {
+ return $this->responseFactory ??= Psr17FactoryDiscovery::findResponseFactory();
+ }
+
+ public function resolveServerRequestFactory(): ServerRequestFactoryInterface
+ {
+ return $this->serverRequestFactory ??= Psr17FactoryDiscovery::findServerRequestFactory();
+ }
+
+ public function resolveStreamFactory(): StreamFactoryInterface
+ {
+ return $this->streamFactory ??= Psr17FactoryDiscovery::findStreamFactory();
+ }
+
+ public function resolveUploadedFileFactory(): UploadedFileFactoryInterface
+ {
+ return $this->uploadedFileFactory ??= Psr17FactoryDiscovery::findUploadedFileFactory();
+ }
+
+ public function resolveUriFactory(): UriFactoryInterface
+ {
+ return $this->uriFactory ??= Psr17FactoryDiscovery::findUriFactory();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php
new file mode 100644
index 000000000..46fb36312
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Discovery\Psr18ClientDiscovery;
+use OpenTelemetry\SDK\Common\Http\Psr\Client\ResolverInterface;
+use Psr\Http\Client\ClientInterface;
+
+final class PsrClientResolver implements ResolverInterface
+{
+ private ?ClientInterface $client;
+
+ public function __construct(?ClientInterface $client = null)
+ {
+ $this->client = $client;
+ }
+
+ public static function create(?ClientInterface $client = null): self
+ {
+ return new self($client);
+ }
+
+ public function resolvePsrClient(): ClientInterface
+ {
+ return $this->client ??= Psr18ClientDiscovery::find();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php
new file mode 100644
index 000000000..e9a1f7334
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+class AttributeValidator implements AttributeValidatorInterface
+{
+ private const PRIMITIVES = [
+ 'string',
+ 'integer',
+ 'double',
+ 'boolean',
+ ];
+ private const NUMERICS = [
+ 'double',
+ 'integer',
+ ];
+
+ /**
+ * Validate whether a value is a primitive, or a homogeneous array of primitives (treating int/double as equivalent).
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/common/README.md#attribute
+ */
+ public function validate($value): bool
+ {
+ if (is_array($value)) {
+ return $this->validateArray($value);
+ }
+
+ return in_array(gettype($value), self::PRIMITIVES);
+ }
+
+ private function validateArray(array $value): bool
+ {
+ if ($value === []) {
+ return true;
+ }
+ $type = gettype(reset($value));
+ if (!in_array($type, self::PRIMITIVES)) {
+ return false;
+ }
+ foreach ($value as $v) {
+ if (in_array(gettype($v), self::NUMERICS) && in_array($type, self::NUMERICS)) {
+ continue;
+ }
+ if (gettype($v) !== $type) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public function getInvalidMessage(): string
+ {
+ return 'attribute with non-primitive or non-homogeneous array of primitives dropped';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php
new file mode 100644
index 000000000..afbfba6e7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+interface AttributeValidatorInterface
+{
+ public function validate($value): bool;
+ public function getInvalidMessage(): string;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/Attributes.php b/vendor/open-telemetry/sdk/Common/Attribute/Attributes.php
new file mode 100644
index 000000000..bb131ce94
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/Attributes.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use function array_key_exists;
+use IteratorAggregate;
+use Traversable;
+
+final class Attributes implements AttributesInterface, IteratorAggregate
+{
+ private array $attributes;
+ private int $droppedAttributesCount;
+
+ /**
+ * @internal
+ */
+ public function __construct(array $attributes, int $droppedAttributesCount)
+ {
+ $this->attributes = $attributes;
+ $this->droppedAttributesCount = $droppedAttributesCount;
+ }
+
+ public static function create(iterable $attributes): AttributesInterface
+ {
+ return self::factory()->builder($attributes)->build();
+ }
+
+ public static function factory(?int $attributeCountLimit = null, ?int $attributeValueLengthLimit = null): AttributesFactoryInterface
+ {
+ return new AttributesFactory($attributeCountLimit, $attributeValueLengthLimit);
+ }
+
+ public function has(string $name): bool
+ {
+ return array_key_exists($name, $this->attributes);
+ }
+
+ public function get(string $name)
+ {
+ return $this->attributes[$name] ?? null;
+ }
+
+ /** @psalm-mutation-free */
+ public function count(): int
+ {
+ return \count($this->attributes);
+ }
+
+ public function getIterator(): Traversable
+ {
+ foreach ($this->attributes as $key => $value) {
+ yield (string) $key => $value;
+ }
+ }
+
+ public function toArray(): array
+ {
+ return $this->attributes;
+ }
+
+ public function getDroppedAttributesCount(): int
+ {
+ return $this->droppedAttributesCount;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php
new file mode 100644
index 000000000..5c1150638
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php
@@ -0,0 +1,120 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use function array_key_exists;
+use function count;
+use function is_array;
+use function is_string;
+use function mb_substr;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+
+/**
+ * @internal
+ */
+final class AttributesBuilder implements AttributesBuilderInterface
+{
+ use LogsMessagesTrait;
+
+ private array $attributes;
+ private ?int $attributeCountLimit;
+ private ?int $attributeValueLengthLimit;
+ private int $droppedAttributesCount;
+ private AttributeValidatorInterface $attributeValidator;
+
+ public function __construct(
+ array $attributes,
+ ?int $attributeCountLimit,
+ ?int $attributeValueLengthLimit,
+ int $droppedAttributesCount,
+ ?AttributeValidatorInterface $attributeValidator
+ ) {
+ $this->attributes = $attributes;
+ $this->attributeCountLimit = $attributeCountLimit;
+ $this->attributeValueLengthLimit = $attributeValueLengthLimit;
+ $this->droppedAttributesCount = $droppedAttributesCount;
+ $this->attributeValidator = $attributeValidator ?? new AttributeValidator();
+ }
+
+ public function build(): AttributesInterface
+ {
+ return new Attributes($this->attributes, $this->droppedAttributesCount);
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return array_key_exists($offset, $this->attributes);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->attributes[$offset] ?? null;
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($offset, $value)
+ {
+ if ($offset === null) {
+ return;
+ }
+ if ($value === null) {
+ unset($this->attributes[$offset]);
+
+ return;
+ }
+ if (!$this->attributeValidator->validate($value)) {
+ self::logWarning($this->attributeValidator->getInvalidMessage() . ': ' . $offset);
+ $this->droppedAttributesCount++;
+
+ return;
+ }
+ if (count($this->attributes) === $this->attributeCountLimit && !array_key_exists($offset, $this->attributes)) {
+ $this->droppedAttributesCount++;
+
+ return;
+ }
+
+ $this->attributes[$offset] = $this->normalizeValue($value);
+ //@todo "There SHOULD be a message printed in the SDK's log to indicate to the user that an attribute was
+ // discarded due to such a limit. To prevent excessive logging, the message MUST be printed at most
+ // once per <thing> (i.e., not per discarded attribute)."
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($offset)
+ {
+ unset($this->attributes[$offset]);
+ }
+
+ private function normalizeValue($value)
+ {
+ if (is_string($value) && $this->attributeValueLengthLimit !== null) {
+ return mb_substr($value, 0, $this->attributeValueLengthLimit);
+ }
+
+ if (is_array($value)) {
+ foreach ($value as $k => $v) {
+ $processed = $this->normalizeValue($v);
+ if ($processed !== $v) {
+ $value[$k] = $processed;
+ }
+ }
+
+ return $value;
+ }
+
+ return $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php
new file mode 100644
index 000000000..7e3d64062
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use ArrayAccess;
+
+interface AttributesBuilderInterface extends ArrayAccess
+{
+ public function build(): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php
new file mode 100644
index 000000000..d53ab25aa
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+/**
+ * @internal
+ */
+final class AttributesFactory implements AttributesFactoryInterface
+{
+ private ?int $attributeCountLimit;
+ private ?int $attributeValueLengthLimit;
+
+ public function __construct(?int $attributeCountLimit = null, ?int $attributeValueLengthLimit = null)
+ {
+ $this->attributeCountLimit = $attributeCountLimit;
+ $this->attributeValueLengthLimit = $attributeValueLengthLimit;
+ }
+
+ public function builder(iterable $attributes = [], ?AttributeValidatorInterface $attributeValidator = null): AttributesBuilderInterface
+ {
+ $builder = new AttributesBuilder(
+ [],
+ $this->attributeCountLimit,
+ $this->attributeValueLengthLimit,
+ 0,
+ $attributeValidator,
+ );
+ foreach ($attributes as $key => $value) {
+ $builder[$key] = $value;
+ }
+
+ return $builder;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php
new file mode 100644
index 000000000..1b74461d4
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+interface AttributesFactoryInterface
+{
+ public function builder(iterable $attributes = [], ?AttributeValidatorInterface $attributeValidator = null): AttributesBuilderInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php
new file mode 100644
index 000000000..1af7dc8d9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use Countable;
+use Traversable;
+
+interface AttributesInterface extends Traversable, Countable
+{
+ public function has(string $name): bool;
+
+ public function get(string $name);
+
+ public function getDroppedAttributesCount(): int;
+
+ public function toArray(): array;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php
new file mode 100644
index 000000000..d79cff96a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use function in_array;
+
+/**
+ * @internal
+ */
+final class FilteredAttributesBuilder implements AttributesBuilderInterface
+{
+ private AttributesBuilderInterface $builder;
+ private array $rejectedKeys;
+ private int $rejected = 0;
+
+ /**
+ * @param list<string> $rejectedKeys
+ */
+ public function __construct(AttributesBuilderInterface $builder, array $rejectedKeys)
+ {
+ $this->builder = $builder;
+ $this->rejectedKeys = $rejectedKeys;
+ }
+
+ public function __clone()
+ {
+ $this->builder = clone $this->builder;
+ }
+
+ public function build(): AttributesInterface
+ {
+ $attributes = $this->builder->build();
+ $dropped = $attributes->getDroppedAttributesCount() + $this->rejected;
+
+ return new Attributes($attributes->toArray(), $dropped);
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return $this->builder->offsetExists($offset);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->builder->offsetGet($offset);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($offset, $value)
+ {
+ if ($value !== null && in_array($offset, $this->rejectedKeys, true)) {
+ $this->rejected++;
+
+ return;
+ }
+
+ $this->builder->offsetSet($offset, $value);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($offset)
+ {
+ $this->builder->offsetUnset($offset);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php
new file mode 100644
index 000000000..1d9c4ae1c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+/**
+ * @internal
+ */
+final class FilteredAttributesFactory implements AttributesFactoryInterface
+{
+ private AttributesFactoryInterface $factory;
+ private array $rejectedKeys;
+
+ /**
+ * @param list<string> $rejectedKeys
+ */
+ public function __construct(AttributesFactoryInterface $factory, array $rejectedKeys)
+ {
+ $this->factory = $factory;
+ $this->rejectedKeys = $rejectedKeys;
+ }
+
+ public function builder(iterable $attributes = [], ?AttributeValidatorInterface $attributeValidator = null): AttributesBuilderInterface
+ {
+ $builder = new FilteredAttributesBuilder($this->factory->builder([], $attributeValidator), $this->rejectedKeys);
+ foreach ($attributes as $attribute => $value) {
+ $builder[$attribute] = $value;
+ }
+
+ return $builder;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php b/vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php
new file mode 100644
index 000000000..a09d26372
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+class LogRecordAttributeValidator implements AttributeValidatorInterface
+{
+ public function validate($value): bool
+ {
+ return true;
+ }
+
+ public function getInvalidMessage(): string
+ {
+ //not required as this validator always returns true
+ return 'unused';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Configuration.php b/vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
new file mode 100644
index 000000000..58673fd98
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
@@ -0,0 +1,182 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Configuration\Parser\BooleanParser;
+use OpenTelemetry\SDK\Common\Configuration\Parser\ListParser;
+use OpenTelemetry\SDK\Common\Configuration\Parser\MapParser;
+use OpenTelemetry\SDK\Common\Configuration\Parser\RatioParser;
+use OpenTelemetry\SDK\Common\Configuration\Resolver\CompositeResolver;
+use OpenTelemetry\SDK\Common\Util\ClassConstantAccessor;
+use UnexpectedValueException;
+
+/**
+ * Configuration can come from one or more of the following sources (from highest to lowest priority):
+ * - values defined in php.ini
+ * - environment variable ($_SERVER)
+ * - configuration file (todo)
+ */
+class Configuration
+{
+ use LogsMessagesTrait;
+
+ public static function has(string $name): bool
+ {
+ return CompositeResolver::instance()->hasVariable($name);
+ }
+
+ public static function getInt(string $key, int $default = null): int
+ {
+ return (int) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::INTEGER),
+ $default
+ ),
+ FILTER_VALIDATE_INT
+ );
+ }
+
+ public static function getString(string $key, string $default = null): string
+ {
+ return (string) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::STRING),
+ $default
+ )
+ );
+ }
+
+ public static function getBoolean(string $key, bool $default = null): bool
+ {
+ $resolved = self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::BOOL),
+ null === $default ? $default : ($default ? 'true' : 'false')
+ )
+ );
+
+ try {
+ return BooleanParser::parse($resolved);
+ } catch (InvalidArgumentException $e) {
+ self::logWarning(sprintf('Invalid boolean value "%s" interpreted as "false" for %s', $resolved, $key));
+
+ return false;
+ }
+ }
+
+ public static function getMixed(string $key, $default = null)
+ {
+ return self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ $key,
+ $default
+ )
+ );
+ }
+
+ public static function getMap(string $key, array $default = null): array
+ {
+ return MapParser::parse(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::MAP),
+ $default
+ )
+ );
+ }
+
+ public static function getList(string $key, array $default = null): array
+ {
+ return ListParser::parse(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::LIST),
+ $default
+ )
+ );
+ }
+
+ public static function getEnum(string $key, string $default = null): string
+ {
+ return (string) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::ENUM),
+ $default
+ )
+ );
+ }
+
+ public static function getFloat(string $key, float $default = null): float
+ {
+ return (float) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::FLOAT),
+ $default
+ ),
+ FILTER_VALIDATE_FLOAT
+ );
+ }
+
+ public static function getRatio(string $key, float $default = null): float
+ {
+ return RatioParser::parse(
+ self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::RATIO),
+ $default
+ )
+ )
+ );
+ }
+
+ public static function getKnownValues(string $variableName): ?array
+ {
+ return ClassConstantAccessor::getValue(KnownValues::class, $variableName);
+ }
+
+ public static function getDefault(string $variableName)
+ {
+ return ClassConstantAccessor::getValue(Defaults::class, $variableName);
+ }
+
+ public static function getType(string $variableName): ?string
+ {
+ return ClassConstantAccessor::getValue(ValueTypes::class, $variableName);
+ }
+
+ public static function isEmpty($value): bool
+ {
+ // don't use 'empty()', since '0' is not considered to be empty
+ return $value === null || $value === '';
+ }
+
+ private static function validateVariableType(string $variableName, string $type): string
+ {
+ $variableType = self::getType($variableName);
+
+ if ($variableType !== null && $variableType !== $type && $variableType !== VariableTypes::MIXED) {
+ throw new UnexpectedValueException(
+ sprintf('Variable "%s" is not supposed to be of type "%s" but type "%s"', $variableName, $type, $variableType)
+ );
+ }
+
+ return $variableName;
+ }
+
+ private static function validateVariableValue($value, ?int $filterType = null)
+ {
+ if ($filterType !== null && filter_var($value, $filterType) === false) {
+ throw new UnexpectedValueException(sprintf('Value has invalid type "%s"', gettype($value)));
+ }
+
+ if ($value === null || $value === '') {
+ throw new UnexpectedValueException(
+ 'Variable must not be null or empty'
+ );
+ }
+
+ return $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Defaults.php b/vendor/open-telemetry/sdk/Common/Configuration/Defaults.php
new file mode 100644
index 000000000..7228270a6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Defaults.php
@@ -0,0 +1,122 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+/**
+ * Default values for environment variables defined by the OpenTelemetry specification and language specific variables for the PHP SDK.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ */
+interface Defaults
+{
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_LOG_LEVEL = 'info';
+ public const OTEL_PROPAGATORS = 'tracecontext,baggage';
+ public const OTEL_TRACES_SAMPLER = 'parentbased_always_on';
+ public const OTEL_SDK_DISABLED = 'false';
+ /**
+ * Batch Span Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-span-processor
+ */
+ public const OTEL_BSP_SCHEDULE_DELAY = 5000;
+ public const OTEL_BSP_EXPORT_TIMEOUT = 30000;
+ public const OTEL_BSP_MAX_QUEUE_SIZE = 2048;
+ public const OTEL_BSP_MAX_EXPORT_BATCH_SIZE = 512;
+ /**
+ * Batch LogRecord Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-logrecord-processor
+ */
+ public const OTEL_BLRP_SCHEDULE_DELAY = 1000;
+ public const OTEL_BLRP_EXPORT_TIMEOUT = 30000;
+ public const OTEL_BLRP_MAX_QUEUE_SIZE = 2048;
+ public const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE = 512;
+ /**
+ * Attribute Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public const OTEL_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT = PHP_INT_MAX;
+ /**
+ * Span Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public const OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const OTEL_SPAN_EVENT_COUNT_LIMIT = 128;
+ public const OTEL_SPAN_LINK_COUNT_LIMIT = 128;
+ public const OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const OTEL_LINK_ATTRIBUTE_COUNT_LIMIT = 128;
+ /**
+ * LogRecord Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#logrecord-limits
+ */
+ public const OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = PHP_INT_MAX;
+ public const OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = 128;
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Endpoint
+ public const OTEL_EXPORTER_OTLP_ENDPOINT = 'http://localhost:4318';
+ public const OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = 'http://localhost:4318';
+ public const OTEL_EXPORTER_OTLP_METRICS_ENDPOINT = 'http://localhost:4318';
+ public const OTEL_EXPORTER_OTLP_LOGS_ENDPOINT = 'http://localhost:4318';
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = 'false';
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = 'false';
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = 'false';
+ public const OTEL_EXPORTER_OTLP_LOGS_INSECURE = 'false';
+ // Timeout (seconds)
+ public const OTEL_EXPORTER_OTLP_TIMEOUT = 10;
+ public const OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = 10;
+ public const OTEL_EXPORTER_OTLP_METRICS_TIMEOUT = 10;
+ public const OTEL_EXPORTER_OTLP_LOGS_TIMEOUT = 10;
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = 'http/protobuf';
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'http/protobuf';
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = 'http/protobuf';
+ public const OTEL_EXPORTER_OTLP_LOGS_PROTOCOL = 'http/protobuf';
+ /**
+ * Zipkin Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#zipkin-exporter
+ */
+ public const OTEL_EXPORTER_ZIPKIN_ENDPOINT = 'http://localhost:9411/api/v2/spans';
+ // Timeout (seconds)
+ public const OTEL_EXPORTER_ZIPKIN_TIMEOUT = 10;
+ /**
+ * Prometheus Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#prometheus-exporter
+ */
+ public const OTEL_EXPORTER_PROMETHEUS_HOST = '0.0.0.0';
+ public const OTEL_EXPORTER_PROMETHEUS_PORT = 9464;
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = 'otlp';
+ public const OTEL_METRICS_EXPORTER = 'otlp';
+ public const OTEL_LOGS_EXPORTER = 'otlp';
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = 'with_sampled_trace';
+ public const OTEL_METRIC_EXPORT_INTERVAL = 60000;
+ public const OTEL_METRIC_EXPORT_TIMEOUT = 30000;
+ public const OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = 'cumulative';
+ public const OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = 'explicit_bucket_histogram';
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = 'batch';
+ public const OTEL_PHP_DETECTORS = 'all';
+ public const OTEL_PHP_AUTOLOAD_ENABLED = 'false';
+ public const OTEL_PHP_INTERNAL_METRICS_ENABLED = 'false';
+ public const OTEL_PHP_DISABLED_INSTRUMENTATIONS = [];
+ public const OTEL_PHP_LOGS_PROCESSOR = 'batch';
+ public const OTEL_PHP_LOG_DESTINATION = 'default';
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php b/vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php
new file mode 100644
index 000000000..8975b20f9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php
@@ -0,0 +1,208 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+use Psr\Log\LogLevel;
+
+/**
+ * "Known values" for OpenTelemetry configurataion variables.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ * Notice: Values specific to the PHP SDK have been added
+ */
+interface KnownValues
+{
+ public const VALUE_TRUE = 'true';
+ public const VALUE_FALSE = 'false';
+ public const VALUE_ON = 'on';
+ public const VALUE_OFF = 'off';
+ public const VALUE_1 = '1';
+ public const VALUE_0 = '0';
+ public const VALUE_ALL = 'all';
+ public const VALUE_NONE = 'none';
+ public const VALUE_TRACECONTEXT = 'tracecontext';
+ public const VALUE_BAGGAGE = 'baggage';
+ public const VALUE_B3 = 'b3';
+ public const VALUE_B3_MULTI = 'b3multi';
+ public const VALUE_XRAY = 'xray';
+ public const VALUE_OTTRACE = 'ottrace';
+ public const VALUE_ALWAYS_ON = 'always_on';
+ public const VALUE_ALWAYS_OFF = 'always_off';
+ public const VALUE_TRACE_ID_RATIO = 'traceidratio';
+ public const VALUE_PARENT_BASED_ALWAYS_ON = 'parentbased_always_on';
+ public const VALUE_PARENT_BASED_ALWAYS_OFF = 'parentbased_always_off';
+ public const VALUE_PARENT_BASED_TRACE_ID_RATIO = 'parentbased_traceidratio';
+ public const VALUE_GZIP = 'gzip';
+ public const VALUE_GRPC = 'grpc';
+ public const VALUE_HTTP_PROTOBUF = 'http/protobuf';
+ public const VALUE_HTTP_JSON = 'http/json';
+ public const VALUE_HTTP_NDJSON = 'http/ndjson';
+ public const VALUE_OTLP = 'otlp';
+ public const VALUE_ZIPKIN = 'zipkin';
+ public const VALUE_PROMETHEUS = 'prometheus';
+ public const VALUE_WITH_SAMPLED_TRACE = 'with_sampled_trace';
+ public const VALUE_BATCH = 'batch';
+ public const VALUE_SIMPLE = 'simple';
+ public const VALUE_NOOP = 'noop';
+ public const VALUE_LOG_EMERGENCY = LogLevel::EMERGENCY;
+ public const VALUE_LOG_ALERT = LogLevel::ALERT;
+ public const VALUE_LOG_CRITICAL = LogLevel::CRITICAL;
+ public const VALUE_LOG_ERROR = LogLevel::ERROR;
+ public const VALUE_LOG_WARNING = LogLevel::WARNING;
+ public const VALUE_LOG_NOTICE = LogLevel::NOTICE;
+ public const VALUE_LOG_INFO = LogLevel::INFO;
+ public const VALUE_LOG_DEBUG = LogLevel::DEBUG;
+ public const VALUE_TEMPORALITY_CUMULATIVE = 'cumulative';
+ public const VALUE_TEMPORALITY_DELTA = 'delta';
+ public const VALUE_TEMPORALITY_LOW_MEMORY = 'lowmemory';
+ public const VALUE_HISTOGRAM_AGGREGATION_EXPLICIT = 'explicit_bucket_histogram';
+ public const VALUE_HISTOGRAM_AGGREGATION_BASE2_EXPONENTIAL = 'base2_exponential_bucket_histogram';
+
+ public const VALUES_BOOLEAN = [
+ self::VALUE_TRUE,
+ self::VALUE_FALSE,
+ ];
+
+ public const VALUES_COMPRESSION= [
+ self::VALUE_GZIP,
+ self::VALUE_NONE,
+ ];
+
+ public const VALUES_OTLP_PROTOCOL = [
+ self::VALUE_GRPC,
+ self::VALUE_HTTP_PROTOBUF,
+ self::VALUE_HTTP_JSON,
+ ];
+
+ public const VALUES_TEMPORALITY_PREFERENCE = [
+ self::VALUE_TEMPORALITY_CUMULATIVE,
+ self::VALUE_TEMPORALITY_DELTA,
+ self::VALUE_TEMPORALITY_LOW_MEMORY,
+ ];
+
+ public const VALUES_HISTOGRAM_AGGREGATION = [
+ self::VALUE_HISTOGRAM_AGGREGATION_EXPLICIT,
+ self::VALUE_HISTOGRAM_AGGREGATION_BASE2_EXPONENTIAL,
+ ];
+
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_LOG_LEVEL = [
+ self::VALUE_LOG_EMERGENCY,
+ self::VALUE_LOG_ALERT,
+ self::VALUE_LOG_CRITICAL,
+ self::VALUE_LOG_ERROR,
+ self::VALUE_LOG_WARNING,
+ self::VALUE_LOG_NOTICE,
+ self::VALUE_LOG_INFO,
+ self::VALUE_LOG_DEBUG,
+ ];
+ public const OTEL_PROPAGATORS = [
+ self::VALUE_TRACECONTEXT, // W3C Trace Context
+ self::VALUE_BAGGAGE, // W3C Baggage
+ self::VALUE_B3, // B3 Single
+ self::VALUE_B3_MULTI, // B3 Multi
+ self::VALUE_XRAY, // AWS X-Ray (third party)
+ self::VALUE_OTTRACE, // OT Trace (third party)
+ self::VALUE_NONE, // No automatically configured propagator.
+ ];
+ public const OTEL_TRACES_SAMPLER = [
+ self::VALUE_ALWAYS_ON,
+ self::VALUE_ALWAYS_OFF,
+ self::VALUE_TRACE_ID_RATIO,
+ self::VALUE_PARENT_BASED_ALWAYS_ON,
+ self::VALUE_PARENT_BASED_ALWAYS_OFF,
+ self::VALUE_PARENT_BASED_TRACE_ID_RATIO,
+ self::VALUE_XRAY,
+ ];
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = self::VALUES_BOOLEAN;
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = self::VALUES_BOOLEAN;
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = self::VALUES_BOOLEAN;
+ // Compression
+ public const OTEL_EXPORTER_OTLP_COMPRESSION = self::VALUES_COMPRESSION;
+ public const OTEL_EXPORTER_OTLP_TRACES_COMPRESSION = self::VALUES_COMPRESSION;
+ public const OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = self::VALUES_COMPRESSION;
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = self::VALUES_OTLP_PROTOCOL;
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = self::VALUES_OTLP_PROTOCOL;
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = self::VALUES_OTLP_PROTOCOL;
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = [
+ self::VALUE_OTLP,
+ self::VALUE_ZIPKIN,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_METRICS_EXPORTER = [
+ self::VALUE_OTLP,
+ self::VALUE_PROMETHEUS,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_LOGS_EXPORTER = [
+ self::VALUE_OTLP,
+ self::VALUE_NONE,
+ ];
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = [
+ self::VALUE_WITH_SAMPLED_TRACE,
+ self::VALUE_ALL,
+ self::VALUE_NONE,
+ ];
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = [
+ self::VALUE_BATCH,
+ self::VALUE_SIMPLE,
+ self::VALUE_NOOP,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_PHP_AUTOLOAD_ENABLED = self::VALUES_BOOLEAN;
+ public const VALUE_ERROR_LOG = 'error_log';
+ public const VALUE_STDERR = 'stderr';
+ public const VALUE_STDOUT = 'stdout';
+ public const VALUE_PSR3 = 'psr3';
+ public const VALUE_EMPTY = '';
+ public const VALUE_DETECTORS_ENVIRONMENT = 'env';
+ public const VALUE_DETECTORS_HOST = 'host';
+ public const VALUE_DETECTORS_OS = 'os';
+ public const VALUE_DETECTORS_PROCESS = 'process';
+ public const VALUE_DETECTORS_PROCESS_RUNTIME = 'process_runtime';
+ public const VALUE_DETECTORS_SDK = 'sdk';
+ public const VALUE_DETECTORS_SDK_PROVIDED = 'sdk_provided';
+ public const VALUE_DETECTORS_COMPOSER = 'composer';
+ public const OTEL_PHP_DETECTORS = [
+ self::VALUE_ALL,
+ self::VALUE_DETECTORS_ENVIRONMENT,
+ self::VALUE_DETECTORS_HOST,
+ self::VALUE_DETECTORS_OS,
+ self::VALUE_DETECTORS_PROCESS,
+ self::VALUE_DETECTORS_PROCESS_RUNTIME,
+ self::VALUE_DETECTORS_SDK,
+ self::VALUE_DETECTORS_SDK_PROVIDED,
+ self::VALUE_DETECTORS_COMPOSER,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_PHP_LOG_DESTINATION = [
+ self::VALUE_ERROR_LOG,
+ self::VALUE_STDERR,
+ self::VALUE_STDOUT,
+ self::VALUE_PSR3,
+ self::VALUE_EMPTY,
+ self::VALUE_NONE,
+ ];
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php
new file mode 100644
index 000000000..4141c61ef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+use InvalidArgumentException;
+
+class BooleanParser
+{
+ private const TRUE_VALUE = 'true';
+ private const FALSE_VALUE = 'false';
+
+ /**
+ * @param string|bool $value
+ */
+ public static function parse($value): bool
+ {
+ if (is_bool($value)) {
+ return $value;
+ }
+ if (strtolower($value) === self::TRUE_VALUE) {
+ return true;
+ }
+
+ if (strtolower($value) === self::FALSE_VALUE) {
+ return false;
+ }
+
+ throw new InvalidArgumentException(
+ sprintf('Value "%s" is a non-boolean value', $value)
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php
new file mode 100644
index 000000000..f27b16597
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+class ListParser
+{
+ private const DEFAULT_SEPARATOR = ',';
+
+ /**
+ * @param string|array $value
+ */
+ public static function parse($value): array
+ {
+ if (is_array($value)) {
+ return $value;
+ }
+ if (trim($value) === '') {
+ return [];
+ }
+
+ return array_map(
+ fn ($value) => trim($value),
+ explode(self::DEFAULT_SEPARATOR, $value)
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php
new file mode 100644
index 000000000..273d57c87
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php
@@ -0,0 +1,45 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+use InvalidArgumentException;
+
+class MapParser
+{
+ private const VARIABLE_SEPARATOR = ',';
+ private const KEY_VALUE_SEPARATOR = '=';
+
+ public static function parse($value): array
+ {
+ if (is_array($value)) {
+ return $value;
+ }
+ $result = [];
+
+ if (null === $value || trim($value) === '') {
+ return $result;
+ }
+
+ foreach (explode(self::VARIABLE_SEPARATOR, $value) as $pair) {
+ self::validateKeyValuePair($pair);
+
+ [$key, $value] = explode(self::KEY_VALUE_SEPARATOR, $pair, 2);
+ $result[trim($key)] = trim($value);
+ }
+
+ return $result;
+ }
+
+ private static function validateKeyValuePair(string $pair)
+ {
+ if (strpos($pair, self::KEY_VALUE_SEPARATOR) === false) {
+ throw new InvalidArgumentException(sprintf(
+ 'Key-Value pair "%s" does not contain separator "%s"',
+ $pair,
+ self::KEY_VALUE_SEPARATOR
+ ));
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php
new file mode 100644
index 000000000..f0fe32100
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+use InvalidArgumentException;
+use RangeException;
+
+class RatioParser
+{
+ private const MAX_VALUE = 1;
+ private const MIN_VALUE = 0;
+
+ public static function parse($value): float
+ {
+ if (filter_var($value, FILTER_VALIDATE_FLOAT) === false) {
+ throw new InvalidArgumentException(
+ sprintf('Value "%s" contains non-numeric value', $value)
+ );
+ }
+
+ $result = (float) $value;
+
+ if ($result > self::MAX_VALUE || $result < self::MIN_VALUE) {
+ throw new RangeException(
+ sprintf(
+ 'Value must not be lower than %s or higher than %s. Given: %s',
+ self::MIN_VALUE,
+ self::MAX_VALUE,
+ $value
+ )
+ );
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php
new file mode 100644
index 000000000..b72400b01
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php
@@ -0,0 +1,68 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+
+/**
+ * @interal
+ */
+class CompositeResolver
+{
+ // @var array<ResolverInterface>
+ private array $resolvers = [];
+
+ public static function instance(): self
+ {
+ static $instance;
+ $instance ??= new self([
+ new PhpIniResolver(),
+ new EnvironmentResolver(),
+ ]);
+
+ return $instance;
+ }
+
+ public function __construct($resolvers)
+ {
+ foreach ($resolvers as $resolver) {
+ $this->addResolver($resolver);
+ }
+ }
+
+ public function addResolver(ResolverInterface $resolver): void
+ {
+ $this->resolvers[] = $resolver;
+ }
+
+ public function getResolvers(): array
+ {
+ return $this->resolvers;
+ }
+
+ public function resolve(string $variableName, $default = '')
+ {
+ foreach ($this->resolvers as $resolver) {
+ if ($resolver->hasVariable($variableName)) {
+ return $resolver->retrieveValue($variableName);
+ }
+ }
+
+ return Configuration::isEmpty($default)
+ ? Configuration::getDefault($variableName)
+ : $default;
+ }
+
+ public function hasVariable(string $variableName): bool
+ {
+ foreach ($this->resolvers as $resolver) {
+ if ($resolver->hasVariable($variableName)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php
new file mode 100644
index 000000000..453f98e39
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+
+/**
+ * @internal
+ */
+class EnvironmentResolver implements ResolverInterface
+{
+ public function hasVariable(string $variableName): bool
+ {
+ if (!Configuration::isEmpty($_SERVER[$variableName] ?? null)) {
+ return true;
+ }
+ $env = getenv($variableName);
+ if ($env === false) {
+ return false;
+ }
+
+ return !Configuration::isEmpty($env);
+ }
+
+ /**
+ * @psalm-suppress InvalidReturnStatement
+ * @psalm-suppress InvalidReturnType
+ */
+ public function retrieveValue(string $variableName)
+ {
+ $value = getenv($variableName);
+ if ($value === false) {
+ $value = $_SERVER[$variableName] ?? null;
+ }
+
+ return $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php
new file mode 100644
index 000000000..a12b507e8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+class PhpIniAccessor
+{
+ /**
+ * Mockable accessor for php.ini values
+ * @internal
+ * @return array|false|string
+ */
+ public function get(string $variableName)
+ {
+ return get_cfg_var($variableName);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php
new file mode 100644
index 000000000..c9a8f3b4e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+
+/**
+ * @interal
+ * @psalm-suppress TypeDoesNotContainType
+ */
+class PhpIniResolver implements ResolverInterface
+{
+ private PhpIniAccessor $accessor;
+
+ public function __construct(?PhpIniAccessor $accessor = null)
+ {
+ $this->accessor = $accessor ?? new PhpIniAccessor();
+ }
+
+ public function retrieveValue(string $variableName)
+ {
+ $value = $this->accessor->get($variableName) ?: '';
+ if (is_array($value)) {
+ return implode(',', $value);
+ }
+
+ return $value;
+ }
+
+ public function hasVariable(string $variableName): bool
+ {
+ $value = $this->accessor->get($variableName);
+ if ($value === []) {
+ return false;
+ }
+
+ return $value !== false && !Configuration::isEmpty($value);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php
new file mode 100644
index 000000000..4e88f3ff6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+interface ResolverInterface
+{
+ /**
+ * @return mixed
+ */
+ public function retrieveValue(string $variableName);
+
+ public function hasVariable(string $variableName): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php b/vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php
new file mode 100644
index 000000000..64a69f6a7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php
@@ -0,0 +1,133 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+/**
+ * Environment variables defined by the OpenTelemetry specification and language specific variables for the PHP SDK.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ */
+interface ValueTypes
+{
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_RESOURCE_ATTRIBUTES = VariableTypes::MAP;
+ public const OTEL_SERVICE_NAME = VariableTypes::STRING;
+ public const OTEL_LOG_LEVEL = VariableTypes::ENUM;
+ public const OTEL_PROPAGATORS = VariableTypes::LIST;
+ public const OTEL_TRACES_SAMPLER = VariableTypes::STRING;
+ public const OTEL_TRACES_SAMPLER_ARG = VariableTypes::MIXED;
+ /**
+ * Batch Span Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-span-processor
+ */
+ public const OTEL_BSP_SCHEDULE_DELAY = VariableTypes::INTEGER;
+ public const OTEL_BSP_EXPORT_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_BSP_MAX_QUEUE_SIZE = VariableTypes::INTEGER;
+ public const OTEL_BSP_MAX_EXPORT_BATCH_SIZE = VariableTypes::INTEGER;
+ /**
+ * Batch LogRecord Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-logrecord-processor
+ */
+ public const OTEL_BLRP_SCHEDULE_DELAY = VariableTypes::INTEGER;
+ public const OTEL_BLRP_EXPORT_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_BLRP_MAX_QUEUE_SIZE = VariableTypes::INTEGER;
+ public const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE = VariableTypes::INTEGER;
+ /**
+ * Attribute Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public const OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ /**
+ * Span Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public const OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_SPAN_EVENT_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_SPAN_LINK_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_LINK_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ /**
+ * LogRecord Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#logrecord-limits
+ */
+ public const OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Endpoint
+ public const OTEL_EXPORTER_OTLP_ENDPOINT = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_METRICS_ENDPOINT = VariableTypes::STRING;
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = VariableTypes::BOOL;
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = VariableTypes::BOOL;
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = VariableTypes::BOOL;
+ // Certificate File
+ public const OTEL_EXPORTER_OTLP_CERTIFICATE = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE = VariableTypes::STRING;
+ // Headers
+ public const OTEL_EXPORTER_OTLP_HEADERS = VariableTypes::MAP;
+ public const OTEL_EXPORTER_OTLP_TRACES_HEADERS = VariableTypes::MAP;
+ public const OTEL_EXPORTER_OTLP_METRICS_HEADERS = VariableTypes::MAP;
+ // Compression
+ public const OTEL_EXPORTER_OTLP_COMPRESSION = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_TRACES_COMPRESSION = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = VariableTypes::ENUM;
+ // Timeout
+ public const OTEL_EXPORTER_OTLP_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_OTLP_METRICS_TIMEOUT = VariableTypes::INTEGER;
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = VariableTypes::ENUM;
+ /**
+ * Zipkin Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#zipkin-exporter
+ */
+ public const OTEL_EXPORTER_ZIPKIN_ENDPOINT = VariableTypes::STRING;
+ public const OTEL_EXPORTER_ZIPKIN_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_ZIPKIN_PROTOCOL = VariableTypes::STRING;
+ /**
+ * Prometheus Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#prometheus-exporter
+ */
+ public const OTEL_EXPORTER_PROMETHEUS_HOST = VariableTypes::STRING;
+ public const OTEL_EXPORTER_PROMETHEUS_PORT = VariableTypes::INTEGER;
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = VariableTypes::LIST;
+ public const OTEL_METRICS_EXPORTER = VariableTypes::LIST;
+ public const OTEL_LOGS_EXPORTER = VariableTypes::LIST;
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = VariableTypes::ENUM;
+ public const OTEL_METRIC_EXPORT_INTERVAL = VariableTypes::INTEGER;
+ public const OTEL_METRIC_EXPORT_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = VariableTypes::ENUM;
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = VariableTypes::ENUM;
+ public const OTEL_PHP_LOGS_PROCESSOR = VariableTypes::LIST;
+ public const OTEL_PHP_DETECTORS = VariableTypes::LIST;
+ public const OTEL_PHP_AUTOLOAD_ENABLED = VariableTypes::BOOL;
+ public const OTEL_PHP_LOG_DESTINATION = VariableTypes::ENUM;
+ public const OTEL_PHP_INTERNAL_METRICS_ENABLED = VariableTypes::BOOL;
+ public const OTEL_PHP_DISABLED_INSTRUMENTATIONS = VariableTypes::LIST;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php b/vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php
new file mode 100644
index 000000000..471632e16
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+interface VariableTypes
+{
+ /**
+ * A single boolean value represented as a string or integer ('true', 'false', 0, 1)
+ * example: value1
+ */
+ public const BOOL = 'bool';
+
+ /**
+ * A single string value
+ * example: value1
+ */
+ public const STRING = 'string';
+
+ /**
+ * A single integer value
+ * example: 5000
+ */
+ public const INTEGER = 'integer';
+
+ /**
+ * A single float value
+ * example: 10.5
+ */
+ public const FLOAT = 'float';
+
+ /**
+ * A single float value between 0.0 and 1.0
+ * example: 0.5
+ */
+ public const RATIO = 'ratio';
+
+ /**
+ * A single string value from a fixed list of values
+ * example values: value1, value2, value3
+ * example: value1
+ */
+ public const ENUM = 'enum';
+
+ /**
+ * A comma separated list of single string values
+ * example: value1,value2,value3
+ */
+ public const LIST = 'list';
+
+ /**
+ * A comma separated list of key-value pairs
+ * example: key1=value1,key2=value2
+ */
+ public const MAP = 'map';
+
+ /**
+ * Values of mixed type
+ */
+ public const MIXED = 'mixed';
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Variables.php b/vendor/open-telemetry/sdk/Common/Configuration/Variables.php
new file mode 100644
index 000000000..d0bb3c8ab
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Variables.php
@@ -0,0 +1,142 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+/**
+ * Environment variables defined by the OpenTelemetry specification and language specific variables for the PHP SDK.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ */
+interface Variables
+{
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_RESOURCE_ATTRIBUTES = 'OTEL_RESOURCE_ATTRIBUTES';
+ public const OTEL_SERVICE_NAME = 'OTEL_SERVICE_NAME';
+ public const OTEL_LOG_LEVEL = 'OTEL_LOG_LEVEL';
+ public const OTEL_PROPAGATORS = 'OTEL_PROPAGATORS';
+ public const OTEL_TRACES_SAMPLER = 'OTEL_TRACES_SAMPLER';
+ public const OTEL_TRACES_SAMPLER_ARG = 'OTEL_TRACES_SAMPLER_ARG';
+ public const OTEL_SDK_DISABLED = 'OTEL_SDK_DISABLED';
+ /**
+ * Batch Span Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-span-processor
+ */
+ public const OTEL_BSP_SCHEDULE_DELAY = 'OTEL_BSP_SCHEDULE_DELAY';
+ public const OTEL_BSP_EXPORT_TIMEOUT = 'OTEL_BSP_EXPORT_TIMEOUT';
+ public const OTEL_BSP_MAX_QUEUE_SIZE = 'OTEL_BSP_MAX_QUEUE_SIZE';
+ public const OTEL_BSP_MAX_EXPORT_BATCH_SIZE = 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE';
+ /**
+ * Batch LogRecord Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-logrecord-processor
+ */
+ public const OTEL_BLRP_SCHEDULE_DELAY = 'OTEL_BLRP_SCHEDULE_DELAY';
+ public const OTEL_BLRP_EXPORT_TIMEOUT = 'OTEL_BLRP_EXPORT_TIMEOUT';
+ public const OTEL_BLRP_MAX_QUEUE_SIZE = 'OTEL_BLRP_MAX_QUEUE_SIZE';
+ public const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE = 'OTEL_BLRP_MAX_EXPORT_BATCH_SIZE';
+ /**
+ * Attribute Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public const OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT';
+ public const OTEL_ATTRIBUTE_COUNT_LIMIT = 'OTEL_ATTRIBUTE_COUNT_LIMIT';
+ /**
+ * LogRecord limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#logrecord-limits
+ */
+ public const OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT';
+ public const OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = 'OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT';
+ /**
+ * Span Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public const OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT';
+ public const OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT';
+ public const OTEL_SPAN_EVENT_COUNT_LIMIT = 'OTEL_SPAN_EVENT_COUNT_LIMIT';
+ public const OTEL_SPAN_LINK_COUNT_LIMIT = 'OTEL_SPAN_LINK_COUNT_LIMIT';
+ public const OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT = 'OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT';
+ public const OTEL_LINK_ATTRIBUTE_COUNT_LIMIT = 'OTEL_LINK_ATTRIBUTE_COUNT_LIMIT';
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Endpoint
+ public const OTEL_EXPORTER_OTLP_ENDPOINT = 'OTEL_EXPORTER_OTLP_ENDPOINT';
+ public const OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = 'OTEL_EXPORTER_OTLP_TRACES_ENDPOINT';
+ public const OTEL_EXPORTER_OTLP_METRICS_ENDPOINT = 'OTEL_EXPORTER_OTLP_METRICS_ENDPOINT';
+ public const OTEL_EXPORTER_OTLP_LOGS_ENDPOINT = 'OTEL_EXPORTER_OTLP_LOGS_ENDPOINT';
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = 'OTEL_EXPORTER_OTLP_INSECURE';
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = 'OTEL_EXPORTER_OTLP_TRACES_INSECURE';
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = 'OTEL_EXPORTER_OTLP_METRICS_INSECURE';
+ public const OTEL_EXPORTER_OTLP_LOGS_INSECURE = 'OTEL_EXPORTER_OTLP_LOGS_INSECURE';
+ // Certificate File
+ public const OTEL_EXPORTER_OTLP_CERTIFICATE = 'OTEL_EXPORTER_OTLP_CERTIFICATE';
+ public const OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE = 'OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE';
+ public const OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE = 'OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE';
+ public const OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE = 'OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE';
+ // Headers
+ public const OTEL_EXPORTER_OTLP_HEADERS = 'OTEL_EXPORTER_OTLP_HEADERS';
+ public const OTEL_EXPORTER_OTLP_TRACES_HEADERS = 'OTEL_EXPORTER_OTLP_TRACES_HEADERS';
+ public const OTEL_EXPORTER_OTLP_METRICS_HEADERS = 'OTEL_EXPORTER_OTLP_METRICS_HEADERS';
+ public const OTEL_EXPORTER_OTLP_LOGS_HEADERS = 'OTEL_EXPORTER_OTLP_LOGS_HEADERS';
+ // Compression
+ public const OTEL_EXPORTER_OTLP_COMPRESSION = 'OTEL_EXPORTER_OTLP_COMPRESSION';
+ public const OTEL_EXPORTER_OTLP_TRACES_COMPRESSION = 'OTEL_EXPORTER_OTLP_TRACES_COMPRESSION';
+ public const OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = 'OTEL_EXPORTER_OTLP_METRICS_COMPRESSION';
+ public const OTEL_EXPORTER_OTLP_LOGS_COMPRESSION = 'OTEL_EXPORTER_OTLP_LOGS_COMPRESSION';
+ // Timeout
+ public const OTEL_EXPORTER_OTLP_TIMEOUT = 'OTEL_EXPORTER_OTLP_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_METRICS_TIMEOUT = 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_LOGS_TIMEOUT = 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT';
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = 'OTEL_EXPORTER_OTLP_PROTOCOL';
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'OTEL_EXPORTER_OTLP_TRACES_PROTOCOL';
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = 'OTEL_EXPORTER_OTLP_METRICS_PROTOCOL';
+ public const OTEL_EXPORTER_OTLP_LOGS_PROTOCOL = 'OTEL_EXPORTER_OTLP_LOGS_PROTOCOL';
+ /**
+ * Zipkin Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#zipkin-exporter
+ */
+ public const OTEL_EXPORTER_ZIPKIN_ENDPOINT = 'OTEL_EXPORTER_ZIPKIN_ENDPOINT';
+ public const OTEL_EXPORTER_ZIPKIN_TIMEOUT = 'OTEL_EXPORTER_ZIPKIN_TIMEOUT';
+ public const OTEL_EXPORTER_ZIPKIN_PROTOCOL = 'OTEL_EXPORTER_ZIPKIN_PROTOCOL';
+ /**
+ * Prometheus Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#prometheus-exporter
+ */
+ public const OTEL_EXPORTER_PROMETHEUS_HOST = 'OTEL_EXPORTER_PROMETHEUS_HOST';
+ public const OTEL_EXPORTER_PROMETHEUS_PORT = 'OTEL_EXPORTER_PROMETHEUS_PORT';
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = 'OTEL_TRACES_EXPORTER';
+ public const OTEL_METRICS_EXPORTER = 'OTEL_METRICS_EXPORTER';
+ public const OTEL_LOGS_EXPORTER = 'OTEL_LOGS_EXPORTER';
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#periodic-exporting-metricreader
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = 'OTEL_METRICS_EXEMPLAR_FILTER';
+ public const OTEL_METRIC_EXPORT_INTERVAL = 'OTEL_METRIC_EXPORT_INTERVAL';
+ public const OTEL_METRIC_EXPORT_TIMEOUT = 'OTEL_METRIC_EXPORT_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = 'OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE';
+ public const OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = 'OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION';
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = 'OTEL_PHP_TRACES_PROCESSOR';
+ public const OTEL_PHP_LOGS_PROCESSOR = 'OTEL_PHP_LOGS_PROCESSOR';
+ public const OTEL_PHP_LOG_DESTINATION = 'OTEL_PHP_LOG_DESTINATION';
+ public const OTEL_PHP_DETECTORS = 'OTEL_PHP_DETECTORS';
+ public const OTEL_PHP_AUTOLOAD_ENABLED = 'OTEL_PHP_AUTOLOAD_ENABLED';
+ public const OTEL_PHP_INTERNAL_METRICS_ENABLED = 'OTEL_PHP_INTERNAL_METRICS_ENABLED'; //whether the SDK should emit its own metrics
+ public const OTEL_PHP_DISABLED_INSTRUMENTATIONS = 'OTEL_PHP_DISABLED_INSTRUMENTATIONS';
+}
diff --git a/vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md
new file mode 100644
index 000000000..661eed3b8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md
@@ -0,0 +1,14 @@
+# Backwards Compatibility
+
+We aim to provide backward compatibility (without any guarantee) even for alpha releases, however the library will raise notices indicating breaking changes and what to do about them. \
+If you don't want these notices to appear or change the error message level, you can do so by calling:
+```php
+OpenTelemetry\SDK\Common\Dev\Compatibility\Util::setErrorLevel(0)
+```
+to turn messages off completely, or (for example)
+```php
+OpenTelemetry\SDK\Common\Dev\Compatibility\Util::setErrorLevel(E_USER_DEPRECATED)
+```
+to trigger only deprecation notices. Valid error levels are `0` (none), `E_USER_DEPRECATED`, `E_USER_NOTICE`, `E_USER_WARNING` and `E_USER_ERROR` \
+However (as long as in alpha) it is safer to pin a dependency on the library to a specific version and/or make the adjustments
+mentioned in the provided messages, since doing otherwise may break things completely for you in the future!
diff --git a/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php
new file mode 100644
index 000000000..1a3debfdd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php
@@ -0,0 +1,93 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Dev\Compatibility;
+
+class Util
+{
+ public const E_NONE = 0;
+ public const DEFAULT_ERROR_LEVEL = E_USER_NOTICE;
+ public const ERROR_LEVELS = [
+ self::E_NONE,
+ E_USER_DEPRECATED,
+ E_USER_NOTICE,
+ E_USER_WARNING,
+ E_USER_ERROR,
+ ];
+
+ private static int $errorLevel = E_USER_NOTICE;
+
+ public static function setErrorLevel(int $errorLevel = E_USER_NOTICE): void
+ {
+ self::validateErrorLevel($errorLevel);
+
+ self::$errorLevel = $errorLevel;
+ }
+
+ public static function getErrorLevel(): int
+ {
+ return self::$errorLevel;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public static function triggerClassDeprecationNotice(string $className, string $alternativeClassName = null): void
+ {
+ if (self::getErrorLevel() === self::E_NONE) {
+ return;
+ }
+
+ $notice = sprintf(
+ 'Class "%s" is deprecated and will be removed in a future release. ',
+ $className
+ );
+
+ if ($alternativeClassName !== null) {
+ $notice .= sprintf('Please, use "%s" instead.', $alternativeClassName);
+ }
+
+ trigger_error($notice, self::$errorLevel);
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public static function triggerMethodDeprecationNotice(
+ string $methodName,
+ string $alternativeMethodName = null,
+ string $alternativeClassName = null
+ ): void {
+ if (self::getErrorLevel() === self::E_NONE) {
+ return;
+ }
+
+ $notice = sprintf(
+ 'Method "%s " is deprecated and will be removed in a future release. ',
+ $methodName
+ );
+
+ if ($alternativeMethodName !== null) {
+ $method = $alternativeClassName === null
+ ? $alternativeMethodName
+ : sprintf('%s::%s', $alternativeClassName, $alternativeMethodName);
+
+ $notice .= sprintf('Please, use "%s" instead.', $method);
+ }
+
+ trigger_error($notice, self::$errorLevel);
+ }
+
+ private static function validateErrorLevel(int $errorLevel): void
+ {
+ if (!in_array($errorLevel, self::ERROR_LEVELS, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ 'Error level must be one of "%s"',
+ implode('", "', self::ERROR_LEVELS)
+ ),
+ );
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php
new file mode 100644
index 000000000..99f86c574
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php
@@ -0,0 +1,7 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * To add a BC compatibility:
+ * require_once __DIR__ . '/BC/SomeFile.php';
+ */
diff --git a/vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php b/vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php
new file mode 100644
index 000000000..675fc7626
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php
@@ -0,0 +1,155 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Exception;
+
+use function basename;
+use function count;
+use function get_class;
+use function sprintf;
+use function str_repeat;
+
+use Throwable;
+
+/**
+ * @psalm-type Frame = array{
+ * function: string,
+ * class: ?class-string,
+ * file: ?string,
+ * line: ?int,
+ * }
+ * @psalm-type Frames = non-empty-list<Frame>
+ */
+final class StackTraceFormatter
+{
+ private function __construct()
+ {
+ }
+
+ /**
+ * Formats an exception in a java-like format.
+ *
+ * @param Throwable $e exception to format
+ * @return string formatted exception
+ *
+ * @see https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Throwable.html#printStackTrace()
+ */
+ public static function format(Throwable $e): string
+ {
+ $s = '';
+ $seen = [];
+
+ /** @var Frames|null $enclosing */
+ $enclosing = null;
+ do {
+ if ($enclosing) {
+ self::writeNewline($s);
+ $s .= 'Caused by: ';
+ }
+ if (isset($seen[spl_object_id($e)])) {
+ $s .= '[CIRCULAR REFERENCE: ';
+ self::writeInlineHeader($s, $e);
+ $s .= ']';
+
+ break;
+ }
+ $seen[spl_object_id($e)] = $e;
+
+ $frames = self::frames($e);
+ self::writeInlineHeader($s, $e);
+ self::writeFrames($s, $frames, $enclosing);
+
+ $enclosing = $frames;
+ } while ($e = $e->getPrevious());
+
+ return $s;
+ }
+
+ /**
+ * @phan-suppress-next-line PhanTypeMismatchDeclaredParam
+ * @param Frames $frames
+ * @phan-suppress-next-line PhanTypeMismatchDeclaredParam
+ * @param Frames|null $enclosing
+ */
+ private static function writeFrames(string &$s, array $frames, ?array $enclosing): void
+ {
+ $n = count($frames);
+ if ($enclosing) {
+ for ($m = count($enclosing);
+ $n && $m && $frames[$n - 1] === $enclosing[$m - 1];
+ $n--, $m--) {
+ }
+ }
+ for ($i = 0; $i < $n; $i++) {
+ $frame = $frames[$i];
+ self::writeNewline($s, 1);
+ $s .= 'at ';
+ if ($frame['class'] !== null) {
+ $s .= self::formatName($frame['class']);
+ $s .= '.';
+ }
+ $s .= self::formatName($frame['function']);
+ $s .= '(';
+ if ($frame['file'] !== null) {
+ $s .= basename($frame['file']);
+ if ($frame['line']) {
+ $s .= ':';
+ $s .= $frame['line'];
+ }
+ } else {
+ $s .= 'Unknown Source';
+ }
+ $s .= ')';
+ }
+ if ($n !== count($frames)) {
+ self::writeNewline($s, 1);
+ $s .= sprintf('... %d more', count($frames) - $n);
+ }
+ }
+
+ private static function writeInlineHeader(string &$s, Throwable $e): void
+ {
+ $s .= self::formatName(get_class($e));
+ if ($e->getMessage() !== '') {
+ $s .= ': ';
+ $s .= $e->getMessage();
+ }
+ }
+
+ private static function writeNewline(string &$s, int $indent = 0): void
+ {
+ $s .= "\n";
+ $s .= str_repeat("\t", $indent);
+ }
+
+ /**
+ * @return Frames
+ *
+ * @psalm-suppress PossiblyUndefinedArrayOffset
+ */
+ private static function frames(Throwable $e): array
+ {
+ $frames = [];
+ $trace = $e->getTrace();
+ $traceCount = count($trace);
+ for ($i = 0; $i < $traceCount + 1; $i++) {
+ $frames[] = [
+ 'function' => $trace[$i]['function'] ?? '{main}',
+ 'class' => $trace[$i]['class'] ?? null,
+ 'file' => $trace[$i - 1]['file'] ?? null,
+ 'line' => $trace[$i - 1]['line'] ?? null,
+ ];
+ }
+ $frames[0]['file'] = $e->getFile();
+ $frames[0]['line'] = $e->getLine();
+
+ /** @var Frames $frames */
+ return $frames;
+ }
+
+ private static function formatName(string $name): string
+ {
+ return strtr($name, ['\\' => '.']);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php
new file mode 100644
index 000000000..a53e5b80a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php
@@ -0,0 +1,168 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Http;
+
+use function assert;
+use BadMethodCallException;
+use function explode;
+use function in_array;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\ErrorFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use Psr\Http\Client\ClientInterface;
+use Psr\Http\Client\NetworkExceptionInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use RuntimeException;
+use function strtolower;
+use Throwable;
+use function time_nanosleep;
+use function trim;
+
+/**
+ * @psalm-template CONTENT_TYPE of string
+ * @template-implements TransportInterface<CONTENT_TYPE>
+ */
+final class PsrTransport implements TransportInterface
+{
+ private ClientInterface $client;
+ private RequestFactoryInterface $requestFactory;
+ private StreamFactoryInterface $streamFactory;
+
+ private string $endpoint;
+ private string $contentType;
+ private array $headers;
+ private array $compression;
+ private int $retryDelay;
+ private int $maxRetries;
+
+ private bool $closed = false;
+
+ /**
+ * @psalm-param CONTENT_TYPE $contentType
+ */
+ public function __construct(
+ ClientInterface $client,
+ RequestFactoryInterface $requestFactory,
+ StreamFactoryInterface $streamFactory,
+ string $endpoint,
+ string $contentType,
+ array $headers,
+ array $compression,
+ int $retryDelay,
+ int $maxRetries
+ ) {
+ $this->client = $client;
+ $this->requestFactory = $requestFactory;
+ $this->streamFactory = $streamFactory;
+ $this->endpoint = $endpoint;
+ $this->contentType = $contentType;
+ $this->headers = $headers;
+ $this->compression = $compression;
+ $this->retryDelay = $retryDelay;
+ $this->maxRetries = $maxRetries;
+ }
+
+ public function contentType(): string
+ {
+ return $this->contentType;
+ }
+
+ public function send(string $payload, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ if ($this->closed) {
+ return new ErrorFuture(new BadMethodCallException('Transport closed'));
+ }
+
+ $body = PsrUtils::encode($payload, $this->compression, $appliedEncodings);
+ $request = $this->requestFactory
+ ->createRequest('POST', $this->endpoint)
+ ->withBody($this->streamFactory->createStream($body))
+ ->withHeader('Content-Type', $this->contentType)
+ ;
+ if ($appliedEncodings) {
+ $request = $request->withHeader('Content-Encoding', $appliedEncodings);
+ }
+ foreach ($this->headers as $header => $value) {
+ $request = $request->withAddedHeader($header, $value);
+ }
+
+ for ($retries = 0;; $retries++) {
+ $response = null;
+ $e = null;
+
+ try {
+ $response = $this->client->sendRequest($request);
+ if ($response->getStatusCode() >= 200 && $response->getStatusCode() < 300) {
+ break;
+ }
+
+ if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500 && !in_array($response->getStatusCode(), [408, 429], true)) {
+ throw new RuntimeException($response->getReasonPhrase(), $response->getStatusCode());
+ }
+ } catch (NetworkExceptionInterface $e) {
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+
+ if ($retries >= $this->maxRetries) {
+ return new ErrorFuture(new RuntimeException('Export retry limit exceeded', 0, $e));
+ }
+
+ $delay = PsrUtils::retryDelay($retries, $this->retryDelay, $response);
+ $sec = (int) $delay;
+ $nsec = (int) (($delay - $sec) * 1e9);
+
+ /** @psalm-suppress ArgumentTypeCoercion */
+ if (time_nanosleep($sec, $nsec) !== true) {
+ return new ErrorFuture(new RuntimeException('Export cancelled', 0, $e));
+ }
+ }
+
+ assert(isset($response));
+
+ try {
+ $body = PsrUtils::decode(
+ $response->getBody()->__toString(),
+ self::parseContentEncoding($response),
+ );
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+
+ return new CompletedFuture($body);
+ }
+
+ private static function parseContentEncoding(ResponseInterface $response): array
+ {
+ $encodings = [];
+ foreach (explode(',', $response->getHeaderLine('Content-Encoding')) as $encoding) {
+ if (($encoding = trim($encoding, " \t")) !== '') {
+ $encodings[] = strtolower($encoding);
+ }
+ }
+
+ return $encodings;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return true;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return !$this->closed;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php
new file mode 100644
index 000000000..5ef78d82c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php
@@ -0,0 +1,74 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Http;
+
+use const FILTER_VALIDATE_URL;
+use function filter_var;
+use Http\Discovery\Psr17FactoryDiscovery;
+use Http\Discovery\Psr18ClientDiscovery;
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use Psr\Http\Client\ClientInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+
+final class PsrTransportFactory implements TransportFactoryInterface
+{
+ private ClientInterface $client;
+ private RequestFactoryInterface $requestFactory;
+ private StreamFactoryInterface $streamFactory;
+
+ public function __construct(
+ ClientInterface $client,
+ RequestFactoryInterface $requestFactory,
+ StreamFactoryInterface $streamFactory
+ ) {
+ $this->client = $client;
+ $this->requestFactory = $requestFactory;
+ $this->streamFactory = $streamFactory;
+ }
+
+ /**
+ * @phan-suppress PhanTypeMismatchArgumentNullable
+ */
+ public function create(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): PsrTransport {
+ if (!filter_var($endpoint, FILTER_VALIDATE_URL)) {
+ throw new InvalidArgumentException(sprintf('Invalid endpoint url "%s"', $endpoint));
+ }
+ assert(!empty($endpoint));
+
+ return new PsrTransport(
+ $this->client,
+ $this->requestFactory,
+ $this->streamFactory,
+ $endpoint,
+ $contentType,
+ $headers,
+ PsrUtils::compression($compression),
+ $retryDelay,
+ $maxRetries,
+ );
+ }
+
+ public static function discover(): self
+ {
+ return new self(
+ Psr18ClientDiscovery::find(),
+ Psr17FactoryDiscovery::findRequestFactory(),
+ Psr17FactoryDiscovery::findStreamFactory(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php b/vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php
new file mode 100644
index 000000000..eaf2f3b47
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php
@@ -0,0 +1,175 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Http;
+
+use function array_filter;
+use function array_map;
+use function count;
+use ErrorException;
+use LogicException;
+use function max;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use function rand;
+use function restore_error_handler;
+use function set_error_handler;
+use function sprintf;
+use function strcasecmp;
+use function strtotime;
+use Throwable;
+use function time;
+use function trim;
+use UnexpectedValueException;
+
+/**
+ * @internal
+ */
+final class PsrUtils
+{
+ /**
+ * @param int $retry zero-indexed attempt number
+ * @param int $retryDelay initial delay in milliseconds
+ * @param ResponseInterface|null $response response of failed request
+ * @return float delay in seconds
+ */
+ public static function retryDelay(int $retry, int $retryDelay, ?ResponseInterface $response = null): float
+ {
+ $delay = $retryDelay << $retry;
+ $delay = rand($delay >> 1, $delay) / 1000;
+
+ return max($delay, self::parseRetryAfter($response));
+ }
+
+ private static function parseRetryAfter(?ResponseInterface $response): int
+ {
+ if (!$response || !$retryAfter = $response->getHeaderLine('Retry-After')) {
+ return 0;
+ }
+
+ $retryAfter = trim($retryAfter, " \t");
+ if ($retryAfter === (string) (int) $retryAfter) {
+ return (int) $retryAfter;
+ }
+
+ if (($time = strtotime($retryAfter)) !== false) {
+ return $time - time();
+ }
+
+ return 0;
+ }
+
+ /**
+ * @param list<string> $encodings
+ * @param array<int, string>|null $appliedEncodings
+ */
+ public static function encode(string $value, array $encodings, ?array &$appliedEncodings = null): string
+ {
+ for ($i = 0, $n = count($encodings); $i < $n; $i++) {
+ if (!$encoder = self::encoder($encodings[$i])) {
+ unset($encodings[$i]);
+
+ continue;
+ }
+
+ try {
+ $value = $encoder($value);
+ } catch (Throwable $e) {
+ unset($encodings[$i]);
+ }
+ }
+
+ $appliedEncodings = $encodings;
+
+ return $value;
+ }
+
+ /**
+ * @param list<string> $encodings
+ */
+ public static function decode(string $value, array $encodings): string
+ {
+ for ($i = count($encodings); --$i >= 0;) {
+ if (strcasecmp($encodings[$i], 'identity') === 0) {
+ continue;
+ }
+ if (!$decoder = self::decoder($encodings[$i])) {
+ throw new UnexpectedValueException(sprintf('Not supported decompression encoding "%s"', $encodings[$i]));
+ }
+
+ $value = $decoder($value);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Resolve an array or CSV of compression types to a list
+ */
+ public static function compression($compression): array
+ {
+ if (is_array($compression)) {
+ return $compression;
+ }
+ if (!$compression) {
+ return [];
+ }
+ if (strpos($compression, ',') === false) {
+ return [$compression];
+ }
+
+ return array_map('trim', explode(',', $compression));
+ }
+
+ private static function encoder(string $encoding): ?callable
+ {
+ static $encoders;
+
+ /** @noinspection SpellCheckingInspection */
+ $encoders ??= array_map(fn (callable $callable): callable => self::throwOnErrorOrFalse($callable), array_filter([
+ TransportFactoryInterface::COMPRESSION_GZIP => 'gzencode',
+ TransportFactoryInterface::COMPRESSION_DEFLATE => 'gzcompress',
+ TransportFactoryInterface::COMPRESSION_BROTLI => 'brotli_compress',
+ ], 'function_exists'));
+
+ return $encoders[$encoding] ?? null;
+ }
+
+ private static function decoder(string $encoding): ?callable
+ {
+ static $decoders;
+
+ /** @noinspection SpellCheckingInspection */
+ $decoders ??= array_map(fn (callable $callable): callable => self::throwOnErrorOrFalse($callable), array_filter([
+ TransportFactoryInterface::COMPRESSION_GZIP => 'gzdecode',
+ TransportFactoryInterface::COMPRESSION_DEFLATE => 'gzuncompress',
+ TransportFactoryInterface::COMPRESSION_BROTLI => 'brotli_uncompress',
+ ], 'function_exists'));
+
+ return $decoders[$encoding] ?? null;
+ }
+
+ private static function throwOnErrorOrFalse(callable $callable): callable
+ {
+ return static function (...$args) use ($callable) {
+ set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): bool {
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
+ });
+
+ try {
+ $result = $callable(...$args);
+ } finally {
+ restore_error_handler();
+ }
+
+ /** @phan-suppress-next-line PhanPossiblyUndeclaredVariable */
+ if ($result === false) {
+ throw new LogicException();
+ }
+
+ /** @phan-suppress-next-line PhanPossiblyUndeclaredVariable */
+ return $result;
+ };
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php
new file mode 100644
index 000000000..4b99cf756
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Stream;
+
+use BadMethodCallException;
+use ErrorException;
+use function fflush;
+use function fwrite;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\ErrorFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use function restore_error_handler;
+use RuntimeException;
+use function set_error_handler;
+use function strlen;
+use Throwable;
+
+/**
+ * @internal
+ *
+ * @psalm-template CONTENT_TYPE of string
+ * @template-implements TransportInterface<CONTENT_TYPE>
+ */
+final class StreamTransport implements TransportInterface
+{
+ /**
+ * @var resource|null
+ */
+ private $stream;
+ private string $contentType;
+
+ /**
+ * @param resource $stream
+ *
+ * @psalm-param CONTENT_TYPE $contentType
+ */
+ public function __construct($stream, string $contentType)
+ {
+ $this->stream = $stream;
+ $this->contentType = $contentType;
+ }
+
+ public function contentType(): string
+ {
+ return $this->contentType;
+ }
+
+ public function send(string $payload, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ if (!$this->stream) {
+ return new ErrorFuture(new BadMethodCallException('Transport closed'));
+ }
+
+ set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): bool {
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
+ });
+
+ try {
+ $bytesWritten = fwrite($this->stream, $payload);
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ } finally {
+ restore_error_handler();
+ }
+
+ if ($bytesWritten !== strlen($payload)) {
+ return new ErrorFuture(new RuntimeException(sprintf('Write failure, wrote %d of %d bytes', $bytesWritten, strlen($payload))));
+ }
+
+ return new CompletedFuture(null);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if (!$this->stream) {
+ return false;
+ }
+
+ $flush = @fflush($this->stream);
+ $this->stream = null;
+
+ return $flush;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if (!$this->stream) {
+ return false;
+ }
+
+ return @fflush($this->stream);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php
new file mode 100644
index 000000000..59e411318
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php
@@ -0,0 +1,118 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Stream;
+
+use ErrorException;
+use function fopen;
+use function implode;
+use function is_resource;
+use LogicException;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use function restore_error_handler;
+use function set_error_handler;
+use function sprintf;
+use function stream_context_create;
+
+/**
+ * @psalm-internal \OpenTelemetry
+ */
+final class StreamTransportFactory implements TransportFactoryInterface
+{
+ /**
+ * @param string|resource $endpoint
+ * @param array<string, string|string[]> $headers
+ * @param string|string[]|null $compression
+ *
+ * @psalm-template CONTENT_TYPE of string
+ * @psalm-param CONTENT_TYPE $contentType
+ * @psalm-return TransportInterface<CONTENT_TYPE>
+ */
+ public function create(
+ $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): TransportInterface {
+ assert(!empty($endpoint));
+ $stream = is_resource($endpoint)
+ ? $endpoint
+ : self::createStream(
+ $endpoint,
+ $contentType,
+ $headers,
+ $timeout,
+ $cacert,
+ $cert,
+ $key,
+ );
+
+ return new StreamTransport($stream, $contentType);
+ }
+
+ /**
+ * @throws ErrorException
+ * @return resource
+ */
+ private static function createStream(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ float $timeout = 10.,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ) {
+ $context = stream_context_create([
+ 'http' => [
+ 'method' => 'POST',
+ 'header' => self::createHeaderArray($contentType, $headers),
+ 'timeout' => $timeout,
+ ],
+ 'ssl' => [
+ 'cafile' => $cacert,
+ 'local_cert' => $cert,
+ 'local_pk' => $key,
+ ],
+ ]);
+
+ set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): bool {
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
+ });
+
+ /**
+ * @psalm-suppress PossiblyNullArgument
+ */
+ try {
+ $stream = fopen($endpoint, 'ab', false, $context);
+ } finally {
+ restore_error_handler();
+ }
+
+ /** @phan-suppress-next-line PhanPossiblyUndeclaredVariable */
+ if (!$stream) {
+ throw new LogicException(sprintf('Failed opening stream "%s"', $endpoint));
+ }
+
+ return $stream;
+ }
+
+ private static function createHeaderArray(string $contentType, array $headers): array
+ {
+ $header = [];
+ $header[] = sprintf('Content-Type: %s', $contentType);
+ foreach ($headers as $name => $value) {
+ $header[] = sprintf('%s: %s', $name, implode(', ', (array) $value));
+ }
+
+ return $header;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php
new file mode 100644
index 000000000..48e538443
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export;
+
+interface TransportFactoryInterface
+{
+ public const COMPRESSION_GZIP = 'gzip';
+ public const COMPRESSION_DEFLATE = 'deflate';
+ public const COMPRESSION_BROTLI = 'br';
+
+ /**
+ * @psalm-template CONTENT_TYPE of string
+ * @psalm-param CONTENT_TYPE $contentType
+ * @psalm-param array<string, string|string[]> $headers
+ * @psalm-param string|string[]|null $compression
+ * @psalm-return TransportInterface<CONTENT_TYPE>
+ */
+ public function create(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): TransportInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/TransportInterface.php b/vendor/open-telemetry/sdk/Common/Export/TransportInterface.php
new file mode 100644
index 000000000..5fb26eff8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/TransportInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+
+/**
+ * @psalm-template-covariant CONTENT_TYPE of string
+ */
+interface TransportInterface
+{
+ public function contentType(): string;
+
+ public function send(string $payload, ?CancellationInterface $cancellation = null): FutureInterface;
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php b/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php
new file mode 100644
index 000000000..16909ec6d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+use Throwable;
+
+interface CancellationInterface
+{
+ /**
+ * @param Closure(Throwable): void $callback
+ */
+ public function subscribe(Closure $callback): string;
+
+ public function unsubscribe(string $id): void;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php b/vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php
new file mode 100644
index 000000000..7f0cd6536
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+use Throwable;
+
+/**
+ * @template T
+ * @template-implements FutureInterface<T>
+ */
+final class CompletedFuture implements FutureInterface
+{
+ /** @var T */
+ private $value;
+
+ /**
+ * @param T $value
+ */
+ public function __construct($value)
+ {
+ $this->value = $value;
+ }
+
+ public function await()
+ {
+ return $this->value;
+ }
+
+ public function map(Closure $closure): FutureInterface
+ {
+ $c = $closure;
+ unset($closure);
+
+ try {
+ return new CompletedFuture($c($this->value));
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+ }
+
+ public function catch(Closure $closure): FutureInterface
+ {
+ return $this;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php b/vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php
new file mode 100644
index 000000000..32cf3d995
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+use Throwable;
+
+final class ErrorFuture implements FutureInterface
+{
+ private Throwable $throwable;
+
+ public function __construct(Throwable $throwable)
+ {
+ $this->throwable = $throwable;
+ }
+
+ public function await()
+ {
+ throw $this->throwable;
+ }
+
+ public function map(Closure $closure): FutureInterface
+ {
+ return $this;
+ }
+
+ public function catch(Closure $closure): FutureInterface
+ {
+ $c = $closure;
+ unset($closure);
+
+ try {
+ return new CompletedFuture($c($this->throwable));
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/FutureInterface.php b/vendor/open-telemetry/sdk/Common/Future/FutureInterface.php
new file mode 100644
index 000000000..850699bf6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/FutureInterface.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+
+/**
+ * @template-covariant T
+ */
+interface FutureInterface
+{
+ /**
+ * @psalm-return T
+ */
+ public function await();
+
+ /**
+ * @psalm-template U
+ * @psalm-param Closure(T): U $closure
+ * @psalm-return FutureInterface<U>
+ *
+ * @psalm-suppress InvalidTemplateParam
+ */
+ public function map(Closure $closure): FutureInterface;
+
+ /**
+ * @psalm-template U
+ * @psalm-param Closure(\Throwable): U $closure
+ * @psalm-return FutureInterface<T|U>
+ */
+ public function catch(Closure $closure): FutureInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/NullCancellation.php b/vendor/open-telemetry/sdk/Common/Future/NullCancellation.php
new file mode 100644
index 000000000..5e5b642f9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/NullCancellation.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+
+final class NullCancellation implements CancellationInterface
+{
+ public function subscribe(Closure $callback): string
+ {
+ return self::class;
+ }
+
+ public function unsubscribe(string $id): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php
new file mode 100644
index 000000000..824335213
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http;
+
+use OpenTelemetry\SDK\Common\Http\HttpPlug\Client\ResolverInterface as HttpPlugClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Client\ResolverInterface as PsrClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface;
+
+interface DependencyResolverInterface extends FactoryResolverInterface, PsrClientResolverInterface, HttpPlugClientResolverInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php
new file mode 100644
index 000000000..3b2f4d53e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\HttpPlug\Client;
+
+use Http\Client\HttpAsyncClient;
+
+interface ResolverInterface
+{
+ public function resolveHttpPlugAsyncClient(): HttpAsyncClient;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php
new file mode 100644
index 000000000..ba028e38a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Client;
+
+use Psr\Http\Client\ClientInterface;
+
+interface ResolverInterface
+{
+ public function resolvePsrClient(): ClientInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php
new file mode 100644
index 000000000..4582e19ce
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Message;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+interface FactoryResolverInterface
+{
+ public function resolveRequestFactory(): RequestFactoryInterface;
+ public function resolveResponseFactory(): ResponseFactoryInterface;
+ public function resolveServerRequestFactory(): ServerRequestFactoryInterface;
+ public function resolveStreamFactory(): StreamFactoryInterface;
+ public function resolveUploadedFileFactory(): UploadedFileFactoryInterface;
+ public function resolveUriFactory(): UriFactoryInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php
new file mode 100644
index 000000000..8e99d64c0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Message;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\ServerRequestInterface;
+
+final class MessageFactory implements MessageFactoryInterface
+{
+ private RequestFactoryInterface $requestFactory;
+ private ResponseFactoryInterface $responseFactory;
+ private ServerRequestFactoryInterface $serverRequestFactory;
+
+ public function __construct(
+ RequestFactoryInterface $requestFactory,
+ ResponseFactoryInterface $responseFactory,
+ ServerRequestFactoryInterface $serverRequestFactory
+ ) {
+ $this->requestFactory = $requestFactory;
+ $this->responseFactory = $responseFactory;
+ $this->serverRequestFactory = $serverRequestFactory;
+ }
+
+ public static function create(
+ RequestFactoryInterface $requestFactory,
+ ResponseFactoryInterface $responseFactory,
+ ServerRequestFactoryInterface $serverRequestFactory
+ ): self {
+ return new self($requestFactory, $responseFactory, $serverRequestFactory);
+ }
+
+ public function createRequest(string $method, $uri): RequestInterface
+ {
+ return $this->requestFactory->createRequest($method, $uri);
+ }
+
+ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
+ {
+ return $this->responseFactory->createResponse($code, $reasonPhrase);
+ }
+
+ public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
+ {
+ return $this->serverRequestFactory->createServerRequest($method, $uri, $serverParams);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php
new file mode 100644
index 000000000..97258491f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Message;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+
+interface MessageFactoryInterface extends RequestFactoryInterface, ServerRequestFactoryInterface, ResponseFactoryInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php
new file mode 100644
index 000000000..ec9b52fb0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * Represents the instrumentation scope information associated with the Tracer or Meter
+ */
+final class InstrumentationScope implements InstrumentationScopeInterface
+{
+ private string $name;
+ private ?string $version;
+ private ?string $schemaUrl;
+ private AttributesInterface $attributes;
+
+ public function __construct(string $name, ?string $version, ?string $schemaUrl, AttributesInterface $attributes)
+ {
+ $this->name = $name;
+ $this->version = $version;
+ $this->schemaUrl = $schemaUrl;
+ $this->attributes = $attributes;
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function getVersion(): ?string
+ {
+ return $this->version;
+ }
+
+ public function getSchemaUrl(): ?string
+ {
+ return $this->schemaUrl;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php
new file mode 100644
index 000000000..f1ae7c072
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+
+final class InstrumentationScopeFactory implements InstrumentationScopeFactoryInterface
+{
+ private AttributesFactoryInterface $attributesFactory;
+
+ public function __construct(AttributesFactoryInterface $attributesFactory)
+ {
+ $this->attributesFactory = $attributesFactory;
+ }
+
+ public function create(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): InstrumentationScopeInterface {
+ return new InstrumentationScope(
+ $name,
+ $version,
+ $schemaUrl,
+ $this->attributesFactory->builder($attributes)->build(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php
new file mode 100644
index 000000000..78292de58
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+interface InstrumentationScopeFactoryInterface
+{
+ public function create(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): InstrumentationScopeInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php
new file mode 100644
index 000000000..43ba71d89
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+interface InstrumentationScopeInterface
+{
+ public function getName(): string;
+
+ public function getVersion(): ?string;
+
+ public function getSchemaUrl(): ?string;
+
+ public function getAttributes(): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/ClockFactory.php b/vendor/open-telemetry/sdk/Common/Time/ClockFactory.php
new file mode 100644
index 000000000..33f4364f6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/ClockFactory.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+final class ClockFactory implements ClockFactoryInterface
+{
+ private static ?ClockInterface $default = null;
+
+ public static function create(): self
+ {
+ return new self();
+ }
+
+ public function build(): ClockInterface
+ {
+ return new SystemClock();
+ }
+
+ public static function getDefault(): ClockInterface
+ {
+ return self::$default ?? self::$default = self::create()->build();
+ }
+
+ public static function setDefault(?ClockInterface $clock): void
+ {
+ self::$default = $clock;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php
new file mode 100644
index 000000000..6d9afde91
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface ClockFactoryInterface
+{
+ public static function create(): self;
+
+ public function build(): ClockInterface;
+
+ public static function getDefault(): ClockInterface;
+
+ public static function setDefault(?ClockInterface $clock): void;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/ClockInterface.php b/vendor/open-telemetry/sdk/Common/Time/ClockInterface.php
new file mode 100644
index 000000000..8f3170185
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/ClockInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface ClockInterface
+{
+ public const MILLIS_PER_SECOND = 1_000;
+ public const MICROS_PER_SECOND = 1_000_000;
+ public const NANOS_PER_SECOND = 1_000_000_000;
+ public const NANOS_PER_MILLISECOND = 1_000_000;
+ public const NANOS_PER_MICROSECOND = 1_000;
+
+ /**
+ * Returns the current epoch wall-clock timestamp in nanoseconds
+ */
+ public function now(): int;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/StopWatch.php b/vendor/open-telemetry/sdk/Common/Time/StopWatch.php
new file mode 100644
index 000000000..b2abdabae
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatch.php
@@ -0,0 +1,119 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+final class StopWatch implements StopWatchInterface
+{
+ private const INITIAL_ELAPSED_TIME = 0;
+
+ private ClockInterface $clock;
+ private bool $running = false;
+ private ?int $initialStartTime;
+ private ?int $startTime = null;
+ private ?int $stopTime = null;
+
+ public function __construct(ClockInterface $clock, ?int $initialStartTime = null)
+ {
+ $this->clock = $clock;
+ $this->initialStartTime = $initialStartTime;
+ }
+
+ public function isRunning(): bool
+ {
+ return $this->running;
+ }
+
+ public function start(): void
+ {
+ // resolve start time as early as possible
+ $startTime = $this->time();
+
+ if ($this->isRunning()) {
+ return;
+ }
+
+ $this->startTime = $startTime;
+ if (!$this->hasBeenStarted()) {
+ $this->initialStartTime = $startTime;
+ }
+ $this->running = true;
+ }
+
+ public function stop(): void
+ {
+ if (!$this->isRunning()) {
+ return;
+ }
+
+ $this->stopTime = $this->time();
+ $this->running = false;
+ }
+
+ public function reset(): void
+ {
+ $this->startTime = $this->initialStartTime = $this->isRunning() ? $this->time() : null;
+ }
+
+ public function getElapsedTime(): int
+ {
+ if (!$this->hasBeenStarted()) {
+ return self::INITIAL_ELAPSED_TIME;
+ }
+
+ return $this->calculateElapsedTime();
+ }
+
+ public function getLastElapsedTime(): int
+ {
+ if (!$this->hasBeenStarted()) {
+ return self::INITIAL_ELAPSED_TIME;
+ }
+
+ return $this->calculateLastElapsedTime();
+ }
+
+ private function time(): int
+ {
+ return $this->clock->now();
+ }
+
+ private function hasBeenStarted(): bool
+ {
+ return $this->initialStartTime !== null;
+ }
+
+ private function calculateElapsedTime(): int
+ {
+ $referenceTime = $this->isRunning()
+ ? $this->time()
+ : $this->getStopTime();
+
+ return $referenceTime - $this->getInitialStartTime();
+ }
+
+ private function calculateLastElapsedTime(): int
+ {
+ $referenceTime = $this->isRunning()
+ ? $this->time()
+ : $this->getStopTime();
+
+ return $referenceTime - $this->getStartTime();
+ }
+
+ private function getInitialStartTime(): ?int
+ {
+ return $this->initialStartTime;
+ }
+
+ private function getStartTime(): ?int
+ {
+ return $this->startTime;
+ }
+
+ private function getStopTime(): ?int
+ {
+ return $this->stopTime;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php
new file mode 100644
index 000000000..f60c377fc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+final class StopWatchFactory implements StopWatchFactoryInterface
+{
+ private static ?StopWatchInterface $default = null;
+
+ private ClockInterface $clock;
+ private ?int $initialStartTime;
+
+ public function __construct(?ClockInterface $clock = null, ?int $initialStartTime = null)
+ {
+ $this->clock = $clock ?? ClockFactory::getDefault();
+ $this->initialStartTime = $initialStartTime;
+ }
+
+ public static function create(?ClockInterface $clock = null, ?int $initialStartTime = null): self
+ {
+ return new self($clock, $initialStartTime);
+ }
+
+ public static function fromClockFactory(ClockFactoryInterface $factory, ?int $initialStartTime = null): self
+ {
+ return self::create($factory->build(), $initialStartTime);
+ }
+
+ public function build(): StopWatch
+ {
+ return new StopWatch($this->clock, $this->initialStartTime);
+ }
+
+ public static function getDefault(): StopWatchInterface
+ {
+ return self::$default ?? self::$default = self::create()->build();
+ }
+
+ public static function setDefault(?StopWatchInterface $default): void
+ {
+ self::$default = $default;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php
new file mode 100644
index 000000000..9750f5769
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface StopWatchFactoryInterface
+{
+ public static function create(?ClockInterface $clock = null, ?int $initialStartTime = null): self;
+
+ public static function fromClockFactory(ClockFactoryInterface $factory, ?int $initialStartTime = null): self;
+
+ public function build(): StopWatchInterface;
+
+ public static function getDefault(): StopWatchInterface;
+
+ public static function setDefault(?StopWatchInterface $default): void;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php b/vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php
new file mode 100644
index 000000000..69a03b75e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface StopWatchInterface
+{
+ public function isRunning(): bool;
+
+ public function start(): void;
+
+ public function stop(): void;
+
+ public function reset(): void;
+
+ public function getElapsedTime(): int;
+
+ public function getLastElapsedTime(): int;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/SystemClock.php b/vendor/open-telemetry/sdk/Common/Time/SystemClock.php
new file mode 100644
index 000000000..f57e98490
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/SystemClock.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+use function hrtime;
+use function microtime;
+
+final class SystemClock implements ClockInterface
+{
+ private static int $referenceTime = 0;
+
+ public function __construct()
+ {
+ self::init();
+ }
+
+ public static function create(): self
+ {
+ return new self();
+ }
+
+ /** @inheritDoc */
+ public function now(): int
+ {
+ return self::$referenceTime + hrtime(true);
+ }
+
+ private static function init(): void
+ {
+ if (self::$referenceTime > 0) {
+ return;
+ }
+
+ self::$referenceTime = self::calculateReferenceTime(
+ microtime(true),
+ hrtime(true)
+ );
+ }
+
+ /**
+ * Calculates the reference time which is later used to calculate the current wall clock time in nanoseconds by adding the current uptime.
+ */
+ private static function calculateReferenceTime(float $wallClockMicroTime, int $upTime): int
+ {
+ return ((int) ($wallClockMicroTime * ClockInterface::NANOS_PER_SECOND)) - $upTime;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/Util.php b/vendor/open-telemetry/sdk/Common/Time/Util.php
new file mode 100644
index 000000000..e1be1f750
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/Util.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+class Util
+{
+ /** @psalm-pure */
+ public static function nanosToMicros(int $nanoseconds): int
+ {
+ return intdiv($nanoseconds, ClockInterface::NANOS_PER_MICROSECOND);
+ }
+
+ /** @psalm-pure */
+ public static function nanosToMillis(int $nanoseconds): int
+ {
+ return intdiv($nanoseconds, ClockInterface::NANOS_PER_MILLISECOND);
+ }
+
+ /** @psalm-pure */
+ public static function secondsToNanos(int $seconds): int
+ {
+ return $seconds * ClockInterface::NANOS_PER_SECOND;
+ }
+
+ /** @psalm-pure */
+ public static function millisToNanos(int $milliSeconds): int
+ {
+ return $milliSeconds * ClockInterface::NANOS_PER_MILLISECOND;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php b/vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php
new file mode 100644
index 000000000..237e70ba5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use LogicException;
+
+class ClassConstantAccessor
+{
+ public static function requireValue(string $className, string $constantName)
+ {
+ $constant = self::getFullName($className, $constantName);
+
+ if (!defined($constant)) {
+ throw new LogicException(
+ sprintf('The class "%s" does not have a constant "%s"', $className, $constantName)
+ );
+ }
+
+ return constant($constant);
+ }
+
+ public static function getValue(string $className, string $constantName)
+ {
+ $constant = self::getFullName($className, $constantName);
+
+ return defined($constant) ? constant($constant) : null;
+ }
+
+ private static function getFullName(string $className, string $constantName): string
+ {
+ return sprintf('%s::%s', $className, $constantName);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php b/vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php
new file mode 100644
index 000000000..2de6d47df
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php
@@ -0,0 +1,82 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use function array_key_last;
+use ArrayAccess;
+use Closure;
+use function register_shutdown_function;
+
+final class ShutdownHandler
+{
+ /** @var array<int, Closure>|null */
+ private static ?array $handlers = null;
+ /** @var ArrayAccess<object, self>|null */
+ private static ?ArrayAccess $weakMap = null;
+
+ private array $ids = [];
+
+ private function __construct()
+ {
+ }
+
+ public function __destruct()
+ {
+ if (!self::$handlers) {
+ return;
+ }
+ foreach ($this->ids as $id) {
+ unset(self::$handlers[$id]);
+ }
+ }
+
+ /**
+ * Registers a function that will be executed on shutdown.
+ *
+ * If the given function is bound to an object, then the function will only
+ * be executed if the bound object is still referenced on shutdown handler
+ * invocation.
+ *
+ * ```php
+ * ShutdownHandler::register([$tracerProvider, 'shutdown']);
+ * ```
+ *
+ * @param callable $shutdownFunction function to register
+ *
+ * @see register_shutdown_function
+ */
+ public static function register(callable $shutdownFunction): void
+ {
+ self::registerShutdownFunction();
+ self::$handlers[] = weaken(closure($shutdownFunction), $target);
+
+ if (!$object = $target) {
+ return;
+ }
+
+ self::$weakMap ??= WeakMap::create();
+ $handler = self::$weakMap[$object] ??= new self();
+ $handler->ids[] = array_key_last(self::$handlers);
+ }
+
+ private static function registerShutdownFunction(): void
+ {
+ if (self::$handlers === null) {
+ register_shutdown_function(static function (): void {
+ $handlers = self::$handlers;
+ self::$handlers = null;
+ self::$weakMap = null;
+
+ // Push shutdown to end of queue
+ // @phan-suppress-next-line PhanTypeMismatchArgumentInternal
+ register_shutdown_function(static function (array $handlers): void {
+ foreach ($handlers as $handler) {
+ $handler();
+ }
+ }, $handlers);
+ });
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/WeakMap.php b/vendor/open-telemetry/sdk/Common/Util/WeakMap.php
new file mode 100644
index 000000000..3b62d6d64
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/WeakMap.php
@@ -0,0 +1,175 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use ArrayAccess;
+use function assert;
+use function class_exists;
+use function count;
+use Countable;
+use Error;
+use function get_class;
+use function is_object;
+use IteratorAggregate;
+use const PHP_VERSION_ID;
+use function spl_object_id;
+use function sprintf;
+use Traversable;
+use TypeError;
+use WeakReference;
+
+/**
+ * @internal
+ */
+final class WeakMap implements ArrayAccess, Countable, IteratorAggregate
+{
+ private const KEY = '__otel_weak_map';
+
+ /**
+ * @var array<int, WeakReference>
+ */
+ private array $objects = [];
+
+ private function __construct()
+ {
+ }
+
+ /**
+ * @return ArrayAccess&Countable&IteratorAggregate
+ */
+ public static function create(): ArrayAccess
+ {
+ if (PHP_VERSION_ID >= 80000) {
+ /** @phan-suppress-next-line PhanUndeclaredClassReference */
+ assert(class_exists(\WeakMap::class, false));
+ /** @phan-suppress-next-line PhanUndeclaredClassMethod */
+ $map = new \WeakMap();
+ assert($map instanceof ArrayAccess);
+ assert($map instanceof Countable);
+ assert($map instanceof IteratorAggregate);
+
+ return $map;
+ }
+
+ return new self();
+ }
+
+ public function offsetExists($offset): bool
+ {
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+
+ return isset($offset->{self::KEY}[spl_object_id($this)]);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+ if (!$this->contains($offset)) {
+ throw new Error(sprintf('Object %s#%d not contained in WeakMap', get_class($offset), spl_object_id($offset)));
+ }
+
+ return $offset->{self::KEY}[spl_object_id($this)];
+ }
+
+ public function offsetSet($offset, $value): void
+ {
+ if ($offset === null) {
+ throw new Error('Cannot append to WeakMap');
+ }
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+ if (!$this->contains($offset)) {
+ $this->expunge();
+ }
+
+ $offset->{self::KEY}[spl_object_id($this)] = $value;
+ $this->objects[spl_object_id($offset)] = WeakReference::create($offset);
+ }
+
+ public function offsetUnset($offset): void
+ {
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+ if (!$this->contains($offset)) {
+ return;
+ }
+
+ unset(
+ $offset->{self::KEY}[spl_object_id($this)],
+ $this->objects[spl_object_id($offset)],
+ );
+ if (!$offset->{self::KEY}) {
+ unset($offset->{self::KEY});
+ }
+ }
+
+ public function count(): int
+ {
+ $this->expunge();
+
+ return count($this->objects);
+ }
+
+ public function getIterator(): Traversable
+ {
+ $this->expunge();
+
+ foreach ($this->objects as $reference) {
+ if (($object = $reference->get()) && $this->contains($object)) {
+ yield $object => $this[$object];
+ }
+ }
+ }
+
+ public function __debugInfo(): array
+ {
+ $debugInfo = [];
+ foreach ($this as $key => $value) {
+ $debugInfo[] = ['key' => $key, 'value' => $value];
+ }
+
+ return $debugInfo;
+ }
+
+ public function __destruct()
+ {
+ foreach ($this->objects as $reference) {
+ if ($object = $reference->get()) {
+ unset($this[$object]);
+ }
+ }
+ }
+
+ private function contains(object $offset): bool
+ {
+ $reference = $this->objects[spl_object_id($offset)] ?? null;
+ if ($reference && $reference->get() === $offset) {
+ return true;
+ }
+
+ unset($this->objects[spl_object_id($offset)]);
+
+ return false;
+ }
+
+ private function expunge(): void
+ {
+ foreach ($this->objects as $id => $reference) {
+ if (!$reference->get()) {
+ unset($this->objects[$id]);
+ }
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/functions.php b/vendor/open-telemetry/sdk/Common/Util/functions.php
new file mode 100644
index 000000000..f4fb13b80
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/functions.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use Closure;
+use function get_class;
+use ReflectionFunction;
+use stdClass;
+use WeakReference;
+
+/**
+ * @internal
+ */
+function closure(callable $callable): Closure
+{
+ return Closure::fromCallable($callable);
+}
+
+/**
+ * @internal
+ * @see https://github.com/amphp/amp/blob/f682341c856b1f688026f787bef4f77eaa5c7970/src/functions.php#L140-L191
+ */
+function weaken(Closure $closure, ?object &$target = null): Closure
+{
+ $reflection = new ReflectionFunction($closure);
+ if (!$target = $reflection->getClosureThis()) {
+ return $closure;
+ }
+
+ $scope = $reflection->getClosureScopeClass();
+ $name = $reflection->getShortName();
+ if ($name !== '{closure}') {
+ /** @psalm-suppress InvalidScope @phpstan-ignore-next-line @phan-suppress-next-line PhanUndeclaredThis */
+ $closure = fn (...$args) => $this->$name(...$args);
+ if ($scope !== null) {
+ $closure = $closure->bindTo(null, $scope->name);
+ }
+ }
+
+ static $placeholder;
+ $placeholder ??= new stdClass();
+ $closure = $closure->bindTo($placeholder);
+
+ $ref = WeakReference::create($target);
+
+ /** @psalm-suppress PossiblyInvalidFunctionCall */
+ return $scope && get_class($target) === $scope->name && !$scope->isInternal()
+ ? static fn (...$args) => ($obj = $ref->get()) ? $closure->call($obj, ...$args) : null
+ : static fn (...$args) => ($obj = $ref->get()) ? $closure->bindTo($obj)(...$args) : null;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php
new file mode 100644
index 000000000..e34fa308c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php
@@ -0,0 +1,106 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\ReadableLogRecord;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * A JSON console exporter for LogRecords. This is only useful for testing; the
+ * output is human-readable, and is not compatible with the OTLP format.
+ */
+class ConsoleExporter implements LogRecordExporterInterface
+{
+ private TransportInterface $transport;
+
+ public function __construct(TransportInterface $transport)
+ {
+ $this->transport = $transport;
+ }
+
+ /**
+ * @param iterable<mixed, ReadableLogRecord> $batch
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ $resource = null;
+ $scopes = [];
+ foreach ($batch as $record) {
+ if (!$resource) {
+ $resource = $this->convertResource($record->getResource());
+ }
+ $key = $this->scopeKey($record->getInstrumentationScope());
+ if (!array_key_exists($key, $scopes)) {
+ $scopes[$key] = $this->convertInstrumentationScope($record->getInstrumentationScope());
+ }
+ $scopes[$key]['logs'][] = $this->convertLogRecord($record);
+ }
+ $output = [
+ 'resource' => $resource,
+ 'scopes' => array_values($scopes),
+ ];
+ $this->transport->send(json_encode($output, JSON_PRETTY_PRINT));
+
+ return new CompletedFuture(true);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+ private function convertLogRecord(ReadableLogRecord $record): array
+ {
+ $spanContext = $record->getSpanContext();
+
+ return [
+ 'timestamp' => $record->getTimestamp(),
+ 'observed_timestamp' => $record->getObservedTimestamp(),
+ 'severity_number' => $record->getSeverityNumber(),
+ 'severity_text' => $record->getSeverityText(),
+ 'body' => $record->getBody(),
+ 'trace_id' => $spanContext !== null ? $spanContext->getTraceId() : '',
+ 'span_id' => $spanContext !== null ? $spanContext->getSpanId() : '',
+ 'trace_flags' => $spanContext !== null ? $spanContext->getTraceFlags() : null,
+ 'attributes' => $record->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $record->getAttributes()->getDroppedAttributesCount(),
+ ];
+ }
+
+ private function convertResource(ResourceInfo $resource): array
+ {
+ return [
+ 'attributes' => $resource->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $resource->getAttributes()->getDroppedAttributesCount(),
+ ];
+ }
+
+ private function scopeKey(InstrumentationScopeInterface $scope): string
+ {
+ return serialize([$scope->getName(), $scope->getVersion(), $scope->getSchemaUrl(), $scope->getAttributes()]);
+ }
+
+ private function convertInstrumentationScope(InstrumentationScopeInterface $scope): array
+ {
+ return [
+ 'name' => $scope->getName(),
+ 'version' => $scope->getVersion(),
+ 'attributes' => $scope->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $scope->getAttributes()->getDroppedAttributesCount(),
+ 'schema_url' => $scope->getSchemaUrl(),
+ 'logs' => [],
+ ];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php
new file mode 100644
index 000000000..a959540a0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Registry;
+
+class ConsoleExporterFactory implements LogRecordExporterFactoryInterface
+{
+ public function create(): LogRecordExporterInterface
+ {
+ $transport = Registry::transportFactory('stream')->create('php://stdout', 'application/json');
+
+ return new ConsoleExporter($transport);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php
new file mode 100644
index 000000000..dca0531f3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use ArrayObject;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+
+class InMemoryExporter implements LogRecordExporterInterface
+{
+ private ArrayObject $storage;
+
+ public function __construct(?ArrayObject $storage = null)
+ {
+ $this->storage = $storage ?? new ArrayObject();
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ foreach ($batch as $record) {
+ $this->storage[] = $record;
+ }
+
+ return new CompletedFuture(true);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function getStorage(): ArrayObject
+ {
+ return $this->storage;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php
new file mode 100644
index 000000000..6f24defe0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+
+class InMemoryExporterFactory implements LogRecordExporterFactoryInterface
+{
+ public function create(): LogRecordExporterInterface
+ {
+ return new InMemoryExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php b/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php
new file mode 100644
index 000000000..8eeff62bd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+
+class NoopExporter implements LogRecordExporterInterface
+{
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ return new CompletedFuture(true);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/_register.php b/vendor/open-telemetry/sdk/Logs/Exporter/_register.php
new file mode 100644
index 000000000..96958baa8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/_register.php
@@ -0,0 +1,6 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('console', \OpenTelemetry\SDK\Logs\Exporter\ConsoleExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('memory', \OpenTelemetry\SDK\Logs\Exporter\InMemoryExporterFactory::class);
diff --git a/vendor/open-telemetry/sdk/Logs/ExporterFactory.php b/vendor/open-telemetry/sdk/Logs/ExporterFactory.php
new file mode 100644
index 000000000..2a560ae95
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/ExporterFactory.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Logs\Exporter\NoopExporter;
+use OpenTelemetry\SDK\Registry;
+
+class ExporterFactory
+{
+ public function create(): LogRecordExporterInterface
+ {
+ $exporters = Configuration::getList(Variables::OTEL_LOGS_EXPORTER);
+ if (1 !== count($exporters)) {
+ throw new InvalidArgumentException(sprintf('Configuration %s requires exactly 1 exporter', Variables::OTEL_TRACES_EXPORTER));
+ }
+ $exporter = $exporters[0];
+ if ($exporter === 'none') {
+ return new NoopExporter();
+ }
+ $factory = Registry::logRecordExporterFactory($exporter);
+
+ return $factory->create();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php b/vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php
new file mode 100644
index 000000000..523bec1ba
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+interface LogRecordExporterFactoryInterface
+{
+ public function create(): LogRecordExporterInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php b/vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php
new file mode 100644
index 000000000..cf9e1aca8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+
+interface LogRecordExporterInterface
+{
+ /**
+ * @param iterable<ReadableLogRecord> $batch
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface;
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordLimits.php b/vendor/open-telemetry/sdk/Logs/LogRecordLimits.php
new file mode 100644
index 000000000..9f71e62ee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordLimits.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#logrecord-limits
+ */
+class LogRecordLimits
+{
+ private AttributesFactoryInterface $attributesFactory;
+
+ /**
+ * @internal Use {@see SpanLimitsBuilder} to create {@see SpanLimits} instance.
+ */
+ public function __construct(
+ AttributesFactoryInterface $attributesFactory
+ ) {
+ $this->attributesFactory = $attributesFactory;
+ }
+
+ public function getAttributeFactory(): AttributesFactoryInterface
+ {
+ return $this->attributesFactory;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php b/vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php
new file mode 100644
index 000000000..3aa5217ef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use const PHP_INT_MAX;
+
+class LogRecordLimitsBuilder
+{
+ /** @var ?int Maximum allowed attribute count per record */
+ private ?int $attributeCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute value length */
+ private ?int $attributeValueLengthLimit = null;
+
+ /**
+ * @param int $attributeCountLimit Maximum allowed attribute count per record
+ */
+ public function setAttributeCountLimit(int $attributeCountLimit): LogRecordLimitsBuilder
+ {
+ $this->attributeCountLimit = $attributeCountLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param int $attributeValueLengthLimit Maximum allowed attribute value length
+ */
+ public function setAttributeValueLengthLimit(int $attributeValueLengthLimit): LogRecordLimitsBuilder
+ {
+ $this->attributeValueLengthLimit = $attributeValueLengthLimit;
+
+ return $this;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public function build(): LogRecordLimits
+ {
+ $attributeCountLimit = $this->attributeCountLimit
+ ?: Configuration::getInt(Variables::OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT);
+ $attributeValueLengthLimit = $this->attributeValueLengthLimit
+ ?: Configuration::getInt(Variables::OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT);
+
+ if ($attributeValueLengthLimit === PHP_INT_MAX) {
+ $attributeValueLengthLimit = null;
+ }
+
+ $attributesFactory = Attributes::factory($attributeCountLimit, $attributeValueLengthLimit);
+
+ return new LogRecordLimits($attributesFactory);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php
new file mode 100644
index 000000000..dec463735
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Logs\Processor\BatchLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\MultiLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\NoopLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\SimpleLogRecordProcessor;
+
+class LogRecordProcessorFactory
+{
+ public function create(LogRecordExporterInterface $exporter, ?MeterProviderInterface $meterProvider = null): LogRecordProcessorInterface
+ {
+ $processors = [];
+ $list = Configuration::getList(Variables::OTEL_PHP_LOGS_PROCESSOR);
+ foreach ($list as $name) {
+ $processors[] = $this->createProcessor($name, $exporter, $meterProvider);
+ }
+
+ switch (count($processors)) {
+ case 0:
+ return NoopLogRecordProcessor::getInstance();
+ case 1:
+ return $processors[0];
+ default:
+ return new MultiLogRecordProcessor($processors);
+ }
+ }
+
+ private function createProcessor(string $name, LogRecordExporterInterface $exporter, ?MeterProviderInterface $meterProvider = null): LogRecordProcessorInterface
+ {
+ switch ($name) {
+ case KnownValues::VALUE_BATCH:
+ return new BatchLogRecordProcessor(
+ $exporter,
+ ClockFactory::getDefault(),
+ Configuration::getInt(Variables::OTEL_BLRP_MAX_QUEUE_SIZE),
+ Configuration::getInt(Variables::OTEL_BLRP_SCHEDULE_DELAY),
+ Configuration::getInt(Variables::OTEL_BLRP_EXPORT_TIMEOUT),
+ Configuration::getInt(Variables::OTEL_BLRP_MAX_EXPORT_BATCH_SIZE),
+ true,
+ $meterProvider,
+ );
+ case KnownValues::VALUE_SIMPLE:
+ return new SimpleLogRecordProcessor($exporter);
+ case Values::VALUE_NOOP:
+ case Values::VALUE_NONE:
+ return NoopLogRecordProcessor::getInstance();
+ default:
+ throw new InvalidArgumentException('Unknown processor: ' . $name);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php
new file mode 100644
index 000000000..1977d48fd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+interface LogRecordProcessorInterface
+{
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void;
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Logger.php b/vendor/open-telemetry/sdk/Logs/Logger.php
new file mode 100644
index 000000000..0b8db152d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Logger.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\LogRecord;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+/**
+ * Note that this logger class is deliberately NOT psr-3 compatible, per spec: "Note: this document defines a log
+ * backend API. The API is not intended to be called by application developers directly."
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md
+ */
+class Logger implements LoggerInterface
+{
+ private InstrumentationScopeInterface $scope;
+ private LoggerSharedState $loggerSharedState;
+
+ public function __construct(LoggerSharedState $loggerSharedState, InstrumentationScopeInterface $scope)
+ {
+ $this->loggerSharedState = $loggerSharedState;
+ $this->scope = $scope;
+ }
+
+ public function emit(LogRecord $logRecord): void
+ {
+ $readWriteLogRecord = new ReadWriteLogRecord($this->scope, $this->loggerSharedState, $logRecord);
+ // @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#onemit
+ $this->loggerSharedState->getProcessor()->onEmit(
+ $readWriteLogRecord,
+ $readWriteLogRecord->getContext(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProvider.php b/vendor/open-telemetry/sdk/Logs/LoggerProvider.php
new file mode 100644
index 000000000..f0a8266c1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProvider.php
@@ -0,0 +1,56 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\NoopLogger;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactoryInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+
+class LoggerProvider implements LoggerProviderInterface
+{
+ private LoggerSharedState $loggerSharedState;
+ private InstrumentationScopeFactoryInterface $instrumentationScopeFactory;
+
+ public function __construct(LogRecordProcessorInterface $processor, InstrumentationScopeFactoryInterface $instrumentationScopeFactory, ?ResourceInfo $resource = null)
+ {
+ $this->loggerSharedState = new LoggerSharedState(
+ $resource ?? ResourceInfoFactory::defaultResource(),
+ (new LogRecordLimitsBuilder())->build(),
+ $processor
+ );
+ $this->instrumentationScopeFactory = $instrumentationScopeFactory;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#logger-creation
+ */
+ public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): LoggerInterface
+ {
+ if ($this->loggerSharedState->hasShutdown()) {
+ return NoopLogger::getInstance();
+ }
+ $scope = $this->instrumentationScopeFactory->create($name, $version, $schemaUrl, $attributes);
+
+ return new Logger($this->loggerSharedState, $scope);
+ }
+
+ public function shutdown(CancellationInterface $cancellation = null): bool
+ {
+ return $this->loggerSharedState->shutdown($cancellation);
+ }
+
+ public function forceFlush(CancellationInterface $cancellation = null): bool
+ {
+ return $this->loggerSharedState->forceFlush($cancellation);
+ }
+
+ public static function builder(): LoggerProviderBuilder
+ {
+ return new LoggerProviderBuilder();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php b/vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php
new file mode 100644
index 000000000..37c56245c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Logs\Processor\MultiLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\NoopLogRecordProcessor;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class LoggerProviderBuilder
+{
+ /**
+ * @var array<LogRecordProcessorInterface>
+ */
+ private array $processors = [];
+ private ?ResourceInfo $resource = null;
+
+ public function addLogRecordProcessor(LogRecordProcessorInterface $processor): self
+ {
+ $this->processors[] = $processor;
+
+ return $this;
+ }
+
+ public function setResource(ResourceInfo $resource): self
+ {
+ $this->resource = $resource;
+
+ return $this;
+ }
+
+ public function build(): LoggerProviderInterface
+ {
+ return new LoggerProvider(
+ $this->buildProcessor(),
+ new InstrumentationScopeFactory(Attributes::factory()),
+ $this->resource
+ );
+ }
+
+ private function buildProcessor(): LogRecordProcessorInterface
+ {
+ switch (count($this->processors)) {
+ case 0:
+ return NoopLogRecordProcessor::getInstance();
+ case 1:
+ return $this->processors[0];
+ default:
+ return new MultiLogRecordProcessor($this->processors);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php b/vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php
new file mode 100644
index 000000000..3d0e965fd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Sdk;
+
+class LoggerProviderFactory
+{
+ public function create(?MeterProviderInterface $meterProvider = null): LoggerProviderInterface
+ {
+ if (Sdk::isDisabled()) {
+ return NoopLoggerProvider::getInstance();
+ }
+ $exporter = (new ExporterFactory())->create();
+ $processor = (new LogRecordProcessorFactory())->create($exporter, $meterProvider);
+ $instrumentationScopeFactory = new InstrumentationScopeFactory((new LogRecordLimitsBuilder())->build()->getAttributeFactory());
+
+ return new LoggerProvider($processor, $instrumentationScopeFactory);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php b/vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php
new file mode 100644
index 000000000..5debb13cc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs as API;
+
+interface LoggerProviderInterface extends API\LoggerProviderInterface
+{
+ public function shutdown(): bool;
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerSharedState.php b/vendor/open-telemetry/sdk/Logs/LoggerSharedState.php
new file mode 100644
index 000000000..aeeb45518
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerSharedState.php
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class LoggerSharedState
+{
+ private ResourceInfo $resource;
+ private LogRecordProcessorInterface $processor;
+ private LogRecordLimits $limits;
+ private ?bool $shutdownResult = null;
+
+ public function __construct(
+ ResourceInfo $resource,
+ LogRecordLimits $limits,
+ LogRecordProcessorInterface $processor
+ ) {
+ $this->resource = $resource;
+ $this->limits = $limits;
+ $this->processor = $processor;
+ }
+ public function hasShutdown(): bool
+ {
+ return null !== $this->shutdownResult;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->resource;
+ }
+
+ public function getProcessor(): LogRecordProcessorInterface
+ {
+ return $this->processor;
+ }
+
+ public function getLogRecordLimits(): LogRecordLimits
+ {
+ return $this->limits;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->shutdownResult !== null) {
+ return $this->shutdownResult;
+ }
+ $this->shutdownResult = $this->processor->shutdown($cancellation);
+
+ return $this->shutdownResult;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->processor->forceFlush($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php b/vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php
new file mode 100644
index 000000000..819e02ee5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\NoopLogger;
+
+class NoopLoggerProvider implements LoggerProviderInterface
+{
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): LoggerInterface
+ {
+ return NoopLogger::getInstance();
+ }
+
+ public function shutdown(): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php
new file mode 100644
index 000000000..fc6faca54
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php
@@ -0,0 +1,273 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+use SplQueue;
+use Throwable;
+
+class BatchLogRecordProcessor implements LogRecordProcessorInterface
+{
+ use LogsMessagesTrait;
+
+ public const DEFAULT_SCHEDULE_DELAY = 1000;
+ public const DEFAULT_EXPORT_TIMEOUT = 30000;
+ public const DEFAULT_MAX_QUEUE_SIZE = 2048;
+ public const DEFAULT_MAX_EXPORT_BATCH_SIZE = 512;
+
+ private const ATTRIBUTES_PROCESSOR = ['processor' => 'batching'];
+ private const ATTRIBUTES_QUEUED = self::ATTRIBUTES_PROCESSOR + ['state' => 'queued'];
+ private const ATTRIBUTES_PENDING = self::ATTRIBUTES_PROCESSOR + ['state' => 'pending'];
+ private const ATTRIBUTES_PROCESSED = self::ATTRIBUTES_PROCESSOR + ['state' => 'processed'];
+ private const ATTRIBUTES_DROPPED = self::ATTRIBUTES_PROCESSOR + ['state' => 'dropped'];
+ private const ATTRIBUTES_FREE = self::ATTRIBUTES_PROCESSOR + ['state' => 'free'];
+
+ private LogRecordExporterInterface $exporter;
+ private ClockInterface $clock;
+ private int $maxQueueSize;
+ private int $scheduledDelayNanos;
+ private int $maxExportBatchSize;
+ private bool $autoFlush;
+ private ContextInterface $exportContext;
+
+ private ?int $nextScheduledRun = null;
+ private bool $running = false;
+ private int $dropped = 0;
+ private int $processed = 0;
+ private int $batchId = 0;
+ private int $queueSize = 0;
+ /** @var list<ReadWriteLogRecord> */
+ private array $batch = [];
+ /** @var SplQueue<list<ReadWriteLogRecord>> */
+ private SplQueue $queue;
+ /** @var SplQueue<array{int, string, ?CancellationInterface, bool, ContextInterface}> */
+ private SplQueue $flush;
+
+ private bool $closed = false;
+
+ public function __construct(
+ LogRecordExporterInterface $exporter,
+ ClockInterface $clock,
+ int $maxQueueSize = self::DEFAULT_MAX_QUEUE_SIZE,
+ int $scheduledDelayMillis = self::DEFAULT_SCHEDULE_DELAY,
+ int $exportTimeoutMillis = self::DEFAULT_EXPORT_TIMEOUT,
+ int $maxExportBatchSize = self::DEFAULT_MAX_EXPORT_BATCH_SIZE,
+ bool $autoFlush = true,
+ ?MeterProviderInterface $meterProvider = null
+ ) {
+ if ($maxQueueSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum queue size (%d) must be greater than zero', $maxQueueSize));
+ }
+ if ($scheduledDelayMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Scheduled delay (%d) must be greater than zero', $scheduledDelayMillis));
+ }
+ if ($exportTimeoutMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Export timeout (%d) must be greater than zero', $exportTimeoutMillis));
+ }
+ if ($maxExportBatchSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be greater than zero', $maxExportBatchSize));
+ }
+ if ($maxExportBatchSize > $maxQueueSize) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be less than or equal to maximum queue size (%d)', $maxExportBatchSize, $maxQueueSize));
+ }
+
+ $this->exporter = $exporter;
+ $this->clock = $clock;
+ $this->maxQueueSize = $maxQueueSize;
+ $this->scheduledDelayNanos = $scheduledDelayMillis * 1_000_000;
+ $this->maxExportBatchSize = $maxExportBatchSize;
+ $this->autoFlush = $autoFlush;
+
+ $this->exportContext = Context::getCurrent();
+ $this->queue = new SplQueue();
+ $this->flush = new SplQueue();
+
+ if ($meterProvider === null) {
+ return;
+ }
+
+ $meter = $meterProvider->getMeter('io.opentelemetry.sdk');
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.logs.log_processor.logs',
+ '{logs}',
+ 'The number of log records received by the processor',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $processed = $this->processed;
+ $dropped = $this->dropped;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($processed, self::ATTRIBUTES_PROCESSED);
+ $observer->observe($dropped, self::ATTRIBUTES_DROPPED);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.logs.log_processor.queue.limit',
+ '{logs}',
+ 'The queue size limit',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $observer->observe($this->maxQueueSize, self::ATTRIBUTES_PROCESSOR);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.logs.log_processor.queue.usage',
+ '{logs}',
+ 'The current queue usage',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $free = $this->maxQueueSize - $this->queueSize;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($free, self::ATTRIBUTES_FREE);
+ });
+ }
+
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ if ($this->closed) {
+ return;
+ }
+
+ if ($this->queueSize === $this->maxQueueSize) {
+ $this->dropped++;
+
+ return;
+ }
+
+ $this->queueSize++;
+ $this->batch[] = $record;
+ $this->nextScheduledRun ??= $this->clock->now() + $this->scheduledDelayNanos;
+
+ if (count($this->batch) === $this->maxExportBatchSize) {
+ $this->enqueueBatch();
+ }
+ if ($this->autoFlush) {
+ $this->flush();
+ }
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ private function flush(?string $flushMethod = null, ?CancellationInterface $cancellation = null): bool
+ {
+ if ($flushMethod !== null) {
+ $flushId = $this->batchId + $this->queue->count() + (int) (bool) $this->batch;
+ $this->flush->enqueue([$flushId, $flushMethod, $cancellation, !$this->running, Context::getCurrent()]);
+ }
+
+ if ($this->running) {
+ return false;
+ }
+
+ $success = true;
+ $exception = null;
+ $this->running = true;
+
+ try {
+ for (;;) {
+ while (!$this->flush->isEmpty() && $this->flush->bottom()[0] <= $this->batchId) {
+ [, $flushMethod, $cancellation, $propagateResult, $context] = $this->flush->dequeue();
+ $scope = $context->activate();
+
+ try {
+ $result = $this->exporter->$flushMethod($cancellation);
+ if ($propagateResult) {
+ $success = $result;
+ }
+ } catch (Throwable $e) {
+ if ($propagateResult) {
+ $exception = $e;
+ } else {
+ self::logError(sprintf('Unhandled %s error', $flushMethod), ['exception' => $e]);
+ }
+ } finally {
+ $scope->detach();
+ }
+ }
+
+ if (!$this->shouldFlush()) {
+ break;
+ }
+
+ if ($this->queue->isEmpty()) {
+ $this->enqueueBatch();
+ }
+ $batchSize = count($this->queue->bottom());
+ $this->batchId++;
+ $scope = $this->exportContext->activate();
+
+ try {
+ $this->exporter->export($this->queue->dequeue())->await();
+ } catch (Throwable $e) {
+ self::logError('Unhandled export error', ['exception' => $e]);
+ } finally {
+ $this->processed += $batchSize;
+ $this->queueSize -= $batchSize;
+ $scope->detach();
+ }
+ }
+ } finally {
+ $this->running = false;
+ }
+
+ if ($exception !== null) {
+ throw $exception;
+ }
+
+ return $success;
+ }
+
+ private function shouldFlush(): bool
+ {
+ return !$this->flush->isEmpty()
+ || $this->autoFlush && !$this->queue->isEmpty()
+ || $this->autoFlush && $this->nextScheduledRun !== null && $this->clock->now() > $this->nextScheduledRun;
+ }
+
+ private function enqueueBatch(): void
+ {
+ assert($this->batch !== []);
+
+ $this->queue->enqueue($this->batch);
+ $this->batch = [];
+ $this->nextScheduledRun = null;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php
new file mode 100644
index 000000000..753a75df8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+
+class MultiLogRecordProcessor implements LogRecordProcessorInterface
+{
+ // @var LogRecordProcessorInterface[]
+ private array $processors = [];
+
+ public function __construct(array $processors)
+ {
+ foreach ($processors as $processor) {
+ assert($processor instanceof LogRecordProcessorInterface);
+ $this->processors[] = $processor;
+ }
+ }
+
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ foreach ($this->processors as $processor) {
+ $processor->onEmit($record, $context);
+ }
+ }
+
+ /**
+ * Returns `true` if all processors shut down successfully, else `false`
+ * Subsequent calls to `shutdown` are a no-op.
+ */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+ foreach ($this->processors as $processor) {
+ if (!$processor->shutdown($cancellation)) {
+ $result = false;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Returns `true` if all processors flush successfully, else `false`.
+ */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+ foreach ($this->processors as $processor) {
+ if (!$processor->forceFlush($cancellation)) {
+ $result = false;
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php
new file mode 100644
index 000000000..7028052e1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+
+class NoopLogRecordProcessor implements LogRecordProcessorInterface
+{
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php
new file mode 100644
index 000000000..f26f6607c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+
+class SimpleLogRecordProcessor implements LogRecordProcessorInterface
+{
+ private LogRecordExporterInterface $exporter;
+ public function __construct(LogRecordExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#onemit
+ */
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ $this->exporter->export([$record]);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->exporter->shutdown($cancellation);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->exporter->forceFlush($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php b/vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php
new file mode 100644
index 000000000..3bb288c56
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use Psr\Log\LogLevel as PsrLogLevel;
+
+interface PsrSeverityMapperInterface
+{
+ /**
+ * Severity code according to rfc5424 (Syslog Protocol)
+ * @see : https://datatracker.ietf.org/doc/html/rfc5424#page-10
+ */
+ public const RFC_CODE = [
+ // Detailed debug information.
+ PsrLogLevel::DEBUG => 7,
+ // Interesting events. Examples: User logs in, SQL logs.
+ PsrLogLevel::INFO => 6,
+ // Normal but significant events.
+ PsrLogLevel::NOTICE => 5,
+ // Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API,
+ // undesirable things that are not necessarily wrong.
+ PsrLogLevel::WARNING => 4,
+ // Runtime errors that do not require immediate action but should typically be logged and monitored.
+ PsrLogLevel::ERROR => 3,
+ // Critical conditions. Example: Application component unavailable, unexpected exception.
+ PsrLogLevel::CRITICAL => 2,
+ // Action must be taken immediately. Example: Entire website down, database unavailable, etc.
+ // This should trigger the alerts and wake you up.
+ PsrLogLevel::ALERT => 1,
+ // Emergency: system is unusable.
+ PsrLogLevel::EMERGENCY => 0,
+ ];
+
+ /**
+ * Mappig of OpenTelemetry SeverityNumber to PsrLogLevel.
+ * @see: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/logs/data-model.md#field-severitynumber
+ */
+ public const SEVERITY_NUMBER = [
+ PsrLogLevel::DEBUG => 5,
+ PsrLogLevel::INFO => 9,
+ PsrLogLevel::NOTICE => 10,
+ PsrLogLevel::WARNING => 13,
+ PsrLogLevel::ERROR => 17,
+ PsrLogLevel::CRITICAL => 18,
+ PsrLogLevel::ALERT => 21,
+ PsrLogLevel::EMERGENCY => 22,
+ ];
+}
diff --git a/vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php b/vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php
new file mode 100644
index 000000000..9bb4b1564
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php
@@ -0,0 +1,9 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+class ReadWriteLogRecord extends ReadableLogRecord
+{
+}
diff --git a/vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php b/vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php
new file mode 100644
index 000000000..5c6531477
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php
@@ -0,0 +1,103 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LogRecord;
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Attribute\LogRecordAttributeValidator;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#log-and-event-record-definition
+ * "Note: Typically this will be implemented with a new interface or (immutable) value type."
+ */
+class ReadableLogRecord extends LogRecord
+{
+ private InstrumentationScopeInterface $scope;
+ private LoggerSharedState $loggerSharedState;
+ protected AttributesInterface $convertedAttributes;
+ protected SpanContextInterface $spanContext;
+
+ public function __construct(InstrumentationScopeInterface $scope, LoggerSharedState $loggerSharedState, LogRecord $logRecord)
+ {
+ $this->scope = $scope;
+ $this->loggerSharedState = $loggerSharedState;
+
+ parent::__construct($logRecord->body);
+ $this->timestamp = $logRecord->timestamp;
+ $this->observedTimestamp = $logRecord->observedTimestamp
+ ?? (int) (microtime(true) * LogRecord::NANOS_PER_SECOND);
+ $this->context = $logRecord->context;
+ $context = $this->context ?? Context::getCurrent();
+ $this->spanContext = Span::fromContext($context)->getContext();
+ $this->severityNumber = $logRecord->severityNumber;
+ $this->severityText = $logRecord->severityText;
+
+ //convert attributes now so that excess data is not sent to processors
+ $this->convertedAttributes = $this->loggerSharedState
+ ->getLogRecordLimits()
+ ->getAttributeFactory()
+ ->builder($logRecord->attributes, new LogRecordAttributeValidator())
+ ->build();
+ }
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface
+ {
+ return $this->scope;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->loggerSharedState->getResource();
+ }
+
+ public function getTimestamp(): ?int
+ {
+ return $this->timestamp;
+ }
+
+ public function getObservedTimestamp(): ?int
+ {
+ return $this->observedTimestamp;
+ }
+
+ public function getContext(): ?ContextInterface
+ {
+ return $this->context;
+ }
+
+ public function getSpanContext(): ?SpanContextInterface
+ {
+ return $this->spanContext;
+ }
+
+ public function getSeverityNumber(): ?int
+ {
+ return $this->severityNumber;
+ }
+
+ public function getSeverityText(): ?string
+ {
+ return $this->severityText;
+ }
+
+ /**
+ * @return mixed|null
+ */
+ public function getBody()
+ {
+ return $this->body;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->convertedAttributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php b/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php
new file mode 100644
index 000000000..9d9d55de6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php
@@ -0,0 +1,83 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use Psr\Log\InvalidArgumentException;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerTrait;
+use Psr\Log\LogLevel;
+use ReflectionClass;
+use Throwable;
+
+class SimplePsrFileLogger implements LoggerInterface
+{
+ use LoggerTrait;
+
+ private const DEFAULT_LOGGER_NAME = 'otel';
+
+ private static ?array $logLevels = null;
+
+ private string $filename;
+
+ private string $loggerName ;
+
+ /**
+ * @param string $filename
+ */
+ public function __construct(string $filename, string $loggerName = self::DEFAULT_LOGGER_NAME)
+ {
+ $this->filename = $filename;
+ $this->loggerName = $loggerName;
+ }
+
+ /**
+ * @psalm-suppress MoreSpecificImplementedParamType
+ */
+ public function log($level, $message, array $context = []): void
+ {
+ $level = strtolower($level);
+
+ if (!in_array($level, self::getLogLevels(), true)) {
+ throw new InvalidArgumentException(
+ sprintf('Invalid Log level: "%s"', $level)
+ );
+ }
+
+ file_put_contents($this->filename, $this->formatLog((string) $level, (string) $message, $context), FILE_APPEND);
+ }
+
+ /**
+ * @param string $level
+ * @param string $message
+ * @param array $context
+ * @return string
+ */
+ private function formatLog(string $level, string $message, array $context = []): string
+ {
+ try {
+ $encodedContext = json_encode($context, JSON_THROW_ON_ERROR);
+ } catch (Throwable $t) {
+ $encodedContext = sprintf('(Could not encode context: %s)', $t->getMessage());
+ }
+
+ return sprintf(
+ '[%s] %s %s: %s %s%s',
+ date(DATE_RFC3339_EXTENDED),
+ $this->loggerName,
+ $level,
+ $message,
+ $encodedContext,
+ PHP_EOL
+ );
+ }
+
+ /**
+ * @return array
+ */
+ private static function getLogLevels(): array
+ {
+ return self::$logLevels ?? self::$logLevels = (new ReflectionClass(LogLevel::class))->getConstants();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php
new file mode 100644
index 000000000..d68ecd830
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php
@@ -0,0 +1,167 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+use function array_fill;
+use function count;
+use const INF;
+use const NAN;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * @implements AggregationInterface<ExplicitBucketHistogramSummary>
+ */
+final class ExplicitBucketHistogramAggregation implements AggregationInterface
+{
+ /**
+ * @var list<float|int>
+ * @readonly
+ */
+ public array $boundaries;
+
+ /**
+ * @param list<float|int> $boundaries strictly ascending histogram bucket boundaries
+ */
+ public function __construct(array $boundaries)
+ {
+ $this->boundaries = $boundaries;
+ }
+
+ public function initialize(): ExplicitBucketHistogramSummary
+ {
+ return new ExplicitBucketHistogramSummary(
+ 0,
+ 0,
+ +INF,
+ -INF,
+ array_fill(0, count($this->boundaries) + 1, 0),
+ );
+ }
+
+ /**
+ * @param ExplicitBucketHistogramSummary $summary
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $boundariesCount = count($this->boundaries);
+ for ($i = 0; $i < $boundariesCount && $this->boundaries[$i] < $value; $i++) {
+ }
+ $summary->count++;
+ $summary->sum += $value;
+ $summary->min = self::min($value, $summary->min);
+ $summary->max = self::max($value, $summary->max);
+ $summary->buckets[$i]++;
+ }
+
+ /**
+ * @param ExplicitBucketHistogramSummary $left
+ * @param ExplicitBucketHistogramSummary $right
+ */
+ public function merge($left, $right): ExplicitBucketHistogramSummary
+ {
+ $count = $left->count + $right->count;
+ $sum = $left->sum + $right->sum;
+ $min = self::min($left->min, $right->min);
+ $max = self::max($left->max, $right->max);
+ $buckets = $right->buckets;
+ foreach ($left->buckets as $i => $bucketCount) {
+ $buckets[$i] += $bucketCount;
+ }
+
+ return new ExplicitBucketHistogramSummary(
+ $count,
+ $sum,
+ $min,
+ $max,
+ $buckets,
+ );
+ }
+
+ /**
+ * @param ExplicitBucketHistogramSummary $left
+ * @param ExplicitBucketHistogramSummary $right
+ */
+ public function diff($left, $right): ExplicitBucketHistogramSummary
+ {
+ $count = -$left->count + $right->count;
+ $sum = -$left->sum + $right->sum;
+ $min = $left->min > $right->min ? $right->min : NAN;
+ $max = $left->max < $right->max ? $right->max : NAN;
+ $buckets = $right->buckets;
+ foreach ($left->buckets as $i => $bucketCount) {
+ $buckets[$i] -= $bucketCount;
+ }
+
+ return new ExplicitBucketHistogramSummary(
+ $count,
+ $sum,
+ $min,
+ $max,
+ $buckets,
+ );
+ }
+
+ /**
+ * @param array<ExplicitBucketHistogramSummary> $summaries
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): Data\Histogram {
+ $dataPoints = [];
+ foreach ($attributes as $key => $dataPointAttributes) {
+ if ($summaries[$key]->count === 0) {
+ continue;
+ }
+
+ $dataPoints[] = new Data\HistogramDataPoint(
+ $summaries[$key]->count,
+ $summaries[$key]->sum,
+ $summaries[$key]->min,
+ $summaries[$key]->max,
+ $summaries[$key]->buckets,
+ $this->boundaries,
+ $dataPointAttributes,
+ $startTimestamp,
+ $timestamp,
+ $exemplars[$key] ?? [],
+ );
+ }
+
+ return new Data\Histogram(
+ $dataPoints,
+ $temporality,
+ );
+ }
+
+ /**
+ * @param float|int $left
+ * @param float|int $right
+ * @return float|int
+ */
+ private static function min($left, $right)
+ {
+ /** @noinspection PhpConditionAlreadyCheckedInspection */
+ return $left <= $right ? $left : ($right <= $left ? $right : NAN);
+ }
+
+ /**
+ * @param float|int $left
+ * @param float|int $right
+ * @return float|int
+ */
+ private static function max($left, $right)
+ {
+ /** @noinspection PhpConditionAlreadyCheckedInspection */
+ return $left >= $right ? $left : ($right >= $left ? $right : NAN);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php
new file mode 100644
index 000000000..1878a34a0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+final class ExplicitBucketHistogramSummary
+{
+ public int $count;
+ /**
+ * @var float|int
+ */
+ public $sum;
+ /**
+ * @var float|int
+ */
+ public $min;
+ /**
+ * @var float|int
+ */
+ public $max;
+ /**
+ * @var int[]
+ */
+ public array $buckets;
+ /**
+ * @param float|int $sum
+ * @param float|int $min
+ * @param float|int $max
+ * @param int[] $buckets
+ */
+ public function __construct(int $count, $sum, $min, $max, array $buckets)
+ {
+ $this->count = $count;
+ $this->sum = $sum;
+ $this->min = $min;
+ $this->max = $max;
+ $this->buckets = $buckets;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php
new file mode 100644
index 000000000..aff04e315
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php
@@ -0,0 +1,81 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * @implements AggregationInterface<LastValueSummary>
+ */
+final class LastValueAggregation implements AggregationInterface
+{
+ public function initialize(): LastValueSummary
+ {
+ return new LastValueSummary(null, 0);
+ }
+
+ /**
+ * @param LastValueSummary $summary
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ if ($summary->value === null || $timestamp >= $summary->timestamp) {
+ $summary->value = $value;
+ $summary->timestamp = $timestamp;
+ }
+ }
+
+ /**
+ * @param LastValueSummary $left
+ * @param LastValueSummary $right
+ */
+ public function merge($left, $right): LastValueSummary
+ {
+ return $right->timestamp >= $left->timestamp ? $right : $left;
+ }
+
+ /**
+ * @param LastValueSummary $left
+ * @param LastValueSummary $right
+ */
+ public function diff($left, $right): LastValueSummary
+ {
+ return $right->timestamp >= $left->timestamp ? $right : $left;
+ }
+
+ /**
+ * @param array<LastValueSummary> $summaries
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): Data\Gauge {
+ $dataPoints = [];
+ foreach ($attributes as $key => $dataPointAttributes) {
+ if ($summaries[$key]->value === null) {
+ continue;
+ }
+
+ $dataPoints[] = new Data\NumberDataPoint(
+ $summaries[$key]->value,
+ $dataPointAttributes,
+ $startTimestamp,
+ $timestamp,
+ $exemplars[$key] ?? [],
+ );
+ }
+
+ return new Data\Gauge(
+ $dataPoints,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php
new file mode 100644
index 000000000..6cdb5ac9f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+final class LastValueSummary
+{
+ /**
+ * @var float|int|null
+ */
+ public $value;
+ public int $timestamp;
+ /**
+ * @param float|int|null $value
+ */
+ public function __construct($value, int $timestamp)
+ {
+ $this->value = $value;
+ $this->timestamp = $timestamp;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php
new file mode 100644
index 000000000..dc317ce73
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php
@@ -0,0 +1,91 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * @implements AggregationInterface<SumSummary>
+ */
+final class SumAggregation implements AggregationInterface
+{
+ private bool $monotonic;
+
+ public function __construct(bool $monotonic = false)
+ {
+ $this->monotonic = $monotonic;
+ }
+
+ public function initialize(): SumSummary
+ {
+ return new SumSummary(0);
+ }
+
+ /**
+ * @param SumSummary $summary
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $summary->value += $value;
+ }
+
+ /**
+ * @param SumSummary $left
+ * @param SumSummary $right
+ */
+ public function merge($left, $right): SumSummary
+ {
+ $sum = $left->value + $right->value;
+
+ return new SumSummary(
+ $sum,
+ );
+ }
+
+ /**
+ * @param SumSummary $left
+ * @param SumSummary $right
+ */
+ public function diff($left, $right): SumSummary
+ {
+ $sum = -$left->value + $right->value;
+
+ return new SumSummary(
+ $sum,
+ );
+ }
+
+ /**
+ * @param array<SumSummary> $summaries
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): Data\Sum {
+ $dataPoints = [];
+ foreach ($attributes as $key => $dataPointAttributes) {
+ $dataPoints[] = new Data\NumberDataPoint(
+ $summaries[$key]->value,
+ $dataPointAttributes,
+ $startTimestamp,
+ $timestamp,
+ $exemplars[$key] ?? [],
+ );
+ }
+
+ return new Data\Sum(
+ $dataPoints,
+ $temporality,
+ $this->monotonic,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php
new file mode 100644
index 000000000..9b257193c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+final class SumSummary
+{
+ /**
+ * @var float|int
+ */
+ public $value;
+ /**
+ * @param float|int $value
+ */
+ public function __construct($value)
+ {
+ $this->value = $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AggregationInterface.php b/vendor/open-telemetry/sdk/Metrics/AggregationInterface.php
new file mode 100644
index 000000000..0a85207e0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AggregationInterface.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+/**
+ * @psalm-template T
+ */
+interface AggregationInterface
+{
+ /**
+ * @psalm-return T
+ */
+ public function initialize();
+
+ /**
+ * @psalm-param T $summary
+ * @psalm-param float|int $value
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void;
+
+ /**
+ * @psalm-param T $left
+ * @psalm-param T $right
+ * @psalm-return T
+ */
+ public function merge($left, $right);
+
+ /**
+ * @psalm-param T $left
+ * @psalm-param T $right
+ * @psalm-return T
+ */
+ public function diff($left, $right);
+
+ /**
+ * @param array<AttributesInterface> $attributes
+ * @psalm-param array<T> $summaries
+ * @param array<list<Exemplar>> $exemplars
+ * @param string|Temporality $temporality
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): DataInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php b/vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php
new file mode 100644
index 000000000..f046d033d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+interface AggregationTemporalitySelectorInterface
+{
+ /**
+ * Returns the temporality to use for the given metric.
+ *
+ * It is recommended to return {@see MetricMetadataInterface::temporality()}
+ * if the exporter does not require a specific temporality.
+ *
+ * @return string|Temporality|null temporality to use, or null to signal
+ * that the given metric should not be exported by this exporter
+ */
+ public function temporality(MetricMetadataInterface $metric);
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php
new file mode 100644
index 000000000..c4df8e878
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\AttributeProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+
+/**
+ * @internal
+ */
+final class FilteredAttributeProcessor implements AttributeProcessorInterface
+{
+ private array $attributeKeys;
+
+ public function __construct(array $attributeKeys)
+ {
+ $this->attributeKeys = $attributeKeys;
+ }
+
+ public function process(AttributesInterface $attributes, ContextInterface $context): AttributesInterface
+ {
+ $filtered = [];
+ foreach ($this->attributeKeys as $key) {
+ $filtered[$key] = $attributes->get($key);
+ }
+
+ return new Attributes($filtered, 0);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php
new file mode 100644
index 000000000..f261563ea
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\AttributeProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+
+/**
+ * @internal
+ */
+final class IdentityAttributeProcessor implements AttributeProcessorInterface
+{
+ public function process(AttributesInterface $attributes, ContextInterface $context): AttributesInterface
+ {
+ return $attributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php
new file mode 100644
index 000000000..d2077aa39
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * @internal
+ */
+interface AttributeProcessorInterface
+{
+ public function process(AttributesInterface $attributes, ContextInterface $context): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Counter.php b/vendor/open-telemetry/sdk/Metrics/Counter.php
new file mode 100644
index 000000000..9cc6b75f9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Counter.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\CounterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class Counter implements CounterInterface
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, Instrument $instrument, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ $this->writer->record($this->instrument, $amount, $attributes, $context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php b/vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php
new file mode 100644
index 000000000..7aa0c0e20
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php
@@ -0,0 +1,9 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+interface DataInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php b/vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php
new file mode 100644
index 000000000..bd2034f75
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php
@@ -0,0 +1,65 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class Exemplar
+{
+
+ /**
+ * @var int|string
+ */
+ private $index;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $value;
+ /**
+ * @readonly
+ */
+ public int $timestamp;
+ /**
+ * @readonly
+ */
+ public AttributesInterface $attributes;
+ /**
+ * @readonly
+ */
+ public ?string $traceId;
+ /**
+ * @readonly
+ */
+ public ?string $spanId;
+
+ /**
+ * @param int|string $index
+ * @param float|int $value
+ */
+ public function __construct($index, $value, int $timestamp, AttributesInterface $attributes, ?string $traceId, ?string $spanId)
+ {
+ $this->index = $index;
+ $this->value = $value;
+ $this->timestamp = $timestamp;
+ $this->attributes = $attributes;
+ $this->traceId = $traceId;
+ $this->spanId = $spanId;
+ }
+
+ /**
+ * @param iterable<Exemplar> $exemplars
+ * @return array<list<Exemplar>>
+ */
+ public static function groupByIndex(iterable $exemplars): array
+ {
+ $grouped = [];
+ foreach ($exemplars as $exemplar) {
+ $grouped[$exemplar->index][] = $exemplar;
+ }
+
+ return $grouped;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Gauge.php b/vendor/open-telemetry/sdk/Metrics/Data/Gauge.php
new file mode 100644
index 000000000..00eb50939
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Gauge.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+final class Gauge implements DataInterface
+{
+
+ /**
+ * @var iterable<NumberDataPoint>
+ * @readonly
+ */
+ public iterable $dataPoints;
+ /**
+ * @param iterable<NumberDataPoint> $dataPoints
+ */
+ public function __construct(iterable $dataPoints)
+ {
+ $this->dataPoints = $dataPoints;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Histogram.php b/vendor/open-telemetry/sdk/Metrics/Data/Histogram.php
new file mode 100644
index 000000000..782698026
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Histogram.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+final class Histogram implements DataInterface
+{
+
+ /**
+ * @var iterable<HistogramDataPoint>
+ * @readonly
+ */
+ public iterable $dataPoints;
+ /**
+ * @var string|Temporality
+ * @readonly
+ */
+ public $temporality;
+ /**
+ * @param iterable<HistogramDataPoint> $dataPoints
+ * @param string|Temporality $temporality
+ */
+ public function __construct(iterable $dataPoints, $temporality)
+ {
+ $this->dataPoints = $dataPoints;
+ $this->temporality = $temporality;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php b/vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php
new file mode 100644
index 000000000..4c9df07b4
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class HistogramDataPoint
+{
+ /**
+ * @readonly
+ */
+ public int $count;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $sum;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $min;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $max;
+ /**
+ * @var int[]
+ * @readonly
+ */
+ public array $bucketCounts;
+ /**
+ * @var list<float|int>
+ * @readonly
+ */
+ public array $explicitBounds;
+ /**
+ * @readonly
+ */
+ public AttributesInterface $attributes;
+ /**
+ * @readonly
+ */
+ public int $startTimestamp;
+ /**
+ * @readonly
+ */
+ public int $timestamp;
+ /**
+ * @readonly
+ */
+ public iterable $exemplars = [];
+ /**
+ * @param float|int $sum
+ * @param float|int $min
+ * @param float|int $max
+ * @param int[] $bucketCounts
+ * @param list<float|int> $explicitBounds
+ */
+ public function __construct(int $count, $sum, $min, $max, array $bucketCounts, array $explicitBounds, AttributesInterface $attributes, int $startTimestamp, int $timestamp, iterable $exemplars = [])
+ {
+ $this->count = $count;
+ $this->sum = $sum;
+ $this->min = $min;
+ $this->max = $max;
+ $this->bucketCounts = $bucketCounts;
+ $this->explicitBounds = $explicitBounds;
+ $this->attributes = $attributes;
+ $this->startTimestamp = $startTimestamp;
+ $this->timestamp = $timestamp;
+ $this->exemplars = $exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Metric.php b/vendor/open-telemetry/sdk/Metrics/Data/Metric.php
new file mode 100644
index 000000000..41fcb52dd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Metric.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+final class Metric
+{
+ /**
+ * @readonly
+ */
+ public InstrumentationScopeInterface $instrumentationScope;
+ /**
+ * @readonly
+ */
+ public ResourceInfo $resource;
+ /**
+ * @readonly
+ */
+ public string $name;
+ /**
+ * @readonly
+ */
+ public ?string $description;
+ /**
+ * @readonly
+ */
+ public ?string $unit;
+ /**
+ * @readonly
+ */
+ public DataInterface $data;
+
+ public function __construct(InstrumentationScopeInterface $instrumentationScope, ResourceInfo $resource, string $name, ?string $unit, ?string $description, DataInterface $data)
+ {
+ $this->instrumentationScope = $instrumentationScope;
+ $this->resource = $resource;
+ $this->name = $name;
+ $this->description = $description;
+ $this->unit = $unit;
+ $this->data = $data;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php b/vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php
new file mode 100644
index 000000000..1d00e783a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class NumberDataPoint
+{
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $value;
+ /**
+ * @readonly
+ */
+ public AttributesInterface $attributes;
+ /**
+ * @readonly
+ */
+ public int $startTimestamp;
+ /**
+ * @readonly
+ */
+ public int $timestamp;
+ /**
+ * @readonly
+ */
+ public iterable $exemplars = [];
+ /**
+ * @param float|int $value
+ */
+ public function __construct($value, AttributesInterface $attributes, int $startTimestamp, int $timestamp, iterable $exemplars = [])
+ {
+ $this->value = $value;
+ $this->attributes = $attributes;
+ $this->startTimestamp = $startTimestamp;
+ $this->timestamp = $timestamp;
+ $this->exemplars = $exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Sum.php b/vendor/open-telemetry/sdk/Metrics/Data/Sum.php
new file mode 100644
index 000000000..77c4c1021
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Sum.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+final class Sum implements DataInterface
+{
+
+ /**
+ * @var iterable<NumberDataPoint>
+ * @readonly
+ */
+ public iterable $dataPoints;
+ /**
+ * @var string|Temporality
+ * @readonly
+ */
+ public $temporality;
+ /**
+ * @readonly
+ */
+ public bool $monotonic;
+ /**
+ * @param iterable<NumberDataPoint> $dataPoints
+ * @param string|Temporality $temporality
+ */
+ public function __construct(iterable $dataPoints, $temporality, bool $monotonic)
+ {
+ $this->dataPoints = $dataPoints;
+ $this->temporality = $temporality;
+ $this->monotonic = $monotonic;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Temporality.php b/vendor/open-telemetry/sdk/Metrics/Data/Temporality.php
new file mode 100644
index 000000000..b6642ebd0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Temporality.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * Metric aggregation temporality.
+ *
+ * Has to be type-hinted as `string|Temporality` to be forward compatible.
+ */
+final class Temporality
+{
+ public const DELTA = 'Delta';
+ public const CUMULATIVE = 'Cumulative';
+
+ private function __construct()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php
new file mode 100644
index 000000000..e5c2fcc0c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface DefaultAggregationProviderInterface
+{
+ /**
+ * @param string|InstrumentType $instrumentType
+ */
+ public function defaultAggregation($instrumentType): ?AggregationInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php
new file mode 100644
index 000000000..37c5cb110
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+trait DefaultAggregationProviderTrait
+{
+ public function defaultAggregation($instrumentType): ?AggregationInterface
+ {
+ switch ($instrumentType) {
+ case InstrumentType::COUNTER:
+ case InstrumentType::ASYNCHRONOUS_COUNTER:
+ return new Aggregation\SumAggregation(true);
+ case InstrumentType::UP_DOWN_COUNTER:
+ case InstrumentType::ASYNCHRONOUS_UP_DOWN_COUNTER:
+ return new Aggregation\SumAggregation();
+ case InstrumentType::HISTOGRAM:
+ return new Aggregation\ExplicitBucketHistogramAggregation([0, 5, 10, 25, 50, 75, 100, 250, 500, 1000]);
+ case InstrumentType::ASYNCHRONOUS_GAUGE:
+ return new Aggregation\LastValueAggregation();
+ }
+
+ // @codeCoverageIgnoreStart
+ return null;
+ // @codeCoverageIgnoreEnd
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php
new file mode 100644
index 000000000..3a50430ed
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * @internal
+ */
+final class BucketEntry
+{
+ /**
+ * @var int|string
+ */
+ public $index;
+ /**
+ * @var float|int
+ */
+ public $value;
+ public int $timestamp;
+ public AttributesInterface $attributes;
+ public ?string $traceId = null;
+ public ?string $spanId = null;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php
new file mode 100644
index 000000000..574ce92af
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use function array_fill;
+use function assert;
+use function count;
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+
+/**
+ * @internal
+ */
+final class BucketStorage
+{
+ /** @var array<int, BucketEntry|null> */
+ private array $buckets;
+
+ public function __construct(int $size = 0)
+ {
+ $this->buckets = array_fill(0, $size, null);
+ }
+
+ /**
+ * @param int|string $index
+ * @param float|int $value
+ */
+ public function store(int $bucket, $index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ assert($bucket <= count($this->buckets));
+
+ $exemplar = $this->buckets[$bucket] ??= new BucketEntry();
+ $exemplar->index = $index;
+ $exemplar->value = $value;
+ $exemplar->timestamp = $timestamp;
+ $exemplar->attributes = $attributes;
+
+ if (($spanContext = Span::fromContext($context)->getContext())->isValid()) {
+ $exemplar->traceId = $spanContext->getTraceId();
+ $exemplar->spanId = $spanContext->getSpanId();
+ } else {
+ $exemplar->traceId = null;
+ $exemplar->spanId = null;
+ }
+ }
+
+ /**
+ * @param array<AttributesInterface> $dataPointAttributes
+ * @return array<Exemplar>
+ */
+ public function collect(array $dataPointAttributes): array
+ {
+ $exemplars = [];
+ foreach ($this->buckets as $index => &$exemplar) {
+ if (!$exemplar) {
+ continue;
+ }
+
+ $exemplars[$index] = new Exemplar(
+ $exemplar->index,
+ $exemplar->value,
+ $exemplar->timestamp,
+ $this->filterExemplarAttributes(
+ $dataPointAttributes[$exemplar->index],
+ $exemplar->attributes,
+ ),
+ $exemplar->traceId,
+ $exemplar->spanId,
+ );
+ $exemplar = null;
+ }
+
+ return $exemplars;
+ }
+
+ private function filterExemplarAttributes(AttributesInterface $dataPointAttributes, AttributesInterface $exemplarAttributes): AttributesInterface
+ {
+ $attributes = [];
+ foreach ($exemplarAttributes as $key => $value) {
+ if ($dataPointAttributes->get($key) === null) {
+ $attributes[$key] = $value;
+ }
+ }
+
+ return new Attributes($attributes, $exemplarAttributes->getDroppedAttributesCount());
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php
new file mode 100644
index 000000000..b74e738aa
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class AllExemplarFilter implements ExemplarFilterInterface
+{
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php
new file mode 100644
index 000000000..91fdf3b55
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class NoneExemplarFilter implements ExemplarFilterInterface
+{
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool
+ {
+ return false;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php
new file mode 100644
index 000000000..3e800b416
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter;
+
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class WithSampledTraceExemplarFilter implements ExemplarFilterInterface
+{
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool
+ {
+ return Span::fromContext($context)->getContext()->isSampled();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php
new file mode 100644
index 000000000..1d5dec7b8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+interface ExemplarFilterInterface
+{
+ /**
+ * @param float|int $value
+ */
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php
new file mode 100644
index 000000000..70648b919
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+
+interface ExemplarReservoirInterface
+{
+ /**
+ * @param int|string $index
+ * @param float|int $value
+ */
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void;
+
+ /**
+ * @param array<AttributesInterface> $dataPointAttributes
+ * @return array<Exemplar>
+ */
+ public function collect(array $dataPointAttributes): array;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php
new file mode 100644
index 000000000..0e4f24357
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class FilteredReservoir implements ExemplarReservoirInterface
+{
+ private ExemplarReservoirInterface $reservoir;
+ private ExemplarFilterInterface $filter;
+
+ public function __construct(ExemplarReservoirInterface $reservoir, ExemplarFilterInterface $filter)
+ {
+ $this->reservoir = $reservoir;
+ $this->filter = $filter;
+ }
+
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ if ($this->filter->accepts($value, $attributes, $context, $timestamp)) {
+ $this->reservoir->offer($index, $value, $attributes, $context, $timestamp);
+ }
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ return $this->reservoir->collect($dataPointAttributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php
new file mode 100644
index 000000000..479292a4c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use function random_int;
+
+final class FixedSizeReservoir implements ExemplarReservoirInterface
+{
+ private BucketStorage $storage;
+ private int $size;
+ private int $measurements = 0;
+
+ public function __construct(int $size = 4)
+ {
+ $this->storage = new BucketStorage($size);
+ $this->size = $size;
+ }
+
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $bucket = random_int(0, $this->measurements);
+ $this->measurements++;
+ if ($bucket < $this->size) {
+ $this->storage->store($bucket, $index, $value, $attributes, $context, $timestamp);
+ }
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ $this->measurements = 0;
+
+ return $this->storage->collect($dataPointAttributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php
new file mode 100644
index 000000000..b56a1b2be
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use function count;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class HistogramBucketReservoir implements ExemplarReservoirInterface
+{
+ private BucketStorage $storage;
+ /**
+ * @var list<float|int>
+ */
+ private array $boundaries;
+
+ /**
+ * @param list<float|int> $boundaries
+ */
+ public function __construct(array $boundaries)
+ {
+ $this->storage = new BucketStorage(count($boundaries) + 1);
+ $this->boundaries = $boundaries;
+ }
+
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $boundariesCount = count($this->boundaries);
+ for ($i = 0; $i < $boundariesCount && $this->boundaries[$i] < $value; $i++) {
+ }
+ $this->storage->store($i, $index, $value, $attributes, $context, $timestamp);
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ return $this->storage->collect($dataPointAttributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php
new file mode 100644
index 000000000..010aeff20
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class NoopReservoir implements ExemplarReservoirInterface
+{
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ // no-op
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ return [];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Histogram.php b/vendor/open-telemetry/sdk/Metrics/Histogram.php
new file mode 100644
index 000000000..532b1b4bf
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Histogram.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\HistogramInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class Histogram implements HistogramInterface
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, Instrument $instrument, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ public function record($amount, iterable $attributes = [], $context = null): void
+ {
+ $this->writer->record($this->instrument, $amount, $attributes, $context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Instrument.php b/vendor/open-telemetry/sdk/Metrics/Instrument.php
new file mode 100644
index 000000000..3543604c0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Instrument.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+final class Instrument
+{
+ /**
+ * @var string|InstrumentType
+ * @readonly
+ */
+ public $type;
+ /**
+ * @readonly
+ */
+ public string $name;
+ /**
+ * @readonly
+ */
+ public ?string $unit;
+ /**
+ * @readonly
+ */
+ public ?string $description;
+ /**
+ * @param string|InstrumentType $type
+ */
+ public function __construct($type, string $name, ?string $unit, ?string $description)
+ {
+ $this->type = $type;
+ $this->name = $name;
+ $this->unit = $unit;
+ $this->description = $description;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/InstrumentType.php b/vendor/open-telemetry/sdk/Metrics/InstrumentType.php
new file mode 100644
index 000000000..ae603b2fe
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/InstrumentType.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+/**
+ * Instrument type.
+ *
+ * Has to be type-hinted as `string|InstrumentType` to be forward compatible.
+ */
+final class InstrumentType
+{
+ public const COUNTER = 'Counter';
+ public const UP_DOWN_COUNTER = 'UpDownCounter';
+ public const HISTOGRAM = 'Histogram';
+
+ public const ASYNCHRONOUS_COUNTER = 'AsynchronousCounter';
+ public const ASYNCHRONOUS_UP_DOWN_COUNTER = 'AsynchronousUpDownCounter';
+ public const ASYNCHRONOUS_GAUGE = 'AsynchronousGauge';
+
+ private function __construct()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Meter.php b/vendor/open-telemetry/sdk/Metrics/Meter.php
new file mode 100644
index 000000000..902284839
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Meter.php
@@ -0,0 +1,314 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use ArrayAccess;
+use OpenTelemetry\API\Metrics\CounterInterface;
+use OpenTelemetry\API\Metrics\HistogramInterface;
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use function OpenTelemetry\SDK\Common\Util\closure;
+use OpenTelemetry\SDK\Common\Util\WeakMap;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistration\MultiRegistryRegistration;
+use OpenTelemetry\SDK\Metrics\MetricRegistration\RegistryRegistration;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use const PHP_VERSION_ID;
+use function serialize;
+
+/**
+ * @internal
+ */
+final class Meter implements MeterInterface
+{
+ private MetricFactoryInterface $metricFactory;
+ private ResourceInfo $resource;
+ private ClockInterface $clock;
+ private StalenessHandlerFactoryInterface $stalenessHandlerFactory;
+ /** @var iterable<MetricSourceRegistryInterface&DefaultAggregationProviderInterface> */
+ private iterable $metricRegistries;
+ private ViewRegistryInterface $viewRegistry;
+ private ?ExemplarFilterInterface $exemplarFilter;
+ private MeterInstruments $instruments;
+ private InstrumentationScopeInterface $instrumentationScope;
+
+ private MetricRegistryInterface $registry;
+ private MetricWriterInterface $writer;
+
+ private ?string $instrumentationScopeId = null;
+
+ /**
+ * @param iterable<MetricSourceRegistryInterface&DefaultAggregationProviderInterface> $metricRegistries
+ */
+ public function __construct(
+ MetricFactoryInterface $metricFactory,
+ ResourceInfo $resource,
+ ClockInterface $clock,
+ StalenessHandlerFactoryInterface $stalenessHandlerFactory,
+ iterable $metricRegistries,
+ ViewRegistryInterface $viewRegistry,
+ ?ExemplarFilterInterface $exemplarFilter,
+ MeterInstruments $instruments,
+ InstrumentationScopeInterface $instrumentationScope,
+ MetricRegistryInterface $registry,
+ MetricWriterInterface $writer
+ ) {
+ $this->metricFactory = $metricFactory;
+ $this->resource = $resource;
+ $this->clock = $clock;
+ $this->stalenessHandlerFactory = $stalenessHandlerFactory;
+ $this->metricRegistries = $metricRegistries;
+ $this->viewRegistry = $viewRegistry;
+ $this->exemplarFilter = $exemplarFilter;
+ $this->instruments = $instruments;
+ $this->instrumentationScope = $instrumentationScope;
+ $this->registry = $registry;
+ $this->writer = $writer;
+ }
+
+ public function createCounter(string $name, ?string $unit = null, ?string $description = null): CounterInterface
+ {
+ [$instrument, $referenceCounter] = $this->createSynchronousWriter(
+ InstrumentType::COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ return new Counter($this->writer, $instrument, $referenceCounter);
+ }
+
+ public function createObservableCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableCounterInterface
+ {
+ [$instrument, $referenceCounter, $destructors] = $this->createAsynchronousObserver(
+ InstrumentType::ASYNCHRONOUS_COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ foreach ($callbacks as $callback) {
+ $this->writer->registerCallback(closure($callback), $instrument);
+ $referenceCounter->acquire(true);
+ }
+
+ return new ObservableCounter($this->writer, $instrument, $referenceCounter, $destructors);
+ }
+
+ public function createHistogram(string $name, ?string $unit = null, ?string $description = null): HistogramInterface
+ {
+ [$instrument, $referenceCounter] = $this->createSynchronousWriter(
+ InstrumentType::HISTOGRAM,
+ $name,
+ $unit,
+ $description,
+ );
+
+ return new Histogram($this->writer, $instrument, $referenceCounter);
+ }
+
+ public function createObservableGauge(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableGaugeInterface
+ {
+ [$instrument, $referenceCounter, $destructors] = $this->createAsynchronousObserver(
+ InstrumentType::ASYNCHRONOUS_GAUGE,
+ $name,
+ $unit,
+ $description,
+ );
+
+ foreach ($callbacks as $callback) {
+ $this->writer->registerCallback(closure($callback), $instrument);
+ $referenceCounter->acquire(true);
+ }
+
+ return new ObservableGauge($this->writer, $instrument, $referenceCounter, $destructors);
+ }
+
+ public function createUpDownCounter(string $name, ?string $unit = null, ?string $description = null): UpDownCounterInterface
+ {
+ [$instrument, $referenceCounter] = $this->createSynchronousWriter(
+ InstrumentType::UP_DOWN_COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ return new UpDownCounter($this->writer, $instrument, $referenceCounter);
+ }
+
+ public function createObservableUpDownCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableUpDownCounterInterface
+ {
+ [$instrument, $referenceCounter, $destructors] = $this->createAsynchronousObserver(
+ InstrumentType::ASYNCHRONOUS_UP_DOWN_COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ foreach ($callbacks as $callback) {
+ $this->writer->registerCallback(closure($callback), $instrument);
+ $referenceCounter->acquire(true);
+ }
+
+ return new ObservableUpDownCounter($this->writer, $instrument, $referenceCounter, $destructors);
+ }
+
+ /**
+ * @param string|InstrumentType $instrumentType
+ * @return array{Instrument, ReferenceCounterInterface}
+ */
+ private function createSynchronousWriter($instrumentType, string $name, ?string $unit, ?string $description): array
+ {
+ $instrument = new Instrument($instrumentType, $name, $unit, $description);
+
+ $instrumentationScopeId = $this->instrumentationScopeId($this->instrumentationScope);
+ $instrumentId = $this->instrumentId($instrument);
+
+ $instruments = $this->instruments;
+ if ($writer = $instruments->writers[$instrumentationScopeId][$instrumentId] ?? null) {
+ return $writer;
+ }
+
+ $stalenessHandler = $this->stalenessHandlerFactory->create();
+ $instruments->startTimestamp ??= $this->clock->now();
+ $streamIds = $this->metricFactory->createSynchronousWriter(
+ $this->registry,
+ $this->resource,
+ $this->instrumentationScope,
+ $instrument,
+ $instruments->startTimestamp,
+ $this->viewRegistrationRequests($instrument, $stalenessHandler),
+ $this->exemplarFilter,
+ );
+
+ $registry = $this->registry;
+ $stalenessHandler->onStale(static function () use ($instruments, $instrumentationScopeId, $instrumentId, $registry, $streamIds): void {
+ unset($instruments->writers[$instrumentationScopeId][$instrumentId]);
+ if (!$instruments->writers[$instrumentationScopeId]) {
+ unset($instruments->writers[$instrumentationScopeId]);
+ }
+ foreach ($streamIds as $streamId) {
+ $registry->unregisterStream($streamId);
+ }
+
+ $instruments->startTimestamp = null;
+ });
+
+ return $instruments->writers[$instrumentationScopeId][$instrumentId] = [
+ $instrument,
+ $stalenessHandler,
+ ];
+ }
+
+ /**
+ * @param string|InstrumentType $instrumentType
+ * @return array{Instrument, ReferenceCounterInterface, ArrayAccess<object, ObservableCallbackDestructor>}
+ */
+ private function createAsynchronousObserver($instrumentType, string $name, ?string $unit, ?string $description): array
+ {
+ $instrument = new Instrument($instrumentType, $name, $unit, $description);
+
+ $instrumentationScopeId = $this->instrumentationScopeId($this->instrumentationScope);
+ $instrumentId = $this->instrumentId($instrument);
+
+ $instruments = $this->instruments;
+ /** @phan-suppress-next-line PhanDeprecatedProperty */
+ $instruments->staleObservers = [];
+ if ($observer = $instruments->observers[$instrumentationScopeId][$instrumentId] ?? null) {
+ return $observer;
+ }
+
+ $stalenessHandler = $this->stalenessHandlerFactory->create();
+ $instruments->startTimestamp ??= $this->clock->now();
+ $streamIds = $this->metricFactory->createAsynchronousObserver(
+ $this->registry,
+ $this->resource,
+ $this->instrumentationScope,
+ $instrument,
+ $instruments->startTimestamp,
+ $this->viewRegistrationRequests($instrument, $stalenessHandler),
+ );
+
+ $registry = $this->registry;
+ $stalenessHandler->onStale(static function () use ($instruments, $instrumentationScopeId, $instrumentId, $registry, $streamIds): void {
+ if (PHP_VERSION_ID < 80000) {
+ /** @phan-suppress-next-line PhanDeprecatedProperty */
+ $instruments->staleObservers[] = $instruments->observers[$instrumentationScopeId][$instrumentId][2];
+ }
+
+ unset($instruments->observers[$instrumentationScopeId][$instrumentId]);
+ if (!$instruments->observers[$instrumentationScopeId]) {
+ unset($instruments->observers[$instrumentationScopeId]);
+ }
+ foreach ($streamIds as $streamId) {
+ $registry->unregisterStream($streamId);
+ }
+
+ $instruments->startTimestamp = null;
+ });
+
+ /** @var ArrayAccess<object, ObservableCallbackDestructor> $destructors */
+ $destructors = WeakMap::create();
+
+ return $instruments->observers[$instrumentationScopeId][$instrumentId] = [
+ $instrument,
+ $stalenessHandler,
+ $destructors,
+ ];
+ }
+
+ /**
+ * @return iterable<array{ViewProjection, MetricRegistrationInterface}>
+ */
+ private function viewRegistrationRequests(Instrument $instrument, StalenessHandlerInterface $stalenessHandler): iterable
+ {
+ $views = $this->viewRegistry->find($instrument, $this->instrumentationScope) ?? [
+ new ViewProjection(
+ $instrument->name,
+ $instrument->unit,
+ $instrument->description,
+ null,
+ null,
+ ),
+ ];
+
+ $compositeRegistration = new MultiRegistryRegistration($this->metricRegistries, $stalenessHandler);
+ foreach ($views as $view) {
+ if ($view->aggregation !== null) {
+ yield [$view, $compositeRegistration];
+ } else {
+ foreach ($this->metricRegistries as $metricRegistry) {
+ yield [
+ new ViewProjection(
+ $view->name,
+ $view->unit,
+ $view->description,
+ $view->attributeKeys,
+ $metricRegistry->defaultAggregation($instrument->type),
+ ),
+ new RegistryRegistration($metricRegistry, $stalenessHandler),
+ ];
+ }
+ }
+ }
+ }
+
+ private function instrumentationScopeId(InstrumentationScopeInterface $instrumentationScope): string
+ {
+ return $this->instrumentationScopeId ??= serialize($instrumentationScope);
+ }
+
+ private function instrumentId(Instrument $instrument): string
+ {
+ return serialize($instrument);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterInstruments.php b/vendor/open-telemetry/sdk/Metrics/MeterInstruments.php
new file mode 100644
index 000000000..c331cb608
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterInstruments.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use ArrayAccess;
+
+/**
+ * @internal
+ */
+final class MeterInstruments
+{
+ public ?int $startTimestamp = null;
+ /**
+ * @var array<string, array<string, array{Instrument, ReferenceCounterInterface, ArrayAccess<object, ObservableCallbackDestructor>}>>
+ */
+ public array $observers = [];
+ /**
+ * @var array<string, array<string, array{Instrument, ReferenceCounterInterface}>>
+ */
+ public array $writers = [];
+
+ /**
+ * @var list<ArrayAccess<object, ObservableCallbackDestructor>>
+ * @deprecated
+ */
+ public array $staleObservers = [];
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProvider.php b/vendor/open-telemetry/sdk/Metrics/MeterProvider.php
new file mode 100644
index 000000000..36c17cf81
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProvider.php
@@ -0,0 +1,130 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeter;
+use OpenTelemetry\Context\ContextStorageInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactoryInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricFactory\StreamFactory;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistry;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Sdk;
+
+final class MeterProvider implements MeterProviderInterface
+{
+ private MetricFactoryInterface $metricFactory;
+ private ResourceInfo $resource;
+ private ClockInterface $clock;
+ private InstrumentationScopeFactoryInterface $instrumentationScopeFactory;
+ private iterable $metricReaders;
+ private ViewRegistryInterface $viewRegistry;
+ private ?ExemplarFilterInterface $exemplarFilter;
+ private StalenessHandlerFactoryInterface $stalenessHandlerFactory;
+ private MeterInstruments $instruments;
+ private MetricRegistryInterface $registry;
+ private MetricWriterInterface $writer;
+
+ private bool $closed = false;
+
+ /**
+ * @param iterable<MetricReaderInterface&MetricSourceRegistryInterface&DefaultAggregationProviderInterface> $metricReaders
+ */
+ public function __construct(
+ ?ContextStorageInterface $contextStorage,
+ ResourceInfo $resource,
+ ClockInterface $clock,
+ AttributesFactoryInterface $attributesFactory,
+ InstrumentationScopeFactoryInterface $instrumentationScopeFactory,
+ iterable $metricReaders,
+ ViewRegistryInterface $viewRegistry,
+ ?ExemplarFilterInterface $exemplarFilter,
+ StalenessHandlerFactoryInterface $stalenessHandlerFactory,
+ MetricFactoryInterface $metricFactory = null
+ ) {
+ $this->metricFactory = $metricFactory ?? new StreamFactory();
+ $this->resource = $resource;
+ $this->clock = $clock;
+ $this->instrumentationScopeFactory = $instrumentationScopeFactory;
+ $this->metricReaders = $metricReaders;
+ $this->viewRegistry = $viewRegistry;
+ $this->exemplarFilter = $exemplarFilter;
+ $this->stalenessHandlerFactory = $stalenessHandlerFactory;
+ $this->instruments = new MeterInstruments();
+
+ $registry = new MetricRegistry($contextStorage, $attributesFactory, $clock);
+ $this->registry = $registry;
+ $this->writer = $registry;
+ }
+
+ public function getMeter(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): MeterInterface {
+ if ($this->closed || Sdk::isDisabled()) { //@todo create meter provider from factory, and move Sdk::isDisabled() there
+ return new NoopMeter();
+ }
+
+ return new Meter(
+ $this->metricFactory,
+ $this->resource,
+ $this->clock,
+ $this->stalenessHandlerFactory,
+ $this->metricReaders,
+ $this->viewRegistry,
+ $this->exemplarFilter,
+ $this->instruments,
+ $this->instrumentationScopeFactory->create($name, $version, $schemaUrl, $attributes),
+ $this->registry,
+ $this->writer,
+ );
+ }
+
+ public function shutdown(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ $success = true;
+ foreach ($this->metricReaders as $metricReader) {
+ if (!$metricReader->shutdown()) {
+ $success = false;
+ }
+ }
+
+ return $success;
+ }
+
+ public function forceFlush(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $success = true;
+ foreach ($this->metricReaders as $metricReader) {
+ if (!$metricReader->forceFlush()) {
+ $success = false;
+ }
+ }
+
+ return $success;
+ }
+
+ public static function builder(): MeterProviderBuilder
+ {
+ return new MeterProviderBuilder();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php b/vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php
new file mode 100644
index 000000000..17f0be895
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\WithSampledTraceExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandler\NoopStalenessHandlerFactory;
+use OpenTelemetry\SDK\Metrics\View\CriteriaViewRegistry;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+
+class MeterProviderBuilder
+{
+ // @var array<MetricReaderInterface>
+ private array $metricReaders = [];
+ private ?ResourceInfo $resource = null;
+ private ?ExemplarFilterInterface $exemplarFilter = null;
+
+ public function setResource(ResourceInfo $resource): self
+ {
+ $this->resource = $resource;
+
+ return $this;
+ }
+
+ public function setExemplarFilter(ExemplarFilterInterface $exemplarFilter): self
+ {
+ $this->exemplarFilter = $exemplarFilter;
+
+ return $this;
+ }
+
+ public function addReader(MetricReaderInterface $reader): self
+ {
+ $this->metricReaders[] = $reader;
+
+ return $this;
+ }
+
+ /**
+ * @psalm-suppress PossiblyInvalidArgument
+ */
+ public function build(): MeterProviderInterface
+ {
+ return new MeterProvider(
+ null,
+ $this->resource ?? ResourceInfoFactory::emptyResource(),
+ ClockFactory::getDefault(),
+ Attributes::factory(),
+ new InstrumentationScopeFactory(Attributes::factory()),
+ $this->metricReaders,
+ new CriteriaViewRegistry(),
+ $this->exemplarFilter ?? new WithSampledTraceExemplarFilter(),
+ new NoopStalenessHandlerFactory(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php b/vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php
new file mode 100644
index 000000000..5f7f9988d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\AllExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\NoneExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\WithSampledTraceExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporter\NoopMetricExporter;
+use OpenTelemetry\SDK\Metrics\MetricReader\ExportingReader;
+use OpenTelemetry\SDK\Registry;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+use OpenTelemetry\SDK\Sdk;
+
+class MeterProviderFactory
+{
+ use LogsMessagesTrait;
+
+ /**
+ * @todo https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md#general
+ * - "The exporter MUST configure the default aggregation on the basis of instrument kind using the
+ * OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION variable as described below if it is implemented."
+ */
+ public function create(): MeterProviderInterface
+ {
+ if (Sdk::isDisabled()) {
+ return new NoopMeterProvider();
+ }
+ $exporters = Configuration::getList(Variables::OTEL_METRICS_EXPORTER);
+ //TODO "The SDK MAY accept a comma-separated list to enable setting multiple exporters"
+ if (count($exporters) !== 1) {
+ throw new InvalidArgumentException(sprintf('Configuration %s requires exactly 1 exporter', Variables::OTEL_METRICS_EXPORTER));
+ }
+ $exporterName = $exporters[0];
+
+ try {
+ $factory = Registry::metricExporterFactory($exporterName);
+ $exporter = $factory->create();
+ } catch (\Throwable $t) {
+ self::logWarning(sprintf('Unable to create %s meter provider: %s', $exporterName, $t->getMessage()));
+ $exporter = new NoopMetricExporter();
+ }
+
+ // @todo "The exporter MUST be paired with a periodic exporting MetricReader"
+ $reader = new ExportingReader($exporter);
+ $resource = ResourceInfoFactory::defaultResource();
+ $exemplarFilter = $this->createExemplarFilter(Configuration::getEnum(Variables::OTEL_METRICS_EXEMPLAR_FILTER));
+
+ return MeterProvider::builder()
+ ->setResource($resource)
+ ->addReader($reader)
+ ->setExemplarFilter($exemplarFilter)
+ ->build();
+ }
+
+ private function createExemplarFilter(string $name): ExemplarFilterInterface
+ {
+ switch ($name) {
+ case KnownValues::VALUE_WITH_SAMPLED_TRACE:
+ return new WithSampledTraceExemplarFilter();
+ case KnownValues::VALUE_ALL:
+ return new AllExemplarFilter();
+ case KnownValues::VALUE_NONE:
+ return new NoneExemplarFilter();
+ default:
+ self::logWarning('Unknown exemplar filter: ' . $name);
+
+ return new NoneExemplarFilter();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php b/vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php
new file mode 100644
index 000000000..fcb951106
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MeterProviderInterface extends \OpenTelemetry\API\Metrics\MeterProviderInterface
+{
+ public function shutdown(): bool;
+
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php
new file mode 100644
index 000000000..62ea7b535
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php
@@ -0,0 +1,105 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\PushMetricExporterInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * Console metrics exporter.
+ * Note that the output is human-readable JSON, not compatible with OTLP.
+ */
+class ConsoleMetricExporter implements PushMetricExporterInterface, AggregationTemporalitySelectorInterface
+{
+ /**
+ * @var string|Temporality|null
+ */
+ private $temporality;
+
+ /**
+ * @param string|Temporality|null $temporality
+ */
+ public function __construct($temporality = null)
+ {
+ $this->temporality = $temporality;
+ }
+ /**
+ * @inheritDoc
+ */
+ public function temporality(MetricMetadataInterface $metric)
+ {
+ return $this->temporality ?? $metric->temporality();
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function export(iterable $batch): bool
+ {
+ $resource = null;
+ $scope = null;
+ foreach ($batch as $metric) {
+ /** @var Metric $metric */
+ if (!$resource) {
+ $resource = $this->convertResource($metric->resource);
+ }
+ if (!$scope) {
+ $scope = $this->convertInstrumentationScope($metric->instrumentationScope);
+ $scope['metrics'] = [];
+ }
+ $scope['metrics'][] = $this->convertMetric($metric);
+ }
+ $output = [
+ 'resource' => $resource,
+ 'scope' => $scope,
+ ];
+ echo json_encode($output, JSON_PRETTY_PRINT) . PHP_EOL;
+
+ return true;
+ }
+
+ public function shutdown(): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(): bool
+ {
+ return true;
+ }
+
+ private function convertMetric(Metric $metric): array
+ {
+ return [
+ 'name' => $metric->name,
+ 'description' => $metric->description,
+ 'unit' => $metric->unit,
+ 'data' => $metric->data,
+ ];
+ }
+
+ private function convertResource(ResourceInfo $resource): array
+ {
+ return [
+ 'attributes' => $resource->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $resource->getAttributes()->getDroppedAttributesCount(),
+ ];
+ }
+ private function convertInstrumentationScope(InstrumentationScopeInterface $scope): array
+ {
+ return [
+ 'name' => $scope->getName(),
+ 'version' => $scope->getVersion(),
+ 'attributes' => $scope->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $scope->getAttributes()->getDroppedAttributesCount(),
+ 'schema_url' => $scope->getSchemaUrl(),
+ ];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php
new file mode 100644
index 000000000..19088738d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class ConsoleMetricExporterFactory implements MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface
+ {
+ return new ConsoleMetricExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php
new file mode 100644
index 000000000..6bbab8b79
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use function array_push;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/in-memory.md
+ */
+final class InMemoryExporter implements MetricExporterInterface, AggregationTemporalitySelectorInterface
+{
+ /**
+ * @var list<Metric>
+ */
+ private array $metrics = [];
+ /**
+ * @var string|Temporality|null
+ */
+ private $temporality;
+
+ private bool $closed = false;
+
+ /**
+ * @param string|Temporality|null $temporality
+ */
+ public function __construct($temporality = null)
+ {
+ $this->temporality = $temporality;
+ }
+
+ public function temporality(MetricMetadataInterface $metric)
+ {
+ return $this->temporality ?? $metric->temporality();
+ }
+
+ /**
+ * @return list<Metric>
+ */
+ public function collect(bool $reset = false): array
+ {
+ $metrics = $this->metrics;
+ if ($reset) {
+ $this->metrics = [];
+ }
+
+ return $metrics;
+ }
+
+ public function export(iterable $batch): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ /** @psalm-suppress InvalidPropertyAssignmentValue */
+ array_push($this->metrics, ...$batch);
+
+ return true;
+ }
+
+ public function shutdown(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php
new file mode 100644
index 000000000..c72c7b169
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class InMemoryExporterFactory implements MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface
+ {
+ return new InMemoryExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php
new file mode 100644
index 000000000..0cac12fae
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class NoopMetricExporter implements MetricExporterInterface
+{
+ /**
+ * @inheritDoc
+ */
+ public function export(iterable $batch): bool
+ {
+ return true;
+ }
+
+ public function shutdown(): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php
new file mode 100644
index 000000000..ab2ab2af3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class NoopMetricExporterFactory implements MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface
+ {
+ return new NoopMetricExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php
new file mode 100644
index 000000000..fba543d02
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php
@@ -0,0 +1,7 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('memory', \OpenTelemetry\SDK\Metrics\MetricExporter\InMemoryExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('console', \OpenTelemetry\SDK\Metrics\MetricExporter\ConsoleMetricExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('none', \OpenTelemetry\SDK\Metrics\MetricExporter\NoopMetricExporterFactory::class);
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php
new file mode 100644
index 000000000..0d2541821
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php
new file mode 100644
index 000000000..fa47fbf9e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+
+interface MetricExporterInterface
+{
+ /**
+ * @param iterable<int, Metric> $batch
+ */
+ public function export(iterable $batch): bool;
+
+ public function shutdown(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php
new file mode 100644
index 000000000..2c3af4c06
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php
@@ -0,0 +1,187 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricFactory;
+
+use function array_keys;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Aggregation\ExplicitBucketHistogramAggregation;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessor\FilteredAttributeProcessor;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarReservoirInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\FilteredReservoir;
+use OpenTelemetry\SDK\Metrics\Exemplar\FixedSizeReservoir;
+use OpenTelemetry\SDK\Metrics\Exemplar\HistogramBucketReservoir;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\MetricFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistrationInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricCollectorInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\AsynchronousMetricStream;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregator;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorFactory;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+use OpenTelemetry\SDK\Metrics\Stream\SynchronousMetricStream;
+use OpenTelemetry\SDK\Metrics\ViewProjection;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use function serialize;
+use function spl_object_id;
+use Throwable;
+
+/**
+ * @internal
+ */
+final class StreamFactory implements MetricFactoryInterface
+{
+ public function createAsynchronousObserver(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views
+ ): array {
+ $streams = [];
+ $dedup = [];
+ foreach ($views as [$view, $registration]) {
+ if ($view->aggregation === null) {
+ continue;
+ }
+
+ $dedupId = $this->streamId($view->aggregation, $view->attributeKeys);
+ if (($streamId = $dedup[$dedupId] ?? null) === null) {
+ $stream = new AsynchronousMetricStream($view->aggregation, $timestamp);
+ $streamId = $registry->registerAsynchronousStream($instrument, $stream, new MetricAggregatorFactory(
+ $this->attributeProcessor($view->attributeKeys),
+ $view->aggregation,
+ ));
+
+ $streams[$streamId] = $stream;
+ $dedup[$dedupId] = $streamId;
+ }
+
+ $this->registerSource(
+ $view,
+ $instrument,
+ $instrumentationScope,
+ $resource,
+ $streams[$streamId],
+ $registry,
+ $registration,
+ $streamId,
+ );
+ }
+
+ return array_keys($streams);
+ }
+
+ public function createSynchronousWriter(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views,
+ ?ExemplarFilterInterface $exemplarFilter = null
+ ): array {
+ $streams = [];
+ $dedup = [];
+ foreach ($views as [$view, $registration]) {
+ if ($view->aggregation === null) {
+ continue;
+ }
+
+ $dedupId = $this->streamId($view->aggregation, $view->attributeKeys);
+ if (($streamId = $dedup[$dedupId] ?? null) === null) {
+ $stream = new SynchronousMetricStream($view->aggregation, $timestamp);
+ $streamId = $registry->registerSynchronousStream($instrument, $stream, new MetricAggregator(
+ $this->attributeProcessor($view->attributeKeys),
+ $view->aggregation,
+ $this->createExemplarReservoir($view->aggregation, $exemplarFilter),
+ ));
+
+ $streams[$streamId] = $stream;
+ $dedup[$dedupId] = $streamId;
+ }
+
+ $this->registerSource(
+ $view,
+ $instrument,
+ $instrumentationScope,
+ $resource,
+ $streams[$streamId],
+ $registry,
+ $registration,
+ $streamId,
+ );
+ }
+
+ return array_keys($streams);
+ }
+
+ private function attributeProcessor(
+ ?array $attributeKeys
+ ): ?AttributeProcessorInterface {
+ return $attributeKeys !== null
+ ? new FilteredAttributeProcessor($attributeKeys)
+ : null;
+ }
+
+ private function createExemplarReservoir(
+ AggregationInterface $aggregation,
+ ?ExemplarFilterInterface $exemplarFilter
+ ): ?ExemplarReservoirInterface {
+ if (!$exemplarFilter) {
+ return null;
+ }
+
+ if ($aggregation instanceof ExplicitBucketHistogramAggregation && $aggregation->boundaries) {
+ $exemplarReservoir = new HistogramBucketReservoir($aggregation->boundaries);
+ } else {
+ $exemplarReservoir = new FixedSizeReservoir();
+ }
+
+ return new FilteredReservoir($exemplarReservoir, $exemplarFilter);
+ }
+
+ private function registerSource(
+ ViewProjection $view,
+ Instrument $instrument,
+ InstrumentationScopeInterface $instrumentationScope,
+ ResourceInfo $resource,
+ MetricStreamInterface $stream,
+ MetricCollectorInterface $metricCollector,
+ MetricRegistrationInterface $metricRegistration,
+ int $streamId
+ ): void {
+ $provider = new StreamMetricSourceProvider(
+ $view,
+ $instrument,
+ $instrumentationScope,
+ $resource,
+ $stream,
+ $metricCollector,
+ $streamId,
+ );
+
+ $metricRegistration->register($provider, $provider);
+ }
+
+ private function streamId(AggregationInterface $aggregation, ?array $attributeKeys): string
+ {
+ return $this->trySerialize($aggregation) . serialize($attributeKeys);
+ }
+
+ private function trySerialize(object $object)
+ {
+ try {
+ return serialize($object);
+ } catch (Throwable $e) {
+ }
+
+ return spl_object_id($object);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php
new file mode 100644
index 000000000..4939a5341
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricFactory;
+
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+use OpenTelemetry\SDK\Metrics\MetricSourceInterface;
+
+/**
+ * @internal
+ */
+final class StreamMetricSource implements MetricSourceInterface
+{
+ private StreamMetricSourceProvider $provider;
+ private int $reader;
+ public function __construct(StreamMetricSourceProvider $provider, int $reader)
+ {
+ $this->provider = $provider;
+ $this->reader = $reader;
+ }
+
+ public function collectionTimestamp(): int
+ {
+ return $this->provider->stream->timestamp();
+ }
+
+ public function collect(): Metric
+ {
+ return new Metric(
+ $this->provider->instrumentationLibrary,
+ $this->provider->resource,
+ $this->provider->view->name,
+ $this->provider->view->unit,
+ $this->provider->view->description,
+ $this->provider->stream->collect($this->reader),
+ );
+ }
+
+ public function __destruct()
+ {
+ $this->provider->stream->unregister($this->reader);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php
new file mode 100644
index 000000000..657c3ce62
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricFactory;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricCollectorInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+use OpenTelemetry\SDK\Metrics\ViewProjection;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @internal
+ */
+final class StreamMetricSourceProvider implements MetricSourceProviderInterface, MetricMetadataInterface
+{
+ /**
+ * @readonly
+ */
+ public ViewProjection $view;
+ /**
+ * @readonly
+ */
+ public Instrument $instrument;
+ /**
+ * @readonly
+ */
+ public InstrumentationScopeInterface $instrumentationLibrary;
+ /**
+ * @readonly
+ */
+ public ResourceInfo $resource;
+ /**
+ * @readonly
+ */
+ public MetricStreamInterface $stream;
+ /**
+ * @readonly
+ */
+ public MetricCollectorInterface $metricCollector;
+ /**
+ * @readonly
+ */
+ public int $streamId;
+
+ public function __construct(
+ ViewProjection $view,
+ Instrument $instrument,
+ InstrumentationScopeInterface $instrumentationLibrary,
+ ResourceInfo $resource,
+ MetricStreamInterface $stream,
+ MetricCollectorInterface $metricCollector,
+ int $streamId
+ ) {
+ $this->view = $view;
+ $this->instrument = $instrument;
+ $this->instrumentationLibrary = $instrumentationLibrary;
+ $this->resource = $resource;
+ $this->stream = $stream;
+ $this->metricCollector = $metricCollector;
+ $this->streamId = $streamId;
+ }
+
+ public function create($temporality): MetricSourceInterface
+ {
+ return new StreamMetricSource($this, $this->stream->register($temporality));
+ }
+
+ public function instrumentType()
+ {
+ return $this->instrument->type;
+ }
+
+ public function name(): string
+ {
+ return $this->view->name;
+ }
+
+ public function unit(): ?string
+ {
+ return $this->view->unit;
+ }
+
+ public function description(): ?string
+ {
+ return $this->view->description;
+ }
+
+ public function temporality()
+ {
+ return $this->stream->temporality();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php
new file mode 100644
index 000000000..a1e228eef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @internal
+ */
+interface MetricFactoryInterface
+{
+ /**
+ * @param iterable<array{ViewProjection, MetricRegistrationInterface}> $views
+ */
+ public function createAsynchronousObserver(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views
+ ): array;
+
+ /**
+ * @param iterable<array{ViewProjection, MetricRegistrationInterface}> $views
+ */
+ public function createSynchronousWriter(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views,
+ ?ExemplarFilterInterface $exemplarFilter = null
+ ): array;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php
new file mode 100644
index 000000000..aa1a02d60
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+interface MetricMetadataInterface
+{
+ /**
+ * @return string|InstrumentType
+ */
+ public function instrumentType();
+
+ public function name(): string;
+
+ public function unit(): ?string;
+
+ public function description(): ?string;
+
+ /**
+ * Returns the underlying temporality of this metric.
+ *
+ * @return string|Temporality internal temporality
+ */
+ public function temporality();
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php b/vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php
new file mode 100644
index 000000000..3c2eff9f1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php
@@ -0,0 +1,156 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricReader;
+
+use function array_keys;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\DefaultAggregationProviderInterface;
+use OpenTelemetry\SDK\Metrics\DefaultAggregationProviderTrait;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+use OpenTelemetry\SDK\Metrics\MetricFactory\StreamMetricSourceProvider;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricReaderInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricCollectorInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceRegistryInterface;
+use OpenTelemetry\SDK\Metrics\PushMetricExporterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+use function spl_object_id;
+
+final class ExportingReader implements MetricReaderInterface, MetricSourceRegistryInterface, DefaultAggregationProviderInterface
+{
+ use DefaultAggregationProviderTrait { defaultAggregation as private _defaultAggregation; }
+
+ private MetricExporterInterface $exporter;
+ /** @var array<int, MetricSourceInterface> */
+ private array $sources = [];
+
+ /** @var array<int, MetricCollectorInterface> */
+ private array $registries = [];
+ /** @var array<int, array<int, int>> */
+ private array $streamIds = [];
+
+ private bool $closed = false;
+
+ public function __construct(MetricExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+ }
+
+ public function defaultAggregation($instrumentType): ?AggregationInterface
+ {
+ if ($this->exporter instanceof DefaultAggregationProviderInterface) {
+ return $this->exporter->defaultAggregation($instrumentType);
+ }
+
+ return $this->_defaultAggregation($instrumentType);
+ }
+
+ public function add(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata, StalenessHandlerInterface $stalenessHandler): void
+ {
+ if ($this->closed) {
+ return;
+ }
+ if (!$this->exporter instanceof AggregationTemporalitySelectorInterface) {
+ return;
+ }
+ if (!$temporality = $this->exporter->temporality($metadata)) {
+ return;
+ }
+
+ $source = $provider->create($temporality);
+ $sourceId = spl_object_id($source);
+
+ $this->sources[$sourceId] = $source;
+ $stalenessHandler->onStale(function () use ($sourceId): void {
+ unset($this->sources[$sourceId]);
+ });
+
+ if (!$provider instanceof StreamMetricSourceProvider) {
+ return;
+ }
+
+ $streamId = $provider->streamId;
+ $registry = $provider->metricCollector;
+ $registryId = spl_object_id($registry);
+
+ $this->registries[$registryId] = $registry;
+ $this->streamIds[$registryId][$streamId] ??= 0;
+ $this->streamIds[$registryId][$streamId]++;
+
+ $stalenessHandler->onStale(function () use ($streamId, $registryId): void {
+ if (!--$this->streamIds[$registryId][$streamId]) {
+ unset($this->streamIds[$registryId][$streamId]);
+ if (!$this->streamIds[$registryId]) {
+ unset(
+ $this->registries[$registryId],
+ $this->streamIds[$registryId],
+ );
+ }
+ }
+ });
+ }
+
+ private function doCollect(): bool
+ {
+ foreach ($this->registries as $registryId => $registry) {
+ $streamIds = $this->streamIds[$registryId] ?? [];
+ $registry->collectAndPush(array_keys($streamIds));
+ }
+
+ $metrics = [];
+ foreach ($this->sources as $source) {
+ $metrics[] = $source->collect();
+ }
+
+ if ($metrics === []) {
+ return true;
+ }
+
+ return $this->exporter->export($metrics);
+ }
+
+ public function collect(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->doCollect();
+ }
+
+ public function shutdown(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ $collect = $this->doCollect();
+ $shutdown = $this->exporter->shutdown();
+
+ $this->sources = [];
+
+ return $collect && $shutdown;
+ }
+
+ public function forceFlush(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+ if ($this->exporter instanceof PushMetricExporterInterface) {
+ $collect = $this->doCollect();
+ $forceFlush = $this->exporter->forceFlush();
+
+ return $collect && $forceFlush;
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php
new file mode 100644
index 000000000..f5900eef5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MetricReaderInterface
+{
+ public function collect(): bool;
+
+ public function shutdown(): bool;
+
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php
new file mode 100644
index 000000000..2472c096f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistration;
+
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistrationInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceRegistryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class MultiRegistryRegistration implements MetricRegistrationInterface
+{
+ private iterable $registries;
+ private StalenessHandlerInterface $stalenessHandler;
+
+ /**
+ * @param iterable<MetricSourceRegistryInterface> $registries
+ */
+ public function __construct(iterable $registries, StalenessHandlerInterface $stalenessHandler)
+ {
+ $this->registries = $registries;
+ $this->stalenessHandler = $stalenessHandler;
+ }
+
+ public function register(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata): void
+ {
+ foreach ($this->registries as $registry) {
+ $registry->add($provider, $metadata, $this->stalenessHandler);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php
new file mode 100644
index 000000000..3c1108902
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistration;
+
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistrationInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceRegistryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class RegistryRegistration implements MetricRegistrationInterface
+{
+ private MetricSourceRegistryInterface $registry;
+ private StalenessHandlerInterface $stalenessHandler;
+
+ public function __construct(MetricSourceRegistryInterface $registry, StalenessHandlerInterface $stalenessHandler)
+ {
+ $this->registry = $registry;
+ $this->stalenessHandler = $stalenessHandler;
+ }
+
+ public function register(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata): void
+ {
+ $this->registry->add($provider, $metadata, $this->stalenessHandler);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php
new file mode 100644
index 000000000..b0cc2484e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+/**
+ * @internal
+ */
+interface MetricRegistrationInterface
+{
+ public function register(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php
new file mode 100644
index 000000000..4e8e91ced
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+/**
+ * @internal
+ */
+interface MetricCollectorInterface
+{
+ public function collectAndPush(iterable $streamIds): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php
new file mode 100644
index 000000000..9a18d2a84
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php
@@ -0,0 +1,184 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use function array_key_last;
+use Closure;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextStorageInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorFactoryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+use function spl_object_id;
+
+/**
+ * @internal
+ */
+final class MetricRegistry implements MetricRegistryInterface, MetricWriterInterface
+{
+ private ?ContextStorageInterface $contextStorage;
+ private AttributesFactoryInterface $attributesFactory;
+ private ClockInterface $clock;
+
+ /** @var array<int, MetricStreamInterface> */
+ private array $streams = [];
+ /** @var array<int, MetricAggregatorInterface> */
+ private array $synchronousAggregators = [];
+ /** @var array<int, MetricAggregatorFactoryInterface> */
+ private array $asynchronousAggregatorFactories = [];
+
+ /** @var array<int, array<int, int>> */
+ private array $instrumentToStreams = [];
+ /** @var array<int, int> */
+ private array $streamToInstrument = [];
+ /** @var array<int, array<int, int>> */
+ private array $instrumentToCallbacks = [];
+ /** @var array<int, Closure> */
+ private array $asynchronousCallbacks = [];
+ /** @var array<int, list<int>> */
+ private array $asynchronousCallbackArguments = [];
+
+ public function __construct(
+ ?ContextStorageInterface $contextStorage,
+ AttributesFactoryInterface $attributesFactory,
+ ClockInterface $clock
+ ) {
+ $this->contextStorage = $contextStorage;
+ $this->attributesFactory = $attributesFactory;
+ $this->clock = $clock;
+ }
+
+ public function registerSynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorInterface $aggregator): int
+ {
+ $this->streams[] = $stream;
+ $streamId = array_key_last($this->streams);
+ $instrumentId = spl_object_id($instrument);
+
+ $this->synchronousAggregators[$streamId] = $aggregator;
+ $this->instrumentToStreams[$instrumentId][$streamId] = $streamId;
+ $this->streamToInstrument[$streamId] = $instrumentId;
+
+ return $streamId;
+ }
+
+ public function registerAsynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorFactoryInterface $aggregatorFactory): int
+ {
+ $this->streams[] = $stream;
+ $streamId = array_key_last($this->streams);
+ $instrumentId = spl_object_id($instrument);
+
+ $this->asynchronousAggregatorFactories[$streamId] = $aggregatorFactory;
+ $this->instrumentToStreams[$instrumentId][$streamId] = $streamId;
+ $this->streamToInstrument[$streamId] = $instrumentId;
+
+ return $streamId;
+ }
+
+ public function unregisterStream(int $streamId): void
+ {
+ $instrumentId = $this->streamToInstrument[$streamId];
+ unset(
+ $this->streams[$streamId],
+ $this->synchronousAggregators[$streamId],
+ $this->asynchronousAggregatorFactories[$streamId],
+ $this->instrumentToStreams[$instrumentId][$streamId],
+ $this->streamToInstrument[$streamId],
+ );
+ if (!$this->instrumentToStreams[$instrumentId]) {
+ unset($this->instrumentToStreams[$instrumentId]);
+ }
+ }
+
+ public function record(Instrument $instrument, $value, iterable $attributes = [], $context = null): void
+ {
+ $context = Context::resolve($context, $this->contextStorage);
+ $attributes = $this->attributesFactory->builder($attributes)->build();
+ $timestamp = $this->clock->now();
+ $instrumentId = spl_object_id($instrument);
+ foreach ($this->instrumentToStreams[$instrumentId] ?? [] as $streamId) {
+ if ($aggregator = $this->synchronousAggregators[$streamId] ?? null) {
+ $aggregator->record($value, $attributes, $context, $timestamp);
+ }
+ }
+ }
+
+ public function registerCallback(Closure $callback, Instrument $instrument, Instrument ...$instruments): int
+ {
+ $callbackId = array_key_last($this->asynchronousCallbacks) + 1;
+ $this->asynchronousCallbacks[$callbackId] = $callback;
+
+ $instrumentId = spl_object_id($instrument);
+ $this->asynchronousCallbackArguments[$callbackId] = [$instrumentId];
+ $this->instrumentToCallbacks[$instrumentId][$callbackId] = $callbackId;
+ foreach ($instruments as $instrument) {
+ $instrumentId = spl_object_id($instrument);
+ $this->asynchronousCallbackArguments[$callbackId][] = $instrumentId;
+ $this->instrumentToCallbacks[$instrumentId][$callbackId] = $callbackId;
+ }
+
+ return $callbackId;
+ }
+
+ public function unregisterCallback(int $callbackId): void
+ {
+ $instrumentIds = $this->asynchronousCallbackArguments[$callbackId];
+ unset(
+ $this->asynchronousCallbacks[$callbackId],
+ $this->asynchronousCallbackArguments[$callbackId],
+ );
+ foreach ($instrumentIds as $instrumentId) {
+ unset($this->instrumentToCallbacks[$instrumentId][$callbackId]);
+ if (!$this->instrumentToCallbacks[$instrumentId]) {
+ unset($this->instrumentToCallbacks[$instrumentId]);
+ }
+ }
+ }
+
+ public function collectAndPush(iterable $streamIds): void
+ {
+ $timestamp = $this->clock->now();
+ $aggregators = [];
+ $observers = [];
+ $callbackIds = [];
+ foreach ($streamIds as $streamId) {
+ if (!$aggregator = $this->synchronousAggregators[$streamId] ?? null) {
+ $aggregator = $this->asynchronousAggregatorFactories[$streamId]->create();
+
+ $instrumentId = $this->streamToInstrument[$streamId];
+ $observers[$instrumentId] ??= new MultiObserver($this->attributesFactory, $timestamp);
+ $observers[$instrumentId]->writers[] = $aggregator;
+ foreach ($this->instrumentToCallbacks[$instrumentId] ?? [] as $callbackId) {
+ $callbackIds[$callbackId] = $callbackId;
+ }
+ }
+
+ $aggregators[$streamId] = $aggregator;
+ }
+
+ $noopObserver = new NoopObserver();
+ $callbacks = [];
+ foreach ($callbackIds as $callbackId) {
+ $args = [];
+ foreach ($this->asynchronousCallbackArguments[$callbackId] as $instrumentId) {
+ $args[] = $observers[$instrumentId] ?? $noopObserver;
+ }
+ $callback = $this->asynchronousCallbacks[$callbackId];
+ $callbacks[] = static fn () => $callback(...$args);
+ }
+ foreach ($callbacks as $callback) {
+ $callback();
+ }
+
+ $timestamp = $this->clock->now();
+ foreach ($aggregators as $streamId => $aggregator) {
+ if ($stream = $this->streams[$streamId] ?? null) {
+ $stream->push($aggregator->collect($timestamp));
+ }
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php
new file mode 100644
index 000000000..e86731138
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorFactoryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+
+/**
+ * @internal
+ */
+interface MetricRegistryInterface extends MetricCollectorInterface
+{
+ public function registerSynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorInterface $aggregator): int;
+
+ public function registerAsynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorFactoryInterface $aggregatorFactory): int;
+
+ public function unregisterStream(int $streamId): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php
new file mode 100644
index 000000000..e5ff7eb5c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use Closure;
+use OpenTelemetry\SDK\Metrics\Instrument;
+
+/**
+ * @internal
+ */
+interface MetricWriterInterface
+{
+ public function record(Instrument $instrument, $value, iterable $attributes = [], $context = null): void;
+
+ public function registerCallback(Closure $callback, Instrument $instrument, Instrument ...$instruments): int;
+
+ public function unregisterCallback(int $callbackId): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php
new file mode 100644
index 000000000..f36f74a2a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\WritableMetricStreamInterface;
+
+/**
+ * @internal
+ */
+final class MultiObserver implements ObserverInterface
+{
+ private AttributesFactoryInterface $attributesFactory;
+ private int $timestamp;
+
+ /** @var list<WritableMetricStreamInterface> */
+ public array $writers = [];
+
+ public function __construct(AttributesFactoryInterface $attributesFactory, int $timestamp)
+ {
+ $this->attributesFactory = $attributesFactory;
+ $this->timestamp = $timestamp;
+ }
+
+ public function observe($amount, iterable $attributes = []): void
+ {
+ $context = Context::getRoot();
+ $attributes = $this->attributesFactory->builder($attributes)->build();
+ foreach ($this->writers as $writer) {
+ $writer->record($amount, $attributes, $context, $this->timestamp);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php
new file mode 100644
index 000000000..efbd94dac
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use OpenTelemetry\API\Metrics\ObserverInterface;
+
+/**
+ * @internal
+ */
+final class NoopObserver implements ObserverInterface
+{
+ public function observe($amount, iterable $attributes = []): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php
new file mode 100644
index 000000000..5f00a0717
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+
+interface MetricSourceInterface
+{
+ /**
+ * Returns the last metric collection timestamp.
+ *
+ * @return int last collection timestamp
+ */
+ public function collectionTimestamp(): int;
+
+ /**
+ * Collects metric data from the underlying provider.
+ *
+ * @return Metric collected metric
+ */
+ public function collect(): Metric;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php
new file mode 100644
index 000000000..f8b6ea438
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+interface MetricSourceProviderInterface
+{
+ /**
+ * @param string|Temporality $temporality
+ */
+ public function create($temporality): MetricSourceInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php
new file mode 100644
index 000000000..dd7ff53ac
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MetricSourceRegistryInterface
+{
+ public function add(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata, StalenessHandlerInterface $stalenessHandler): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php b/vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php
new file mode 100644
index 000000000..2efb484d3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeter;
+
+class NoopMeterProvider implements MeterProviderInterface
+{
+ public function shutdown(): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(): bool
+ {
+ return true;
+ }
+
+ public function getMeter(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): MeterInterface
+ {
+ return new NoopMeter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableCallback.php b/vendor/open-telemetry/sdk/Metrics/ObservableCallback.php
new file mode 100644
index 000000000..ffe5ead87
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableCallback.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableCallback implements ObservableCallbackInterface
+{
+ private MetricWriterInterface $writer;
+ private ReferenceCounterInterface $referenceCounter;
+ private ?int $callbackId;
+ private ?ObservableCallbackDestructor $callbackDestructor;
+ /** @phpstan-ignore-next-line */
+ private ?object $target;
+
+ public function __construct(MetricWriterInterface $writer, ReferenceCounterInterface $referenceCounter, int $callbackId, ?ObservableCallbackDestructor $callbackDestructor, ?object $target)
+ {
+ $this->writer = $writer;
+ $this->referenceCounter = $referenceCounter;
+ $this->callbackId = $callbackId;
+ $this->callbackDestructor = $callbackDestructor;
+ $this->target = $target;
+ }
+
+ public function detach(): void
+ {
+ if ($this->callbackId === null) {
+ return;
+ }
+
+ $this->writer->unregisterCallback($this->callbackId);
+ $this->referenceCounter->release();
+ if ($this->callbackDestructor !== null) {
+ unset($this->callbackDestructor->callbackIds[$this->callbackId]);
+ }
+
+ $this->callbackId = null;
+ }
+
+ public function __destruct()
+ {
+ if ($this->callbackDestructor !== null) {
+ return;
+ }
+ if ($this->callbackId === null) {
+ return;
+ }
+
+ $this->referenceCounter->acquire(true);
+ $this->referenceCounter->release();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php b/vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php
new file mode 100644
index 000000000..0dfea3907
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableCallbackDestructor
+{
+ /** @var array<int, int> */
+ public array $callbackIds = [];
+ private MetricWriterInterface $writer;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->referenceCounter = $referenceCounter;
+ }
+
+ public function __destruct()
+ {
+ foreach ($this->callbackIds as $callbackId) {
+ $this->writer->unregisterCallback($callbackId);
+ $this->referenceCounter->release();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableCounter.php b/vendor/open-telemetry/sdk/Metrics/ObservableCounter.php
new file mode 100644
index 000000000..99ae43eee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableCounter.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableCounter implements ObservableCounterInterface
+{
+ use ObservableInstrumentTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableGauge.php b/vendor/open-telemetry/sdk/Metrics/ObservableGauge.php
new file mode 100644
index 000000000..88c1a546c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableGauge.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+
+/**
+ * @internal
+ */
+final class ObservableGauge implements ObservableGaugeInterface
+{
+ use ObservableInstrumentTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php b/vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php
new file mode 100644
index 000000000..b7fdcf5f8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php
@@ -0,0 +1,61 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use ArrayAccess;
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use function OpenTelemetry\SDK\Common\Util\closure;
+use function OpenTelemetry\SDK\Common\Util\weaken;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+trait ObservableInstrumentTrait
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+ private ArrayAccess $destructors;
+
+ public function __construct(
+ MetricWriterInterface $writer,
+ Instrument $instrument,
+ ReferenceCounterInterface $referenceCounter,
+ ArrayAccess $destructors
+ ) {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+ $this->destructors = $destructors;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ /**
+ * @param callable(ObserverInterface): void $callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface
+ {
+ $callback = weaken(closure($callback), $target);
+
+ $callbackId = $this->writer->registerCallback($callback, $this->instrument);
+ $this->referenceCounter->acquire();
+
+ $destructor = null;
+ if ($target) {
+ $destructor = $this->destructors[$target] ??= new ObservableCallbackDestructor($this->writer, $this->referenceCounter);
+ $destructor->callbackIds[$callbackId] = $callbackId;
+ }
+
+ return new ObservableCallback($this->writer, $this->referenceCounter, $callbackId, $destructor, $target);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php b/vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php
new file mode 100644
index 000000000..8d21be734
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableUpDownCounter implements ObservableUpDownCounterInterface
+{
+ use ObservableInstrumentTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php b/vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php
new file mode 100644
index 000000000..d24b0e396
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics;
+
+interface PushMetricExporterInterface extends Metrics\MetricExporterInterface
+{
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php b/vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php
new file mode 100644
index 000000000..f7e70b644
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+/**
+ * @internal
+ */
+interface ReferenceCounterInterface
+{
+ public function acquire(bool $persistent = false): void;
+
+ public function release(): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php
new file mode 100644
index 000000000..66b271018
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use function assert;
+use Closure;
+use OpenTelemetry\SDK\Metrics\ReferenceCounterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class DelayedStalenessHandler implements StalenessHandlerInterface, ReferenceCounterInterface
+{
+ private Closure $stale;
+ private Closure $freshen;
+
+ /** @var Closure[]|null */
+ private ?array $onStale = [];
+ private int $count = 0;
+
+ public function __construct(Closure $stale, Closure $freshen)
+ {
+ $this->stale = $stale;
+ $this->freshen = $freshen;
+ }
+
+ public function acquire(bool $persistent = false): void
+ {
+ if ($this->count === 0) {
+ ($this->freshen)($this);
+ }
+
+ $this->count++;
+
+ if ($persistent) {
+ $this->onStale = null;
+ }
+ }
+
+ public function release(): void
+ {
+ if (--$this->count || $this->onStale === null) {
+ return;
+ }
+
+ ($this->stale)($this);
+ }
+
+ public function onStale(Closure $callback): void
+ {
+ if ($this->onStale === null) {
+ return;
+ }
+
+ $this->onStale[] = $callback;
+ }
+
+ public function triggerStale(): void
+ {
+ assert($this->onStale !== null);
+
+ $callbacks = $this->onStale;
+ $this->onStale = [];
+ foreach ($callbacks as $callback) {
+ $callback();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php
new file mode 100644
index 000000000..0d719c74f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php
@@ -0,0 +1,64 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use ArrayAccess;
+use Closure;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Common\Util\WeakMap;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerFactoryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+use Traversable;
+
+final class DelayedStalenessHandlerFactory implements StalenessHandlerFactoryInterface
+{
+ private ClockInterface $clock;
+ private int $nanoDelay;
+
+ private Closure $stale;
+ private Closure $freshen;
+
+ /** @var ArrayAccess<DelayedStalenessHandler, int>&Traversable<DelayedStalenessHandler, int> */
+ private $staleHandlers;
+
+ /**
+ * @param float $delay delay in seconds
+ */
+ public function __construct(ClockInterface $clock, float $delay)
+ {
+ $this->clock = $clock;
+ $this->nanoDelay = (int) ($delay * 1e9);
+
+ $this->stale = function (DelayedStalenessHandler $handler): void {
+ $this->staleHandlers[$handler] = $this->clock->now();
+ };
+ $this->freshen = function (DelayedStalenessHandler $handler): void {
+ unset($this->staleHandlers[$handler]);
+ };
+
+ $this->staleHandlers = WeakMap::create();
+ }
+
+ public function create(): StalenessHandlerInterface
+ {
+ $this->triggerStaleHandlers();
+
+ return new DelayedStalenessHandler($this->stale, $this->freshen);
+ }
+
+ private function triggerStaleHandlers(): void
+ {
+ $expired = $this->clock->now() - $this->nanoDelay;
+ foreach ($this->staleHandlers as $handler => $timestamp) {
+ if ($timestamp > $expired) {
+ break;
+ }
+
+ /** @var DelayedStalenessHandler $handler */
+ unset($this->staleHandlers[$handler]);
+ $handler->triggerStale();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php
new file mode 100644
index 000000000..a5b32d5c4
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use Closure;
+use OpenTelemetry\SDK\Metrics\ReferenceCounterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class ImmediateStalenessHandler implements StalenessHandlerInterface, ReferenceCounterInterface
+{
+ /** @var Closure[]|null */
+ private ?array $onStale = [];
+ private int $count = 0;
+
+ public function acquire(bool $persistent = false): void
+ {
+ $this->count++;
+
+ if ($persistent) {
+ $this->onStale = null;
+ }
+ }
+
+ public function release(): void
+ {
+ if (--$this->count !== 0 || !$this->onStale) {
+ return;
+ }
+
+ $callbacks = $this->onStale;
+ $this->onStale = [];
+ foreach ($callbacks as $callback) {
+ $callback();
+ }
+ }
+
+ public function onStale(Closure $callback): void
+ {
+ if ($this->onStale === null) {
+ return;
+ }
+
+ $this->onStale[] = $callback;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php
new file mode 100644
index 000000000..899615dea
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use OpenTelemetry\SDK\Metrics\StalenessHandlerFactoryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+final class ImmediateStalenessHandlerFactory implements StalenessHandlerFactoryInterface
+{
+ public function create(): StalenessHandlerInterface
+ {
+ return new ImmediateStalenessHandler();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php
new file mode 100644
index 000000000..00d432b6b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use Closure;
+use OpenTelemetry\SDK\Metrics\ReferenceCounterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class NoopStalenessHandler implements StalenessHandlerInterface, ReferenceCounterInterface
+{
+ public function acquire(bool $persistent = false): void
+ {
+ // no-op
+ }
+
+ public function release(): void
+ {
+ // no-op
+ }
+
+ public function onStale(Closure $callback): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php
new file mode 100644
index 000000000..07f34e3b0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use OpenTelemetry\SDK\Metrics\StalenessHandlerFactoryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+final class NoopStalenessHandlerFactory implements StalenessHandlerFactoryInterface
+{
+ public function create(): StalenessHandlerInterface
+ {
+ static $instance;
+
+ return $instance ??= new NoopStalenessHandler();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php
new file mode 100644
index 000000000..e22385420
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface StalenessHandlerFactoryInterface
+{
+ /**
+ * @return StalenessHandlerInterface&ReferenceCounterInterface
+ */
+ public function create(): StalenessHandlerInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php
new file mode 100644
index 000000000..c85d86f8e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use Closure;
+
+interface StalenessHandlerInterface
+{
+ public function onStale(Closure $callback): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php b/vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php
new file mode 100644
index 000000000..cb32f94df
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use function array_search;
+use function count;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+/**
+ * @internal
+ */
+final class AsynchronousMetricStream implements MetricStreamInterface
+{
+ private AggregationInterface $aggregation;
+
+ private int $startTimestamp;
+ private Metric $metric;
+
+ /** @var array<int, Metric|null> */
+ private array $lastReads = [];
+
+ public function __construct(AggregationInterface $aggregation, int $startTimestamp)
+ {
+ $this->aggregation = $aggregation;
+ $this->startTimestamp = $startTimestamp;
+ $this->metric = new Metric([], [], $startTimestamp);
+ }
+
+ public function temporality()
+ {
+ return Temporality::CUMULATIVE;
+ }
+
+ public function timestamp(): int
+ {
+ return $this->metric->timestamp;
+ }
+
+ public function push(Metric $metric): void
+ {
+ $this->metric = $metric;
+ }
+
+ public function register($temporality): int
+ {
+ if ($temporality === Temporality::CUMULATIVE) {
+ return -1;
+ }
+
+ if (($reader = array_search(null, $this->lastReads, true)) === false) {
+ $reader = count($this->lastReads);
+ }
+
+ $this->lastReads[$reader] = $this->metric;
+
+ return $reader;
+ }
+
+ public function unregister(int $reader): void
+ {
+ if (!isset($this->lastReads[$reader])) {
+ return;
+ }
+
+ $this->lastReads[$reader] = null;
+ }
+
+ public function collect(int $reader): DataInterface
+ {
+ $metric = $this->metric;
+
+ if (($lastRead = $this->lastReads[$reader] ?? null) === null) {
+ $temporality = Temporality::CUMULATIVE;
+ $startTimestamp = $this->startTimestamp;
+ } else {
+ $temporality = Temporality::DELTA;
+ $startTimestamp = $lastRead->timestamp;
+
+ $this->lastReads[$reader] = $metric;
+ $metric = $this->diff($lastRead, $metric);
+ }
+
+ return $this->aggregation->toData(
+ $metric->attributes,
+ $metric->summaries,
+ Exemplar::groupByIndex($metric->exemplars),
+ $startTimestamp,
+ $metric->timestamp,
+ $temporality,
+ );
+ }
+
+ private function diff(Metric $lastRead, Metric $metric): Metric
+ {
+ $diff = clone $metric;
+ foreach ($metric->summaries as $k => $summary) {
+ if (!isset($lastRead->summaries[$k])) {
+ continue;
+ }
+
+ $diff->summaries[$k] = $this->aggregation->diff($lastRead->summaries[$k], $summary);
+ }
+
+ return $diff;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/Delta.php b/vendor/open-telemetry/sdk/Metrics/Stream/Delta.php
new file mode 100644
index 000000000..a4ff56d71
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/Delta.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use GMP;
+
+/**
+ * @internal
+ */
+final class Delta
+{
+ public Metric $metric;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeProperty
+ * @var int|GMP
+ */
+ public $readers;
+ public ?self $prev;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeParameter
+ * @param int|GMP $readers
+ */
+ public function __construct(Metric $metric, $readers, ?self $prev = null)
+ {
+ $this->metric = $metric;
+ $this->readers = $readers;
+ $this->prev = $prev;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php b/vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php
new file mode 100644
index 000000000..b46a28d65
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php
@@ -0,0 +1,110 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use function assert;
+use GMP;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+
+/**
+ * @internal
+ */
+final class DeltaStorage
+{
+ private AggregationInterface $aggregation;
+ private Delta $head;
+
+ public function __construct(AggregationInterface $aggregation)
+ {
+ $this->aggregation = $aggregation;
+ $this->head = new Delta(new Metric([], [], 0), 0);
+
+ /** @phan-suppress-next-line PhanTypeObjectUnsetDeclaredProperty */
+ unset($this->head->metric);
+ }
+
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeParameter
+ * @param int|GMP $readers
+ */
+ public function add(Metric $metric, $readers): void
+ {
+ /** @phpstan-ignore-next-line */
+ if ($readers == 0) {
+ return;
+ }
+
+ if (($this->head->prev->readers ?? null) != $readers) {
+ $this->head->prev = new Delta($metric, $readers, $this->head->prev);
+ } else {
+ assert($this->head->prev !== null);
+ $this->mergeInto($this->head->prev->metric, $metric);
+ }
+ }
+
+ public function collect(int $reader, bool $retain = false): ?Metric
+ {
+ $n = null;
+ for ($d = $this->head; $d->prev; $d = $d->prev) {
+ if (($d->prev->readers >> $reader & 1) != 0) {
+ if ($n !== null) {
+ assert($n->prev !== null);
+ $n->prev->readers ^= $d->prev->readers;
+ $this->mergeInto($d->prev->metric, $n->prev->metric);
+ $this->tryUnlink($n);
+
+ if ($n->prev === $d->prev) {
+ continue;
+ }
+ }
+
+ $n = $d;
+ }
+ }
+
+ $metric = $n->prev->metric ?? null;
+
+ if (!$retain && $n) {
+ assert($n->prev !== null);
+ $n->prev->readers ^= ($n->prev->readers & 1 | 1) << $reader;
+ $this->tryUnlink($n);
+ }
+
+ return $metric;
+ }
+
+ private function tryUnlink(Delta $n): void
+ {
+ assert($n->prev !== null);
+ /** @phpstan-ignore-next-line */
+ if ($n->prev->readers == 0) {
+ $n->prev = $n->prev->prev;
+
+ return;
+ }
+
+ for ($c = $n->prev->prev;
+ $c && ($n->prev->readers & $c->readers) == 0;
+ $c = $c->prev) {
+ }
+
+ if ($c && $n->prev->readers === $c->readers) {
+ $this->mergeInto($c->metric, $n->prev->metric);
+ $n->prev = $n->prev->prev;
+ }
+ }
+
+ private function mergeInto(Metric $into, Metric $metric): void
+ {
+ foreach ($metric->summaries as $k => $summary) {
+ $into->attributes[$k] ??= $metric->attributes[$k];
+ $into->summaries[$k] = isset($into->summaries[$k])
+ ? $this->aggregation->merge($into->summaries[$k], $summary)
+ : $summary;
+ }
+ $into->exemplars += $metric->exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/Metric.php b/vendor/open-telemetry/sdk/Metrics/Stream/Metric.php
new file mode 100644
index 000000000..6b1db9eef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/Metric.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+
+/**
+ * @internal
+ *
+ * @template T
+ */
+final class Metric
+{
+
+ /**
+ * @var array<AttributesInterface>
+ */
+ public array $attributes;
+ /**
+ * @var array<T>
+ */
+ public array $summaries;
+ public int $timestamp;
+ /**
+ * @var array<Exemplar>
+ */
+ public array $exemplars;
+
+ /**
+ * @param array<AttributesInterface> $attributes
+ * @param array<T> $summaries
+ * @param array<Exemplar> $exemplars
+ */
+ public function __construct(array $attributes, array $summaries, int $timestamp, array $exemplars = [])
+ {
+ $this->attributes = $attributes;
+ $this->summaries = $summaries;
+ $this->timestamp = $timestamp;
+ $this->exemplars = $exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php
new file mode 100644
index 000000000..b1328eb07
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php
@@ -0,0 +1,73 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarReservoirInterface;
+use function serialize;
+
+/**
+ * @internal
+ */
+final class MetricAggregator implements MetricAggregatorInterface
+{
+ private ?AttributeProcessorInterface $attributeProcessor;
+ private AggregationInterface $aggregation;
+ private ?ExemplarReservoirInterface $exemplarReservoir;
+
+ /** @var array<AttributesInterface> */
+ private array $attributes = [];
+ private array $summaries = [];
+
+ public function __construct(
+ ?AttributeProcessorInterface $attributeProcessor,
+ AggregationInterface $aggregation,
+ ?ExemplarReservoirInterface $exemplarReservoir = null
+ ) {
+ $this->attributeProcessor = $attributeProcessor;
+ $this->aggregation = $aggregation;
+ $this->exemplarReservoir = $exemplarReservoir;
+ }
+
+ /**
+ * @param float|int $value
+ */
+ public function record($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $filteredAttributes = $this->attributeProcessor !== null
+ ? $this->attributeProcessor->process($attributes, $context)
+ : $attributes;
+ $raw = $filteredAttributes->toArray();
+ $index = $raw !== [] ? serialize($raw) : 0;
+ $this->attributes[$index] ??= $filteredAttributes;
+ $this->aggregation->record(
+ $this->summaries[$index] ??= $this->aggregation->initialize(),
+ $value,
+ $attributes,
+ $context,
+ $timestamp,
+ );
+
+ if ($this->exemplarReservoir !== null) {
+ $this->exemplarReservoir->offer($index, $value, $attributes, $context, $timestamp);
+ }
+ }
+
+ public function collect(int $timestamp): Metric
+ {
+ $exemplars = $this->exemplarReservoir
+ ? $this->exemplarReservoir->collect($this->attributes)
+ : [];
+ $metric = new Metric($this->attributes, $this->summaries, $timestamp, $exemplars);
+
+ $this->attributes = [];
+ $this->summaries = [];
+
+ return $metric;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php
new file mode 100644
index 000000000..5866a72b7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+
+/**
+ * @internal
+ */
+final class MetricAggregatorFactory implements MetricAggregatorFactoryInterface
+{
+ private ?AttributeProcessorInterface $attributeProcessor;
+ private AggregationInterface $aggregation;
+
+ public function __construct(?AttributeProcessorInterface $attributeProcessor, AggregationInterface $aggregation)
+ {
+ $this->attributeProcessor = $attributeProcessor;
+ $this->aggregation = $aggregation;
+ }
+
+ public function create(): MetricAggregatorInterface
+ {
+ return new MetricAggregator($this->attributeProcessor, $this->aggregation);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php
new file mode 100644
index 000000000..356f682f2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+/**
+ * @internal
+ */
+interface MetricAggregatorFactoryInterface
+{
+ public function create(): MetricAggregatorInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php
new file mode 100644
index 000000000..2f5cfbf15
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+/**
+ * @internal
+ */
+interface MetricAggregatorInterface extends WritableMetricStreamInterface, MetricCollectorInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php
new file mode 100644
index 000000000..51a728df7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+/**
+ * @internal
+ */
+interface MetricCollectorInterface
+{
+ public function collect(int $timestamp): Metric;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php
new file mode 100644
index 000000000..1373a1c93
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+/**
+ * @internal
+ */
+interface MetricStreamInterface
+{
+ /**
+ * Returns the internal temporality of this stream.
+ *
+ * @return string|Temporality internal temporality
+ */
+ public function temporality();
+
+ /**
+ * Returns the last metric timestamp.
+ *
+ * @return int metric timestamp
+ */
+ public function timestamp(): int;
+
+ /**
+ * Pushes metric data to the stream.
+ *
+ * @param Metric $metric metric data to push
+ */
+ public function push(Metric $metric): void;
+
+ /**
+ * Registers a new reader with the given temporality.
+ *
+ * @param string|Temporality $temporality temporality to use
+ * @return int reader id
+ */
+ public function register($temporality): int;
+
+ /**
+ * Unregisters the given reader.
+ *
+ * @param int $reader reader id
+ */
+ public function unregister(int $reader): void;
+
+ /**
+ * Collects metric data for the given reader.
+ *
+ * @param int $reader reader id
+ * @return DataInterface metric data
+ */
+ public function collect(int $reader): DataInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php b/vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php
new file mode 100644
index 000000000..52645504c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php
@@ -0,0 +1,126 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use function assert;
+use const E_USER_WARNING;
+use function extension_loaded;
+use GMP;
+use function gmp_init;
+use function is_int;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use const PHP_INT_SIZE;
+use function sprintf;
+use function trigger_error;
+
+/**
+ * @internal
+ */
+final class SynchronousMetricStream implements MetricStreamInterface
+{
+ private AggregationInterface $aggregation;
+
+ private int $timestamp;
+
+ private DeltaStorage $delta;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeProperty
+ * @var int|GMP
+ */
+ private $readers = 0;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeProperty
+ * @var int|GMP
+ */
+ private $cumulative = 0;
+
+ public function __construct(AggregationInterface $aggregation, int $startTimestamp)
+ {
+ $this->aggregation = $aggregation;
+ $this->timestamp = $startTimestamp;
+ $this->delta = new DeltaStorage($aggregation);
+ }
+
+ public function temporality()
+ {
+ return Temporality::DELTA;
+ }
+
+ public function timestamp(): int
+ {
+ return $this->timestamp;
+ }
+
+ public function push(Metric $metric): void
+ {
+ [$this->timestamp, $metric->timestamp] = [$metric->timestamp, $this->timestamp];
+ $this->delta->add($metric, $this->readers);
+ }
+
+ public function register($temporality): int
+ {
+ $reader = 0;
+ for ($r = $this->readers; ($r & 1) != 0; $r >>= 1, $reader++) {
+ }
+
+ if ($reader === (PHP_INT_SIZE << 3) - 1 && is_int($this->readers)) {
+ if (!extension_loaded('gmp')) {
+ trigger_error(sprintf('GMP extension required to register over %d readers', (PHP_INT_SIZE << 3) - 1), E_USER_WARNING);
+ $reader = PHP_INT_SIZE << 3;
+ } else {
+ assert(is_int($this->cumulative));
+ $this->readers = gmp_init($this->readers);
+ $this->cumulative = gmp_init($this->cumulative);
+ }
+ }
+
+ $readerMask = ($this->readers & 1 | 1) << $reader;
+ $this->readers ^= $readerMask;
+ if ($temporality === Temporality::CUMULATIVE) {
+ $this->cumulative ^= $readerMask;
+ }
+
+ return $reader;
+ }
+
+ public function unregister(int $reader): void
+ {
+ $readerMask = ($this->readers & 1 | 1) << $reader;
+ if (($this->readers & $readerMask) == 0) {
+ return;
+ }
+
+ $this->delta->collect($reader);
+
+ $this->readers ^= $readerMask;
+ if (($this->cumulative & $readerMask) != 0) {
+ $this->cumulative ^= $readerMask;
+ }
+ }
+
+ public function collect(int $reader): DataInterface
+ {
+ $cumulative = ($this->cumulative >> $reader & 1) != 0;
+ $metric = $this->delta->collect($reader, $cumulative) ?? new Metric([], [], $this->timestamp);
+
+ $temporality = $cumulative
+ ? Temporality::CUMULATIVE
+ : Temporality::DELTA;
+
+ return $this->aggregation->toData(
+ $metric->attributes,
+ $metric->summaries,
+ Exemplar::groupByIndex($metric->exemplars),
+ $metric->timestamp,
+ $this->timestamp,
+ $temporality,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php
new file mode 100644
index 000000000..9fd425a44
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * @internal
+ */
+interface WritableMetricStreamInterface
+{
+ /**
+ * @param float|int $value
+ */
+ public function record($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php b/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php
new file mode 100644
index 000000000..1adf67f8a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class UpDownCounter implements UpDownCounterInterface
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, Instrument $instrument, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ $this->writer->record($this->instrument, $amount, $attributes, $context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php b/vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php
new file mode 100644
index 000000000..f387abf9c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View;
+
+use Generator;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\ViewRegistryInterface;
+
+final class CriteriaViewRegistry implements ViewRegistryInterface
+{
+ /** @var list<SelectionCriteriaInterface> */
+ private array $criteria = [];
+ /** @var list<ViewTemplate> */
+ private array $views = [];
+
+ public function register(SelectionCriteriaInterface $criteria, ViewTemplate $view): void
+ {
+ $this->criteria[] = $criteria;
+ $this->views[] = $view;
+ }
+
+ public function find(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): ?iterable
+ {
+ $views = $this->generateViews($instrument, $instrumentationScope);
+
+ return $views->valid() ? $views : null;
+ }
+
+ private function generateViews(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): Generator
+ {
+ foreach ($this->criteria as $i => $criteria) {
+ if ($criteria->accepts($instrument, $instrumentationScope)) {
+ yield $this->views[$i]->project($instrument);
+ }
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php
new file mode 100644
index 000000000..438297324
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class AllCriteria implements SelectionCriteriaInterface
+{
+ private iterable $criteria;
+
+ /**
+ * @param iterable<SelectionCriteriaInterface> $criteria
+ */
+ public function __construct(iterable $criteria)
+ {
+ $this->criteria = $criteria;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ foreach ($this->criteria as $criterion) {
+ if (!$criterion->accepts($instrument, $instrumentationScope)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php
new file mode 100644
index 000000000..ed6034755
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+use function preg_match;
+use function preg_quote;
+use function sprintf;
+use function strtr;
+
+final class InstrumentNameCriteria implements SelectionCriteriaInterface
+{
+ private string $pattern;
+
+ public function __construct(string $name)
+ {
+ $this->pattern = sprintf('/^%s$/', strtr(preg_quote($name, '/'), ['\\?' => '.', '\\*' => '.*']));
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return (bool) preg_match($this->pattern, $instrument->name);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php
new file mode 100644
index 000000000..46a88def0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use function in_array;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\InstrumentType;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentTypeCriteria implements SelectionCriteriaInterface
+{
+ private array $instrumentTypes;
+
+ /**
+ * @param string|InstrumentType|string[]|InstrumentType[] $instrumentType
+ */
+ public function __construct($instrumentType)
+ {
+ $this->instrumentTypes = (array) $instrumentType;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return in_array($instrument->type, $this->instrumentTypes, true);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php
new file mode 100644
index 000000000..201d1a7b2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentationScopeNameCriteria implements SelectionCriteriaInterface
+{
+ private string $name;
+
+ public function __construct(string $name)
+ {
+ $this->name = $name;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return $this->name === $instrumentationScope->getName();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php
new file mode 100644
index 000000000..a11a1d589
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentationScopeSchemaUrlCriteria implements SelectionCriteriaInterface
+{
+ private ?string $schemaUrl;
+
+ public function __construct(?string $schemaUrl)
+ {
+ $this->schemaUrl = $schemaUrl;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return $this->schemaUrl === $instrumentationScope->getSchemaUrl();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php
new file mode 100644
index 000000000..37d180f99
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentationScopeVersionCriteria implements SelectionCriteriaInterface
+{
+ private ?string $version;
+
+ public function __construct(?string $version)
+ {
+ $this->version = $version;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return $this->version === $instrumentationScope->getVersion();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php
new file mode 100644
index 000000000..8abd6fa69
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+
+interface SelectionCriteriaInterface
+{
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php b/vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php
new file mode 100644
index 000000000..302ed83ae
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View;
+
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\ViewProjection;
+
+final class ViewTemplate
+{
+ private ?string $name = null;
+ private ?string $description = null;
+ /**
+ * @var list<string>
+ */
+ private ?array $attributeKeys = null;
+ private ?AggregationInterface $aggregation = null;
+
+ private function __construct()
+ {
+ }
+
+ public static function create(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ public function withName(string $name): self
+ {
+ $self = clone $this;
+ $self->name = $name;
+
+ return $self;
+ }
+
+ public function withDescription(string $description): self
+ {
+ $self = clone $this;
+ $self->description = $description;
+
+ return $self;
+ }
+
+ /**
+ * @param list<string> $attributeKeys
+ */
+ public function withAttributeKeys(array $attributeKeys): self
+ {
+ $self = clone $this;
+ $self->attributeKeys = $attributeKeys;
+
+ return $self;
+ }
+
+ public function withAggregation(?AggregationInterface $aggregation): self
+ {
+ $self = clone $this;
+ $self->aggregation = $aggregation;
+
+ return $self;
+ }
+
+ public function project(Instrument $instrument): ViewProjection
+ {
+ return new ViewProjection(
+ $this->name ?? $instrument->name,
+ $instrument->unit,
+ $this->description ?? $instrument->description,
+ $this->attributeKeys,
+ $this->aggregation,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ViewProjection.php b/vendor/open-telemetry/sdk/Metrics/ViewProjection.php
new file mode 100644
index 000000000..046bd6bb1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ViewProjection.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+final class ViewProjection
+{
+ /**
+ * @readonly
+ */
+ public string $name;
+ /**
+ * @readonly
+ */
+ public ?string $unit;
+ /**
+ * @readonly
+ */
+ public ?string $description;
+ /**
+ * @readonly
+ * @var list<string>|null
+ */
+ public ?array $attributeKeys;
+ /**
+ * @readonly
+ */
+ public ?AggregationInterface $aggregation;
+
+ /**
+ * @param list<string>|null $attributeKeys
+ */
+ public function __construct(
+ string $name,
+ ?string $unit,
+ ?string $description,
+ ?array $attributeKeys,
+ ?AggregationInterface $aggregation
+ ) {
+ $this->name = $name;
+ $this->unit = $unit;
+ $this->description = $description;
+ $this->attributeKeys = $attributeKeys;
+ $this->aggregation = $aggregation;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php b/vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php
new file mode 100644
index 000000000..19d8f9ffd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+interface ViewRegistryInterface
+{
+ /**
+ * @return iterable<ViewProjection>|null
+ */
+ public function find(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): ?iterable;
+}
diff --git a/vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php b/vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php
new file mode 100644
index 000000000..2dc349dfb
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Propagation;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\Context\Propagation\MultiTextMapPropagator;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Registry;
+
+class PropagatorFactory
+{
+ use LogsMessagesTrait;
+
+ public function create(): TextMapPropagatorInterface
+ {
+ $propagators = Configuration::getList(Variables::OTEL_PROPAGATORS);
+ switch (count($propagators)) {
+ case 0:
+ return new NoopTextMapPropagator();
+ case 1:
+ return $this->buildPropagator($propagators[0]);
+ default:
+ return new MultiTextMapPropagator($this->buildPropagators($propagators));
+ }
+ }
+
+ /**
+ * @return array<TextMapPropagatorInterface>
+ */
+ private function buildPropagators(array $names): array
+ {
+ $propagators = [];
+ foreach ($names as $name) {
+ $propagators[] = $this->buildPropagator($name);
+ }
+
+ return $propagators;
+ }
+
+ private function buildPropagator(string $name): TextMapPropagatorInterface
+ {
+ try {
+ return Registry::textMapPropagator($name);
+ } catch (\RuntimeException $e) {
+ self::logWarning($e->getMessage());
+ }
+
+ return NoopTextMapPropagator::getInstance();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Propagation/_register.php b/vendor/open-telemetry/sdk/Propagation/_register.php
new file mode 100644
index 000000000..fd90da184
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Propagation/_register.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\Registry::registerTextMapPropagator(
+ \OpenTelemetry\SDK\Common\Configuration\KnownValues::VALUE_BAGGAGE,
+ \OpenTelemetry\API\Baggage\Propagation\BaggagePropagator::getInstance()
+);
+\OpenTelemetry\SDK\Registry::registerTextMapPropagator(
+ \OpenTelemetry\SDK\Common\Configuration\KnownValues::VALUE_TRACECONTEXT,
+ \OpenTelemetry\API\Trace\Propagation\TraceContextPropagator::getInstance()
+);
+\OpenTelemetry\SDK\Registry::registerTextMapPropagator(
+ \OpenTelemetry\SDK\Common\Configuration\KnownValues::VALUE_NONE,
+ \OpenTelemetry\Context\Propagation\NoopTextMapPropagator::getInstance()
+);
diff --git a/vendor/open-telemetry/sdk/README.md b/vendor/open-telemetry/sdk/README.md
new file mode 100644
index 000000000..6346dc0f3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/README.md
@@ -0,0 +1,49 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/sdk/releases)
+[![Source](https://img.shields.io/badge/source-sdk-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/SDK)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:sdk-blue)](https://github.com/opentelemetry-php/sdk)
+[![Latest Version](http://poser.pugx.org/open-telemetry/sdk/v/unstable)](https://packagist.org/packages/open-telemetry/sdk/)
+[![Stable](http://poser.pugx.org/open-telemetry/sdk/v/stable)](https://packagist.org/packages/open-telemetry/sdk/)
+
+# OpenTelemetry SDK
+
+The OpenTelemetry PHP SDK implements the API, and should be used in conjunction with contributed exporter(s) to generate and export telemetry.
+
+## Documentation
+
+https://opentelemetry.io/docs/instrumentation/php/sdk/
+
+## Getting started
+
+### Manual setup
+
+See https://github.com/open-telemetry/opentelemetry-php/tree/main/examples
+
+### SDK Builder
+
+See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/sdk_builder.php
+
+### Autoloading
+
+SDK autoloading works with configuration values provided via the environment (or php.ini).
+
+The SDK can be automatically created and registered, if the following conditions are met:
+- `OTEL_PHP_AUTOLOAD_ENABLED=true`
+- all required [SDK configuration](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#general-sdk-configuration) is provided
+
+SDK autoloading will be attempted as part of composer's autoloader:
+
+```php
+require 'vendor/autoload.php';
+
+$tracer = \OpenTelemetry\API\Globals::tracerProvider()->getTracer('example');
+$meter = \OpenTelemetry\API\Globals::meterProvider()->getMeter('example');
+```
+
+If autoloading was not successful (or partially successful), no-op implementations of the above may be returned.
+
+See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/autoload_sdk.php for a more detailed example.
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/sdk/Registry.php b/vendor/open-telemetry/sdk/Registry.php
new file mode 100644
index 000000000..2f0a20263
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Registry.php
@@ -0,0 +1,208 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Trace\SpanExporter\SpanExporterFactoryInterface;
+use RuntimeException;
+
+/**
+ * A registry to enable central registration of components that the SDK requires but which may be provided
+ * by non-SDK modules, such as contrib and extension.
+ */
+class Registry
+{
+ private static array $spanExporterFactories = [];
+ private static array $transportFactories = [];
+ private static array $metricExporterFactories = [];
+ private static array $textMapPropagators = [];
+ private static array $logRecordExporterFactories = [];
+ private static array $resourceDetectors = [];
+
+ /**
+ * @param TransportFactoryInterface|class-string<TransportFactoryInterface> $factory
+ */
+ public static function registerTransportFactory(string $protocol, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($protocol, self::$transportFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, TransportFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register transport factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ TransportFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$transportFactories[$protocol] = $factory;
+ }
+
+ /**
+ * @param SpanExporterFactoryInterface|class-string<SpanExporterFactoryInterface> $factory
+ */
+ public static function registerSpanExporterFactory(string $exporter, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($exporter, self::$spanExporterFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, SpanExporterFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register span exporter factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ SpanExporterFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$spanExporterFactories[$exporter] = $factory;
+ }
+
+ /**
+ * @param MetricExporterFactoryInterface|class-string<MetricExporterFactoryInterface> $factory
+ */
+ public static function registerMetricExporterFactory(string $exporter, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($exporter, self::$metricExporterFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, MetricExporterFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register metric factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ MetricExporterFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$metricExporterFactories[$exporter] = $factory;
+ }
+
+ public static function registerLogRecordExporterFactory(string $exporter, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($exporter, self::$logRecordExporterFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, LogRecordExporterFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register LogRecord exporter factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ LogRecordExporterFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$logRecordExporterFactories[$exporter] = $factory;
+ }
+
+ public static function registerTextMapPropagator(string $name, TextMapPropagatorInterface $propagator, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($name, self::$textMapPropagators)) {
+ return;
+ }
+ self::$textMapPropagators[$name] = $propagator;
+ }
+
+ public static function registerResourceDetector(string $name, ResourceDetectorInterface $detector): void
+ {
+ self::$resourceDetectors[$name] = $detector;
+ }
+
+ public static function spanExporterFactory(string $exporter): SpanExporterFactoryInterface
+ {
+ if (!array_key_exists($exporter, self::$spanExporterFactories)) {
+ throw new RuntimeException('Span exporter factory not defined for: ' . $exporter);
+ }
+ $class = self::$spanExporterFactories[$exporter];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof SpanExporterFactoryInterface);
+
+ return $factory;
+ }
+
+ public static function logRecordExporterFactory(string $exporter): LogRecordExporterFactoryInterface
+ {
+ if (!array_key_exists($exporter, self::$logRecordExporterFactories)) {
+ throw new RuntimeException('LogRecord exporter factory not defined for: ' . $exporter);
+ }
+ $class = self::$logRecordExporterFactories[$exporter];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof LogRecordExporterFactoryInterface);
+
+ return $factory;
+ }
+
+ /**
+ * Get transport factory registered for protocol. If $protocol contains a content-type eg `http/xyz` then
+ * only the first part, `http`, is used.
+ */
+ public static function transportFactory(string $protocol): TransportFactoryInterface
+ {
+ $protocol = explode('/', $protocol)[0];
+ if (!array_key_exists($protocol, self::$transportFactories)) {
+ throw new RuntimeException('Transport factory not defined for protocol: ' . $protocol);
+ }
+ $class = self::$transportFactories[$protocol];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof TransportFactoryInterface);
+
+ return $factory;
+ }
+
+ public static function metricExporterFactory(string $exporter): MetricExporterFactoryInterface
+ {
+ if (!array_key_exists($exporter, self::$metricExporterFactories)) {
+ throw new RuntimeException('Metric exporter factory not registered for protocol: ' . $exporter);
+ }
+ $class = self::$metricExporterFactories[$exporter];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof MetricExporterFactoryInterface);
+
+ return $factory;
+ }
+
+ public static function textMapPropagator(string $name): TextMapPropagatorInterface
+ {
+ if (!array_key_exists($name, self::$textMapPropagators)) {
+ throw new RuntimeException('Text map propagator not registered for: ' . $name);
+ }
+
+ return self::$textMapPropagators[$name];
+ }
+
+ public static function resourceDetector(string $name): ResourceDetectorInterface
+ {
+ if (!array_key_exists($name, self::$resourceDetectors)) {
+ throw new RuntimeException('Resource detector not registered for: ' . $name);
+ }
+
+ return self::$resourceDetectors[$name];
+ }
+
+ /**
+ * @return array<int, ResourceDetectorInterface>
+ */
+ public static function resourceDetectors(): array
+ {
+ return array_values(self::$resourceDetectors);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php b/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php
new file mode 100644
index 000000000..56b136ef1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use function class_exists;
+use Composer\InstalledVersions;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+final class Composer implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ if (!class_exists(InstalledVersions::class)) {
+ return ResourceInfoFactory::emptyResource();
+ }
+
+ $attributes = [
+ ResourceAttributes::SERVICE_NAME => InstalledVersions::getRootPackage()['name'],
+ ResourceAttributes::SERVICE_VERSION => InstalledVersions::getRootPackage()['pretty_version'],
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php b/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php
new file mode 100644
index 000000000..9da267743
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+
+final class Composite implements ResourceDetectorInterface
+{
+ private iterable $resourceDetectors;
+
+ /**
+ * @param iterable<ResourceDetectorInterface> $resourceDetectors
+ */
+ public function __construct(iterable $resourceDetectors)
+ {
+ $this->resourceDetectors = $resourceDetectors;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ $resource = ResourceInfoFactory::emptyResource();
+ foreach ($this->resourceDetectors as $resourceDetector) {
+ $resource = $resource->merge($resourceDetector->getResource());
+ }
+
+ return $resource;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php b/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php
new file mode 100644
index 000000000..7ff9d19eb
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+final class Constant implements ResourceDetectorInterface
+{
+ private ResourceInfo $resourceInfo;
+
+ public function __construct(ResourceInfo $resourceInfo)
+ {
+ $this->resourceInfo = $resourceInfo;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->resourceInfo;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php b/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php
new file mode 100644
index 000000000..ceee8fcf7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable
+ */
+final class Environment implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = Configuration::has(Variables::OTEL_RESOURCE_ATTRIBUTES)
+ ? self::decode(Configuration::getMap(Variables::OTEL_RESOURCE_ATTRIBUTES, []))
+ : [];
+
+ //@see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ $serviceName = Configuration::has(Variables::OTEL_SERVICE_NAME)
+ ? Configuration::getString(Variables::OTEL_SERVICE_NAME)
+ : null;
+ if ($serviceName) {
+ $attributes[ResourceAttributes::SERVICE_NAME] = $serviceName;
+ }
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+
+ private static function decode(array $attributes): array
+ {
+ return array_map('urldecode', $attributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Host.php b/vendor/open-telemetry/sdk/Resource/Detectors/Host.php
new file mode 100644
index 000000000..dd2554540
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Host.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use function php_uname;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/host.md#host
+ */
+final class Host implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::HOST_NAME => php_uname('n'),
+ ResourceAttributes::HOST_ARCH => php_uname('m'),
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php b/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php
new file mode 100644
index 000000000..2cb350dc2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use const PHP_OS;
+use const PHP_OS_FAMILY;
+use function php_uname;
+use function strtolower;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/os.md
+ */
+final class OperatingSystem implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::OS_TYPE => strtolower(PHP_OS_FAMILY),
+ ResourceAttributes::OS_DESCRIPTION => php_uname('r'),
+ ResourceAttributes::OS_NAME => PHP_OS,
+ ResourceAttributes::OS_VERSION => php_uname('v'),
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Process.php b/vendor/open-telemetry/sdk/Resource/Detectors/Process.php
new file mode 100644
index 000000000..7f1d99386
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Process.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use function extension_loaded;
+use function getmypid;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use const PHP_BINARY;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/process.md#process
+ */
+final class Process implements ResourceDetectorInterface
+{
+ /**
+ * @psalm-suppress PossiblyUndefinedArrayOffset
+ */
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [];
+ $attributes[ResourceAttributes::PROCESS_PID] = getmypid();
+ $attributes[ResourceAttributes::PROCESS_EXECUTABLE_PATH] = PHP_BINARY;
+ /**
+ * @psalm-suppress PossiblyUndefinedArrayOffset
+ */
+ if ($_SERVER['argv'] ?? null) {
+ $attributes[ResourceAttributes::PROCESS_COMMAND] = $_SERVER['argv'][0];
+ $attributes[ResourceAttributes::PROCESS_COMMAND_ARGS] = $_SERVER['argv'];
+ }
+
+ /** @phan-suppress-next-line PhanTypeComparisonFromArray */
+ if (extension_loaded('posix') && ($user = \posix_getpwuid(\posix_geteuid())) !== false) {
+ $attributes[ResourceAttributes::PROCESS_OWNER] = $user['name'];
+ }
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php b/vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php
new file mode 100644
index 000000000..f29ddfc8f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use function php_sapi_name;
+use const PHP_VERSION;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/process.md#process-runtimes
+ */
+final class ProcessRuntime implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::PROCESS_RUNTIME_NAME => php_sapi_name(),
+ ResourceAttributes::PROCESS_RUNTIME_VERSION => PHP_VERSION,
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php b/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php
new file mode 100644
index 000000000..dba3eb8aa
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php
@@ -0,0 +1,53 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use function class_exists;
+use Composer\InstalledVersions;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/README.md#telemetry-sdk
+ */
+final class Sdk implements ResourceDetectorInterface
+{
+ private const PACKAGES = [
+ 'open-telemetry/sdk',
+ 'open-telemetry/opentelemetry',
+ ];
+
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::TELEMETRY_SDK_NAME => 'opentelemetry',
+ ResourceAttributes::TELEMETRY_SDK_LANGUAGE => 'php',
+ ];
+
+ if (class_exists(InstalledVersions::class)) {
+ foreach (self::PACKAGES as $package) {
+ if (!InstalledVersions::isInstalled($package)) {
+ continue;
+ }
+ if (($version = InstalledVersions::getPrettyVersion($package)) === null) {
+ continue;
+ }
+
+ $attributes[ResourceAttributes::TELEMETRY_SDK_VERSION] = $version;
+
+ break;
+ }
+ }
+
+ if (extension_loaded('opentelemetry')) {
+ $attributes[ResourceAttributes::TELEMETRY_DISTRO_NAME] = 'opentelemetry-php-instrumentation';
+ $attributes[ResourceAttributes::TELEMETRY_DISTRO_VERSION] = phpversion('opentelemetry');
+ }
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php b/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php
new file mode 100644
index 000000000..ec4ec7def
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+/**
+ * @see https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#semantic-attributes-with-sdk-provided-default-value
+ */
+final class SdkProvided implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::SERVICE_NAME => 'unknown_service:php',
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php b/vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php
new file mode 100644
index 000000000..f2cd5256b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource;
+
+interface ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo;
+}
diff --git a/vendor/open-telemetry/sdk/Resource/ResourceInfo.php b/vendor/open-telemetry/sdk/Resource/ResourceInfo.php
new file mode 100644
index 000000000..4210a6142
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/ResourceInfo.php
@@ -0,0 +1,125 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+use OpenTelemetry\SDK\Common\Dev\Compatibility\Util as BcUtil;
+
+/**
+ * A Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry
+ * that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment
+ * which also has a name. All three of these attributes can be included in the Resource.
+ *
+ * The class named as ResourceInfo due to `resource` is the soft reserved word in PHP.
+ */
+class ResourceInfo
+{
+ use LogsMessagesTrait;
+
+ private AttributesInterface $attributes;
+ private ?string $schemaUrl;
+
+ private function __construct(AttributesInterface $attributes, ?string $schemaUrl = null)
+ {
+ $this->attributes = $attributes;
+ $this->schemaUrl = $schemaUrl;
+ }
+
+ public static function create(AttributesInterface $attributes, ?string $schemaUrl = null): self
+ {
+ return new ResourceInfo($attributes, $schemaUrl);
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+
+ public function getSchemaUrl(): ?string
+ {
+ return $this->schemaUrl;
+ }
+
+ public function serialize(): string
+ {
+ $copyOfAttributesAsArray = array_slice($this->attributes->toArray(), 0); //This may be overly cautious (in trying to avoid mutating the source array)
+ ksort($copyOfAttributesAsArray); //sort the associative array by keys since the serializer will consider equal arrays different otherwise
+
+ //The exact return value doesn't matter, as long as it can distingusih between instances that represent the same/different resources
+ return serialize([
+ 'schemaUrl' => $this->schemaUrl,
+ 'attributes' => $copyOfAttributesAsArray,
+ ]);
+ }
+
+ /**
+ * Merge current resource with an updating resource, combining all attributes. If a key exists on both the old and updating
+ * resource, the value of the updating resource MUST be picked (even if the updated value is empty)
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge
+ */
+ public function merge(ResourceInfo $updating): ResourceInfo
+ {
+ $schemaUrl = self::mergeSchemaUrl($this->getSchemaUrl(), $updating->getSchemaUrl());
+ $attributes = $updating->getAttributes()->toArray() + $this->getAttributes()->toArray();
+
+ return ResourceInfo::create(Attributes::create($attributes), $schemaUrl);
+ }
+
+ /**
+ * Merge the schema URLs from the old and updating resource.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge
+ */
+ private static function mergeSchemaUrl(?string $old, ?string $updating): ?string
+ {
+ if (empty($old)) {
+ return $updating;
+ }
+ if (empty($updating)) {
+ return $old;
+ }
+ if ($old === $updating) {
+ return $old;
+ }
+
+ self::logWarning('Merging resources with different schema URLs', [
+ 'old' => $old,
+ 'updating' => $updating,
+ ]);
+
+ return null;
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public static function defaultResource(): ResourceInfo
+ {
+ BcUtil::triggerMethodDeprecationNotice(
+ __METHOD__,
+ 'defaultResource',
+ ResourceInfoFactory::class
+ );
+
+ return ResourceInfoFactory::defaultResource();
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public static function emptyResource(): ResourceInfo
+ {
+ BcUtil::triggerMethodDeprecationNotice(
+ __METHOD__,
+ 'emptyResource',
+ ResourceInfoFactory::class
+ );
+
+ return ResourceInfoFactory::emptyResource();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php b/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php
new file mode 100644
index 000000000..7fc80bcd9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php
@@ -0,0 +1,95 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource;
+
+use function in_array;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SDK\Registry;
+use RuntimeException;
+
+class ResourceInfoFactory
+{
+ use LogsMessagesTrait;
+
+ public static function defaultResource(): ResourceInfo
+ {
+ $detectors = Configuration::getList(Env::OTEL_PHP_DETECTORS);
+
+ if (in_array(Values::VALUE_ALL, $detectors)) {
+ // ascending priority: keys from later detectors will overwrite earlier
+ return (new Detectors\Composite([
+ new Detectors\Host(),
+ new Detectors\OperatingSystem(),
+ new Detectors\Process(),
+ new Detectors\ProcessRuntime(),
+ new Detectors\Sdk(),
+ new Detectors\SdkProvided(),
+ new Detectors\Composer(),
+ ...Registry::resourceDetectors(),
+ new Detectors\Environment(),
+ ]))->getResource();
+ }
+
+ $resourceDetectors = [];
+
+ foreach ($detectors as $detector) {
+ switch ($detector) {
+ case Values::VALUE_DETECTORS_ENVIRONMENT:
+ $resourceDetectors[] = new Detectors\Environment();
+
+ break;
+ case Values::VALUE_DETECTORS_HOST:
+ $resourceDetectors[] = new Detectors\Host();
+
+ break;
+ case Values::VALUE_DETECTORS_OS:
+ $resourceDetectors[] = new Detectors\OperatingSystem();
+
+ break;
+ case Values::VALUE_DETECTORS_PROCESS:
+ $resourceDetectors[] = new Detectors\Process();
+
+ break;
+ case Values::VALUE_DETECTORS_PROCESS_RUNTIME:
+ $resourceDetectors[] = new Detectors\ProcessRuntime();
+
+ break;
+ case Values::VALUE_DETECTORS_SDK:
+ $resourceDetectors[] = new Detectors\Sdk();
+
+ break;
+ case Values::VALUE_DETECTORS_SDK_PROVIDED:
+ $resourceDetectors[] = new Detectors\SdkProvided();
+
+ break;
+
+ case Values::VALUE_DETECTORS_COMPOSER:
+ $resourceDetectors[] = new Detectors\Composer();
+
+ break;
+ case Values::VALUE_NONE:
+
+ break;
+ default:
+ try {
+ $resourceDetectors[] = Registry::resourceDetector($detector);
+ } catch (RuntimeException $e) {
+ self::logWarning($e->getMessage());
+ }
+ }
+ }
+
+ return (new Detectors\Composite($resourceDetectors))->getResource();
+ }
+
+ public static function emptyResource(): ResourceInfo
+ {
+ return ResourceInfo::create(Attributes::create([]));
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Sdk.php b/vendor/open-telemetry/sdk/Sdk.php
new file mode 100644
index 000000000..3b63eb93a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Sdk.php
@@ -0,0 +1,70 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Logs\LoggerProviderInterface;
+
+class Sdk
+{
+ private TracerProviderInterface $tracerProvider;
+ private MeterProviderInterface $meterProvider;
+ private LoggerProviderInterface $loggerProvider;
+ private TextMapPropagatorInterface $propagator;
+
+ public function __construct(
+ TracerProviderInterface $tracerProvider,
+ MeterProviderInterface $meterProvider,
+ LoggerProviderInterface $loggerProvider,
+ TextMapPropagatorInterface $propagator
+ ) {
+ $this->tracerProvider = $tracerProvider;
+ $this->meterProvider = $meterProvider;
+ $this->loggerProvider = $loggerProvider;
+ $this->propagator = $propagator;
+ }
+
+ public static function isDisabled(): bool
+ {
+ return Configuration::getBoolean(Variables::OTEL_SDK_DISABLED);
+ }
+
+ /**
+ * Tests whether an auto-instrumentation package has been disabled by config
+ */
+ public static function isInstrumentationDisabled(string $name): bool
+ {
+ return in_array($name, Configuration::getList(Variables::OTEL_PHP_DISABLED_INSTRUMENTATIONS));
+ }
+
+ public static function builder(): SdkBuilder
+ {
+ return new SdkBuilder();
+ }
+
+ public function getTracerProvider(): TracerProviderInterface
+ {
+ return $this->tracerProvider;
+ }
+
+ public function getMeterProvider(): MeterProviderInterface
+ {
+ return $this->meterProvider;
+ }
+
+ public function getLoggerProvider(): LoggerProviderInterface
+ {
+ return $this->loggerProvider;
+ }
+
+ public function getPropagator(): TextMapPropagatorInterface
+ {
+ return $this->propagator;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/SdkAutoloader.php b/vendor/open-telemetry/sdk/SdkAutoloader.php
new file mode 100644
index 000000000..c08195e19
--- /dev/null
+++ b/vendor/open-telemetry/sdk/SdkAutoloader.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Globals;
+use OpenTelemetry\API\Instrumentation\Configurator;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Util\ShutdownHandler;
+use OpenTelemetry\SDK\Logs\LoggerProviderFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderFactory;
+use OpenTelemetry\SDK\Propagation\PropagatorFactory;
+use OpenTelemetry\SDK\Trace\ExporterFactory;
+use OpenTelemetry\SDK\Trace\SamplerFactory;
+use OpenTelemetry\SDK\Trace\SpanProcessorFactory;
+use OpenTelemetry\SDK\Trace\TracerProviderBuilder;
+
+class SdkAutoloader
+{
+ private static ?bool $enabled = null;
+
+ public static function autoload(): bool
+ {
+ try {
+ self::$enabled ??= Configuration::getBoolean(Variables::OTEL_PHP_AUTOLOAD_ENABLED);
+ } catch (InvalidArgumentException $e) {
+ //invalid setting, assume false
+ self::$enabled = false;
+ }
+ if (!self::$enabled) {
+ return false;
+ }
+ Globals::registerInitializer(function (Configurator $configurator) {
+ $propagator = (new PropagatorFactory())->create();
+ if (Sdk::isDisabled()) {
+ //@see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ return $configurator->withPropagator($propagator);
+ }
+ $emitMetrics = Configuration::getBoolean(Variables::OTEL_PHP_INTERNAL_METRICS_ENABLED);
+
+ $exporter = (new ExporterFactory())->create();
+ $meterProvider = (new MeterProviderFactory())->create();
+ $spanProcessor = (new SpanProcessorFactory())->create($exporter, $emitMetrics ? $meterProvider : null);
+ $tracerProvider = (new TracerProviderBuilder())
+ ->addSpanProcessor($spanProcessor)
+ ->setSampler((new SamplerFactory())->create())
+ ->build();
+
+ $loggerProvider = (new LoggerProviderFactory())->create($emitMetrics ? $meterProvider : null);
+
+ ShutdownHandler::register([$tracerProvider, 'shutdown']);
+ ShutdownHandler::register([$meterProvider, 'shutdown']);
+ ShutdownHandler::register([$loggerProvider, 'shutdown']);
+
+ return $configurator
+ ->withTracerProvider($tracerProvider)
+ ->withMeterProvider($meterProvider)
+ ->withLoggerProvider($loggerProvider)
+ ->withPropagator($propagator)
+ ;
+ });
+
+ return true;
+ }
+
+ /**
+ * @internal
+ */
+ public static function reset(): void
+ {
+ self::$enabled = null;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/SdkBuilder.php b/vendor/open-telemetry/sdk/SdkBuilder.php
new file mode 100644
index 000000000..2090c4731
--- /dev/null
+++ b/vendor/open-telemetry/sdk/SdkBuilder.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use OpenTelemetry\API\Instrumentation\Configurator;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\Context\ScopeInterface;
+use OpenTelemetry\SDK\Common\Util\ShutdownHandler;
+use OpenTelemetry\SDK\Logs\LoggerProviderInterface;
+use OpenTelemetry\SDK\Logs\NoopLoggerProvider;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Metrics\NoopMeterProvider;
+use OpenTelemetry\SDK\Trace\NoopTracerProvider;
+use OpenTelemetry\SDK\Trace\TracerProviderInterface;
+
+class SdkBuilder
+{
+ private ?TracerProviderInterface $tracerProvider = null;
+ private ?MeterProviderInterface $meterProvider = null;
+ private ?LoggerProviderInterface $loggerProvider = null;
+ private ?TextMapPropagatorInterface $propagator = null;
+ private bool $autoShutdown = false;
+
+ /**
+ * Automatically shut down providers on process completion. If not set, the user is responsible for calling `shutdown`.
+ */
+ public function setAutoShutdown(bool $shutdown): self
+ {
+ $this->autoShutdown = $shutdown;
+
+ return $this;
+ }
+
+ public function setTracerProvider(TracerProviderInterface $provider): self
+ {
+ $this->tracerProvider = $provider;
+
+ return $this;
+ }
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): self
+ {
+ $this->meterProvider = $meterProvider;
+
+ return $this;
+ }
+
+ public function setLoggerProvider(LoggerProviderInterface $loggerProvider): self
+ {
+ $this->loggerProvider = $loggerProvider;
+
+ return $this;
+ }
+
+ public function setPropagator(TextMapPropagatorInterface $propagator): self
+ {
+ $this->propagator = $propagator;
+
+ return $this;
+ }
+
+ public function build(): Sdk
+ {
+ $tracerProvider = $this->tracerProvider ?? new NoopTracerProvider();
+ $meterProvider = $this->meterProvider ?? new NoopMeterProvider();
+ $loggerProvider = $this->loggerProvider ?? new NoopLoggerProvider();
+ if ($this->autoShutdown) {
+ // rector rule disabled in config, because ShutdownHandler::register() does not keep a strong reference to $this
+ ShutdownHandler::register([$tracerProvider, 'shutdown']);
+ ShutdownHandler::register([$meterProvider, 'shutdown']);
+ ShutdownHandler::register([$loggerProvider, 'shutdown']);
+ }
+
+ return new Sdk(
+ $tracerProvider,
+ $meterProvider,
+ $loggerProvider,
+ $this->propagator ?? NoopTextMapPropagator::getInstance(),
+ );
+ }
+
+ public function buildAndRegisterGlobal(): ScopeInterface
+ {
+ $sdk = $this->build();
+ $context = Configurator::create()
+ ->withPropagator($sdk->getPropagator())
+ ->withTracerProvider($sdk->getTracerProvider())
+ ->withMeterProvider($sdk->getMeterProvider())
+ ->withLoggerProvider($sdk->getLoggerProvider())
+ ->storeInContext();
+
+ return Context::storage()->attach($context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php
new file mode 100644
index 000000000..24f5e56a8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use Psr\Log\LoggerAwareTrait as PsrTrait;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+use Psr\Log\NullLogger;
+
+trait LoggerAwareTrait
+{
+ use PsrTrait;
+
+ private string $defaultLogLevel = LogLevel::INFO;
+
+ /**
+ * @param string $logLevel
+ */
+ public function setDefaultLogLevel(string $logLevel): void
+ {
+ $this->defaultLogLevel = $logLevel;
+ }
+
+ /**
+ * @param string $message
+ * @param array $context
+ * @param string|null $level
+ */
+ protected function log(string $message, array $context = [], ?string $level = null): void
+ {
+ $this->getLogger()->log(
+ $level ?? $this->defaultLogLevel,
+ $message,
+ $context
+ );
+ }
+
+ protected function getLogger(): LoggerInterface
+ {
+ if ($this->logger !== null) {
+ return $this->logger;
+ }
+
+ return new NullLogger();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php
new file mode 100644
index 000000000..97839ec5b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+trait SpanExporterDecoratorTrait
+{
+ protected SpanExporterInterface $decorated;
+
+ /**
+ * @param iterable<SpanDataInterface> $batch
+ * @return FutureInterface<bool>
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ $batch = $this->beforeExport($batch);
+ $response = $this->decorated->export($batch, $cancellation);
+ $response->map(fn (bool $result) => $this->afterExport($batch, $result));
+
+ return $response;
+ }
+
+ abstract protected function beforeExport(iterable $spans): iterable;
+
+ abstract protected function afterExport(iterable $spans, bool $exportSuccess): void;
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->decorated->shutdown($cancellation);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->decorated->forceFlush($cancellation);
+ }
+
+ public function setDecorated(SpanExporterInterface $decorated): void
+ {
+ $this->decorated = $decorated;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php
new file mode 100644
index 000000000..339fecc1d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+
+trait SpanExporterTrait
+{
+ private bool $running = true;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#shutdown-2 */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ $this->running = false;
+
+ return true;
+ }
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-2 */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ /**
+ * @param iterable<SpanDataInterface> $batch
+ * @return FutureInterface<bool>
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ if (!$this->running) {
+ return new CompletedFuture(false);
+ }
+
+ return new CompletedFuture($this->doExport($batch)); /** @phpstan-ignore-line */
+ }
+
+ /**
+ * @param iterable<SpanDataInterface> $spans Batch of spans to export
+ */
+ abstract protected function doExport(iterable $spans): bool; /** @phpstan-ignore-line */
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php
new file mode 100644
index 000000000..4802cd15b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\SpanExporter\NullSpanConverter;
+
+trait UsesSpanConverterTrait
+{
+ private ?SpanConverterInterface $converter = null;
+
+ /**
+ * @param SpanConverterInterface $converter
+ */
+ protected function setSpanConverter(SpanConverterInterface $converter): void
+ {
+ $this->converter = $converter;
+ }
+
+ public function getSpanConverter(): SpanConverterInterface
+ {
+ if (null === $this->converter) {
+ $this->converter = new NullSpanConverter();
+ }
+
+ return $this->converter;
+ }
+
+ /**
+ * @param SpanDataInterface $span
+ * @return array
+ * @psalm-suppress PossiblyNullReference
+ */
+ protected function convertSpan(SpanDataInterface $span): array
+ {
+ return $this->getSpanConverter()->convert([$span]);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Event.php b/vendor/open-telemetry/sdk/Trace/Event.php
new file mode 100644
index 000000000..28cb39bb1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Event.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function count;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class Event implements EventInterface
+{
+ private string $name;
+ private int $timestamp;
+ private AttributesInterface $attributes;
+
+ public function __construct(string $name, int $timestamp, AttributesInterface $attributes)
+ {
+ $this->name = $name;
+ $this->timestamp = $timestamp;
+ $this->attributes = $attributes;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function getEpochNanos(): int
+ {
+ return $this->timestamp;
+ }
+
+ public function getTotalAttributeCount(): int
+ {
+ return count($this->attributes);
+ }
+
+ public function getDroppedAttributesCount(): int
+ {
+ return $this->attributes->getDroppedAttributesCount();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/EventInterface.php b/vendor/open-telemetry/sdk/Trace/EventInterface.php
new file mode 100644
index 000000000..8b5ee2af6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/EventInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+interface EventInterface
+{
+ public function getName(): string;
+ public function getAttributes(): AttributesInterface;
+ public function getEpochNanos(): int;
+ public function getTotalAttributeCount(): int;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/ExporterFactory.php b/vendor/open-telemetry/sdk/Trace/ExporterFactory.php
new file mode 100644
index 000000000..9b652cc2f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ExporterFactory.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Registry;
+use RuntimeException;
+
+class ExporterFactory
+{
+ /**
+ * @throws RuntimeException
+ */
+ public function create(): ?SpanExporterInterface
+ {
+ $exporters = Configuration::getList(Variables::OTEL_TRACES_EXPORTER);
+ if (1 !== count($exporters)) {
+ throw new InvalidArgumentException(sprintf('Configuration %s requires exactly 1 exporter', Variables::OTEL_TRACES_EXPORTER));
+ }
+ $exporter = $exporters[0];
+ if ($exporter === 'none') {
+ return null;
+ }
+ $factory = Registry::spanExporterFactory($exporter);
+
+ return $factory->create();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php b/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php
new file mode 100644
index 000000000..ad622dccc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+interface IdGeneratorInterface
+{
+ public function generateTraceId(): string;
+
+ public function generateSpanId(): string;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/ImmutableSpan.php b/vendor/open-telemetry/sdk/Trace/ImmutableSpan.php
new file mode 100644
index 000000000..57836d4c3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ImmutableSpan.php
@@ -0,0 +1,153 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function max;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @psalm-immutable
+ */
+final class ImmutableSpan implements SpanDataInterface
+{
+ private Span $span;
+
+ /** @var non-empty-string */
+ private string $name;
+
+ /** @var list<EventInterface> */
+ private array $events;
+
+ /** @var list<LinkInterface> */
+ private array $links;
+
+ private AttributesInterface $attributes;
+ private int $totalRecordedEvents;
+ private StatusDataInterface $status;
+ private int $endEpochNanos;
+ private bool $hasEnded;
+
+ /**
+ * @param non-empty-string $name
+ * @param list<LinkInterface> $links
+ * @param list<EventInterface> $events
+ */
+ public function __construct(
+ Span $span,
+ string $name,
+ array $links,
+ array $events,
+ AttributesInterface $attributes,
+ int $totalRecordedEvents,
+ StatusDataInterface $status,
+ int $endEpochNanos,
+ bool $hasEnded
+ ) {
+ $this->span = $span;
+ $this->name = $name;
+ $this->links = $links;
+ $this->events = $events;
+ $this->attributes = $attributes;
+ $this->totalRecordedEvents = $totalRecordedEvents;
+ $this->status = $status;
+ $this->endEpochNanos = $endEpochNanos;
+ $this->hasEnded = $hasEnded;
+ }
+
+ public function getKind(): int
+ {
+ return $this->span->getKind();
+ }
+
+ public function getContext(): API\SpanContextInterface
+ {
+ return $this->span->getContext();
+ }
+
+ public function getParentContext(): API\SpanContextInterface
+ {
+ return $this->span->getParentContext();
+ }
+
+ public function getTraceId(): string
+ {
+ return $this->getContext()->getTraceId();
+ }
+
+ public function getSpanId(): string
+ {
+ return $this->getContext()->getSpanId();
+ }
+
+ public function getParentSpanId(): string
+ {
+ return $this->getParentContext()->getSpanId();
+ }
+
+ public function getStartEpochNanos(): int
+ {
+ return $this->span->getStartEpochNanos();
+ }
+
+ public function getEndEpochNanos(): int
+ {
+ return $this->endEpochNanos;
+ }
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface
+ {
+ return $this->span->getInstrumentationScope();
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->span->getResource();
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /** @inheritDoc */
+ public function getLinks(): array
+ {
+ return $this->links;
+ }
+
+ /** @inheritDoc */
+ public function getEvents(): array
+ {
+ return $this->events;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+
+ public function getTotalDroppedEvents(): int
+ {
+ return max(0, $this->totalRecordedEvents - count($this->events));
+ }
+
+ public function getTotalDroppedLinks(): int
+ {
+ return max(0, $this->span->getTotalRecordedLinks() - count($this->links));
+ }
+
+ public function getStatus(): StatusDataInterface
+ {
+ return $this->status;
+ }
+
+ public function hasEnded(): bool
+ {
+ return $this->hasEnded;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Link.php b/vendor/open-telemetry/sdk/Trace/Link.php
new file mode 100644
index 000000000..9927839e7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Link.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class Link implements LinkInterface
+{
+ private AttributesInterface $attributes;
+ private API\SpanContextInterface $context;
+
+ public function __construct(API\SpanContextInterface $context, AttributesInterface $attributes)
+ {
+ $this->context = $context;
+ $this->attributes = $attributes;
+ }
+
+ public function getSpanContext(): API\SpanContextInterface
+ {
+ return $this->context;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/LinkInterface.php b/vendor/open-telemetry/sdk/Trace/LinkInterface.php
new file mode 100644
index 000000000..8090fa1a5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/LinkInterface.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+interface LinkInterface
+{
+ public function getSpanContext(): SpanContextInterface;
+ public function getAttributes(): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php b/vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php
new file mode 100644
index 000000000..7cd4d4e7d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+class NoopTracerProvider extends API\Trace\NoopTracerProvider implements TracerProviderInterface
+{
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php b/vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php
new file mode 100644
index 000000000..39767fb0f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace\SpanContextValidator;
+use Throwable;
+
+class RandomIdGenerator implements IdGeneratorInterface
+{
+ private const TRACE_ID_HEX_LENGTH = 32;
+ private const SPAN_ID_HEX_LENGTH = 16;
+
+ public function generateTraceId(): string
+ {
+ do {
+ $traceId = $this->randomHex(self::TRACE_ID_HEX_LENGTH);
+ } while (!SpanContextValidator::isValidTraceId($traceId));
+
+ return $traceId;
+ }
+
+ public function generateSpanId(): string
+ {
+ do {
+ $spanId = $this->randomHex(self::SPAN_ID_HEX_LENGTH);
+ } while (!SpanContextValidator::isValidSpanId($spanId));
+
+ return $spanId;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion $hexLength is always a positive integer
+ */
+ private function randomHex(int $hexLength): string
+ {
+ try {
+ return bin2hex(random_bytes(intdiv($hexLength, 2)));
+ } catch (Throwable $e) {
+ return $this->fallbackAlgorithm($hexLength);
+ }
+ }
+
+ private function fallbackAlgorithm(int $hexLength): string
+ {
+ return substr(str_shuffle(str_repeat('0123456789abcdef', $hexLength)), 1, $hexLength);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php b/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php
new file mode 100644
index 000000000..60940ac01
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+
+interface ReadWriteSpanInterface extends API\SpanInterface, ReadableSpanInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php b/vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php
new file mode 100644
index 000000000..40704ab4e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk.md#additional-span-interfaces
+ */
+interface ReadableSpanInterface
+{
+ public function getName(): string;
+
+ public function getContext(): API\SpanContextInterface;
+
+ public function getParentContext(): API\SpanContextInterface;
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface;
+
+ public function hasEnded(): bool;
+
+ /**
+ * Returns an immutable representation of this instance.
+ */
+ public function toSpanData(): SpanDataInterface;
+
+ /**
+ * Returns the duration of the {@see API\SpanInterface} in nanoseconds.
+ * If still active, returns `now() - start`.
+ */
+ public function getDuration(): int;
+
+ /**
+ * @see API\SpanKind
+ */
+ public function getKind(): int;
+
+ /**
+ * Returns the value of the attribute with the provided *key*.
+ * Returns `null` if there are no attributes set, or no attribute with that key exists.
+ *
+ * @return mixed
+ */
+ public function getAttribute(string $key);
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php
new file mode 100644
index 000000000..ee7e70a56
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * This implementation of the SamplerInterface always skips record.
+ * Example:
+ * ```
+ * use OpenTelemetry\Sdk\Trace\AlwaysOffSampler;
+ * $sampler = new AlwaysOffSampler();
+ * ```
+ */
+class AlwaysOffSampler implements SamplerInterface
+{
+ /**
+ * Returns false because we never want to sample.
+ * {@inheritdoc}
+ */
+ public function shouldSample(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ array $links
+ ): SamplingResult {
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+ $traceState = $parentSpanContext->getTraceState();
+
+ return new SamplingResult(
+ SamplingResult::DROP,
+ [],
+ $traceState
+ );
+ }
+
+ public function getDescription(): string
+ {
+ return 'AlwaysOffSampler';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php
new file mode 100644
index 000000000..df61d1aee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * This implementation of the SamplerInterface always records.
+ * Example:
+ * ```
+ * use OpenTelemetry\Sdk\Trace\AlwaysOnSampler;
+ * $sampler = new AlwaysOnSampler();
+ * ```
+ */
+class AlwaysOnSampler implements SamplerInterface
+{
+ /**
+ * Returns true because we always want to sample.
+ * {@inheritdoc}
+ */
+ public function shouldSample(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ array $links
+ ): SamplingResult {
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+ $traceState = $parentSpanContext->getTraceState();
+
+ return new SamplingResult(
+ SamplingResult::RECORD_AND_SAMPLE,
+ [],
+ $traceState
+ );
+ }
+
+ public function getDescription(): string
+ {
+ return 'AlwaysOnSampler';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php b/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php
new file mode 100644
index 000000000..db801d3d8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php
@@ -0,0 +1,100 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * Phan seems to struggle with the variadic arguments in the latest version
+ * @phan-file-suppress PhanParamTooFewUnpack
+ */
+
+/**
+ * This implementation of the SamplerInterface that respects parent context's sampling decision
+ * and delegates for the root span.
+ * Example:
+ * ```
+ * use OpenTelemetry\API\Trace\ParentBased;
+ * use OpenTelemetry\API\Trace\AlwaysOnSampler
+ *
+ * $rootSampler = new AlwaysOnSampler();
+ * $sampler = new ParentBased($rootSampler);
+ * ```
+ */
+class ParentBased implements SamplerInterface
+{
+ private SamplerInterface $root;
+
+ private SamplerInterface $remoteParentSampler;
+
+ private SamplerInterface $remoteParentNotSampler;
+
+ private SamplerInterface $localParentSampler;
+
+ private SamplerInterface $localParentNotSampler;
+
+ /**
+ * ParentBased sampler delegates the sampling decision based on the parent context.
+ *
+ * @param SamplerInterface $root Sampler called for the span with no parent (root span).
+ * @param SamplerInterface|null $remoteParentSampler Sampler called for the span with the remote sampled parent. When null, `AlwaysOnSampler` is used.
+ * @param SamplerInterface|null $remoteParentNotSampler Sampler called for the span with the remote not sampled parent. When null, `AlwaysOffSampler` is used.
+ * @param SamplerInterface|null $localParentSampler Sampler called for the span with local the sampled parent. When null, `AlwaysOnSampler` is used.
+ * @param SamplerInterface|null $localParentNotSampler Sampler called for the span with the local not sampled parent. When null, `AlwaysOffSampler` is used.
+ */
+ public function __construct(
+ SamplerInterface $root,
+ ?SamplerInterface $remoteParentSampler = null,
+ ?SamplerInterface $remoteParentNotSampler = null,
+ ?SamplerInterface $localParentSampler = null,
+ ?SamplerInterface $localParentNotSampler = null
+ ) {
+ $this->root = $root;
+ $this->remoteParentSampler = $remoteParentSampler ?? new AlwaysOnSampler();
+ $this->remoteParentNotSampler = $remoteParentNotSampler ?? new AlwaysOffSampler();
+ $this->localParentSampler = $localParentSampler ?? new AlwaysOnSampler();
+ $this->localParentNotSampler = $localParentNotSampler ?? new AlwaysOffSampler();
+ }
+
+ /**
+ * Invokes the respective delegate sampler when parent is set or uses root sampler for the root span.
+ * {@inheritdoc}
+ */
+ public function shouldSample(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ array $links
+ ): SamplingResult {
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+
+ // Invalid parent SpanContext indicates root span is being created
+ if (!$parentSpanContext->isValid()) {
+ return $this->root->shouldSample(...func_get_args());
+ }
+
+ if ($parentSpanContext->isRemote()) {
+ return $parentSpanContext->isSampled()
+ ? $this->remoteParentSampler->shouldSample(...func_get_args())
+ : $this->remoteParentNotSampler->shouldSample(...func_get_args());
+ }
+
+ return $parentSpanContext->isSampled()
+ ? $this->localParentSampler->shouldSample(...func_get_args())
+ : $this->localParentNotSampler->shouldSample(...func_get_args());
+ }
+
+ public function getDescription(): string
+ {
+ return 'ParentBased+' . $this->root->getDescription();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php b/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php
new file mode 100644
index 000000000..c11a90d5d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php
@@ -0,0 +1,70 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use InvalidArgumentException;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * This implementation of the SamplerInterface records with given probability.
+ * Example:
+ * ```
+ * use OpenTelemetry\API\Trace\TraceIdRatioBasedSampler;
+ * $sampler = new TraceIdRatioBasedSampler(0.01);
+ * ```
+ */
+class TraceIdRatioBasedSampler implements SamplerInterface
+{
+ private float $probability;
+
+ /**
+ * TraceIdRatioBasedSampler constructor.
+ * @param float $probability Probability float value between 0.0 and 1.0.
+ */
+ public function __construct(float $probability)
+ {
+ if ($probability < 0.0 || $probability > 1.0) {
+ throw new InvalidArgumentException('probability should be be between 0.0 and 1.0.');
+ }
+ $this->probability = $probability;
+ }
+
+ /**
+ * Returns `SamplingResult` based on probability. Respects the parent `SampleFlag`
+ * {@inheritdoc}
+ */
+ public function shouldSample(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ array $links
+ ): SamplingResult {
+ // TODO: Add config to adjust which spans get sampled (only default from specification is implemented)
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+ $traceState = $parentSpanContext->getTraceState();
+
+ /**
+ * Since php can only store up to 63 bit positive integers
+ */
+ $traceIdLimit = (1 << 60) - 1;
+ $lowerOrderBytes = hexdec(substr($traceId, strlen($traceId) - 15, 15));
+ $traceIdCondition = $lowerOrderBytes < round($this->probability * $traceIdLimit);
+ $decision = $traceIdCondition ? SamplingResult::RECORD_AND_SAMPLE : SamplingResult::DROP;
+
+ return new SamplingResult($decision, [], $traceState);
+ }
+
+ public function getDescription(): string
+ {
+ return sprintf('%s{%.6F}', 'TraceIdRatioBasedSampler', $this->probability);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SamplerFactory.php b/vendor/open-telemetry/sdk/Trace/SamplerFactory.php
new file mode 100644
index 000000000..f99674d79
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SamplerFactory.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SDK\Trace\Sampler\AlwaysOffSampler;
+use OpenTelemetry\SDK\Trace\Sampler\AlwaysOnSampler;
+use OpenTelemetry\SDK\Trace\Sampler\ParentBased;
+use OpenTelemetry\SDK\Trace\Sampler\TraceIdRatioBasedSampler;
+
+class SamplerFactory
+{
+ private const TRACEIDRATIO_PREFIX = 'traceidratio';
+
+ public function create(): SamplerInterface
+ {
+ $name = Configuration::getString(Env::OTEL_TRACES_SAMPLER);
+
+ if (strpos($name, self::TRACEIDRATIO_PREFIX) !== false) {
+ $arg = Configuration::getRatio(Env::OTEL_TRACES_SAMPLER_ARG);
+
+ switch ($name) {
+ case Values::VALUE_TRACE_ID_RATIO:
+ return new TraceIdRatioBasedSampler($arg);
+ case Values::VALUE_PARENT_BASED_TRACE_ID_RATIO:
+ return new ParentBased(new TraceIdRatioBasedSampler($arg));
+ }
+ }
+
+ switch ($name) {
+ case Values::VALUE_ALWAYS_ON:
+ return new AlwaysOnSampler();
+ case Values::VALUE_ALWAYS_OFF:
+ return new AlwaysOffSampler();
+ case Values::VALUE_PARENT_BASED_ALWAYS_ON:
+ return new ParentBased(new AlwaysOnSampler());
+ case Values::VALUE_PARENT_BASED_ALWAYS_OFF:
+ return new ParentBased(new AlwaysOffSampler());
+ default:
+ throw new InvalidArgumentException(sprintf('Unknown sampler: %s', $name));
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SamplerInterface.php b/vendor/open-telemetry/sdk/Trace/SamplerInterface.php
new file mode 100644
index 000000000..de1147fa6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SamplerInterface.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * This interface is used to organize sampling logic.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampler
+ */
+interface SamplerInterface
+{
+ /**
+ * Returns SamplingResult.
+ *
+ * @param ContextInterface $parentContext Context with parent Span. The Span's SpanContext may be invalid to indicate a root span.
+ * @param string $traceId TraceId of the Span to be created. It can be different from the TraceId in the SpanContext.
+ * Typically in situations when the Span to be created starts a new Trace.
+ * @param string $spanName Name of the Span to be created.
+ * @param int $spanKind Span kind.
+ * @param AttributesInterface $attributes Initial set of Attributes for the Span being constructed.
+ * @param list<LinkInterface> $links Collection of links that will be associated with the Span to be created.
+ * Typically, useful for batch operations.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#links-between-spans
+ * @return SamplingResult
+ */
+ public function shouldSample(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ array $links
+ ): SamplingResult;
+
+ /**
+ * Returns the sampler name or short description with the configuration.
+ * This may be displayed on debug pages or in the logs.
+ * Example: "TraceIdRatioBasedSampler{0.000100}"
+ */
+ public function getDescription(): string;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SamplingResult.php b/vendor/open-telemetry/sdk/Trace/SamplingResult.php
new file mode 100644
index 000000000..5701b7bc6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SamplingResult.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+
+final class SamplingResult
+{
+ /**
+ * Span will not be recorded and all events and attributes will be dropped.
+ */
+ public const DROP = 0;
+
+ /**
+ * Span will be recorded but SpanExporters will not receive this Span.
+ */
+ public const RECORD_ONLY = 1;
+
+ /**
+ * Span will be recorder and exported.
+ */
+ public const RECORD_AND_SAMPLE = 2;
+
+ /**
+ * @var int A sampling Decision.
+ */
+ private int $decision;
+
+ /**
+ * @var iterable A set of span Attributes that will also be added to the Span.
+ */
+ private iterable $attributes;
+
+ /**
+ * @var ?API\TraceStateInterface A Tracestate that will be associated with the Span through the new SpanContext.
+ */
+ private ?API\TraceStateInterface $traceState;
+
+ public function __construct(int $decision, iterable $attributes = [], ?API\TraceStateInterface $traceState = null)
+ {
+ $this->decision = $decision;
+ $this->attributes = $attributes;
+ $this->traceState = $traceState;
+ }
+
+ /**
+ * Return sampling decision whether span should be recorded or not.
+ */
+ public function getDecision(): int
+ {
+ return $this->decision;
+ }
+
+ /**
+ * Return attributes which will be attached to the span.
+ */
+ public function getAttributes(): iterable
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Return a collection of links that will be associated with the Span to be created.
+ */
+ public function getTraceState(): ?API\TraceStateInterface
+ {
+ return $this->traceState;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Span.php b/vendor/open-telemetry/sdk/Trace/Span.php
new file mode 100644
index 000000000..f72ec1bd7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Span.php
@@ -0,0 +1,359 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function get_class;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesBuilderInterface;
+use OpenTelemetry\SDK\Common\Dev\Compatibility\Util as BcUtil;
+use OpenTelemetry\SDK\Common\Exception\StackTraceFormatter;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use Throwable;
+
+final class Span extends API\Span implements ReadWriteSpanInterface
+{
+
+ /** @readonly */
+ private API\SpanContextInterface $context;
+
+ /** @readonly */
+ private API\SpanContextInterface $parentSpanContext;
+
+ /** @readonly */
+ private SpanLimits $spanLimits;
+
+ /** @readonly */
+ private SpanProcessorInterface $spanProcessor;
+
+ /**
+ * @readonly
+ *
+ * @var list<LinkInterface>
+ */
+ private array $links;
+
+ /** @readonly */
+ private int $totalRecordedLinks;
+
+ /** @readonly */
+ private int $kind;
+
+ /** @readonly */
+ private ResourceInfo $resource;
+
+ /** @readonly */
+ private InstrumentationScopeInterface $instrumentationScope;
+
+ /** @readonly */
+ private int $startEpochNanos;
+
+ /** @var non-empty-string */
+ private string $name;
+
+ /** @var list<EventInterface> */
+ private array $events = [];
+
+ private AttributesBuilderInterface $attributesBuilder;
+ private int $totalRecordedEvents = 0;
+ private StatusDataInterface $status;
+ private int $endEpochNanos = 0;
+ private bool $hasEnded = false;
+
+ /**
+ * @param non-empty-string $name
+ * @param list<LinkInterface> $links
+ */
+ private function __construct(
+ string $name,
+ API\SpanContextInterface $context,
+ InstrumentationScopeInterface $instrumentationScope,
+ int $kind,
+ API\SpanContextInterface $parentSpanContext,
+ SpanLimits $spanLimits,
+ SpanProcessorInterface $spanProcessor,
+ ResourceInfo $resource,
+ AttributesBuilderInterface $attributesBuilder,
+ array $links,
+ int $totalRecordedLinks,
+ int $startEpochNanos
+ ) {
+ $this->context = $context;
+ $this->instrumentationScope = $instrumentationScope;
+ $this->parentSpanContext = $parentSpanContext;
+ $this->links = $links;
+ $this->totalRecordedLinks = $totalRecordedLinks;
+ $this->name = $name;
+ $this->kind = $kind;
+ $this->spanProcessor = $spanProcessor;
+ $this->resource = $resource;
+ $this->startEpochNanos = $startEpochNanos;
+ $this->attributesBuilder = $attributesBuilder;
+ $this->status = StatusData::unset();
+ $this->spanLimits = $spanLimits;
+ }
+
+ /**
+ * This method _MUST_ not be used directly.
+ * End users should use a {@see API\TracerInterface} in order to create spans.
+ *
+ * @param non-empty-string $name
+ * @psalm-param API\SpanKind::KIND_* $kind
+ * @param list<LinkInterface> $links
+ *
+ * @internal
+ * @psalm-internal OpenTelemetry
+ */
+ public static function startSpan(
+ string $name,
+ API\SpanContextInterface $context,
+ InstrumentationScopeInterface $instrumentationScope,
+ int $kind,
+ API\SpanInterface $parentSpan,
+ ContextInterface $parentContext,
+ SpanLimits $spanLimits,
+ SpanProcessorInterface $spanProcessor,
+ ResourceInfo $resource,
+ AttributesBuilderInterface $attributesBuilder,
+ array $links,
+ int $totalRecordedLinks,
+ int $startEpochNanos
+ ): self {
+ $span = new self(
+ $name,
+ $context,
+ $instrumentationScope,
+ $kind,
+ $parentSpan->getContext(),
+ $spanLimits,
+ $spanProcessor,
+ $resource,
+ $attributesBuilder,
+ $links,
+ $totalRecordedLinks,
+ $startEpochNanos !== 0 ? $startEpochNanos : ClockFactory::getDefault()->now()
+ );
+
+ // Call onStart here to ensure the span is fully initialized.
+ $spanProcessor->onStart($span, $parentContext);
+
+ return $span;
+ }
+
+ /**
+ * Backward compatibility methods
+ *
+ * @codeCoverageIgnore
+ */
+ public static function formatStackTrace(Throwable $e, array &$seen = null): string
+ {
+ BcUtil::triggerMethodDeprecationNotice(
+ __METHOD__,
+ 'format',
+ StackTraceFormatter::class
+ );
+
+ return StackTraceFormatter::format($e);
+ }
+
+ /** @inheritDoc */
+ public function getContext(): API\SpanContextInterface
+ {
+ return $this->context;
+ }
+
+ /** @inheritDoc */
+ public function isRecording(): bool
+ {
+ return !$this->hasEnded;
+ }
+
+ /** @inheritDoc */
+ public function setAttribute(string $key, $value): self
+ {
+ if ($this->hasEnded) {
+ return $this;
+ }
+
+ $this->attributesBuilder[$key] = $value;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setAttributes(iterable $attributes): self
+ {
+ foreach ($attributes as $key => $value) {
+ $this->attributesBuilder[$key] = $value;
+ }
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function addEvent(string $name, iterable $attributes = [], ?int $timestamp = null): self
+ {
+ if ($this->hasEnded) {
+ return $this;
+ }
+ if (++$this->totalRecordedEvents > $this->spanLimits->getEventCountLimit()) {
+ return $this;
+ }
+
+ $timestamp ??= ClockFactory::getDefault()->now();
+ $eventAttributesBuilder = $this->spanLimits->getEventAttributesFactory()->builder($attributes);
+
+ $this->events[] = new Event($name, $timestamp, $eventAttributesBuilder->build());
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function recordException(Throwable $exception, iterable $attributes = [], ?int $timestamp = null): self
+ {
+ if ($this->hasEnded) {
+ return $this;
+ }
+ if (++$this->totalRecordedEvents > $this->spanLimits->getEventCountLimit()) {
+ return $this;
+ }
+
+ $timestamp ??= ClockFactory::getDefault()->now();
+ $eventAttributesBuilder = $this->spanLimits->getEventAttributesFactory()->builder([
+ 'exception.type' => get_class($exception),
+ 'exception.message' => $exception->getMessage(),
+ 'exception.stacktrace' => StackTraceFormatter::format($exception),
+ ]);
+
+ foreach ($attributes as $key => $value) {
+ $eventAttributesBuilder[$key] = $value;
+ }
+
+ $this->events[] = new Event('exception', $timestamp, $eventAttributesBuilder->build());
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function updateName(string $name): self
+ {
+ if ($this->hasEnded) {
+ return $this;
+ }
+ $this->name = $name;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setStatus(string $code, string $description = null): self
+ {
+ if ($this->hasEnded) {
+ return $this;
+ }
+
+ // An attempt to set value Unset SHOULD be ignored.
+ if ($code === API\StatusCode::STATUS_UNSET) {
+ return $this;
+ }
+
+ // When span status is set to Ok it SHOULD be considered final and any further attempts to change it SHOULD be ignored.
+ if ($this->status->getCode() === API\StatusCode::STATUS_OK) {
+ return $this;
+ }
+ $this->status = StatusData::create($code, $description);
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function end(int $endEpochNanos = null): void
+ {
+ if ($this->hasEnded) {
+ return;
+ }
+
+ $this->endEpochNanos = $endEpochNanos ?? ClockFactory::getDefault()->now();
+ $this->hasEnded = true;
+
+ $this->spanProcessor->onEnd($this);
+ }
+
+ /** @inheritDoc */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function getParentContext(): API\SpanContextInterface
+ {
+ return $this->parentSpanContext;
+ }
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface
+ {
+ return $this->instrumentationScope;
+ }
+
+ public function hasEnded(): bool
+ {
+ return $this->hasEnded;
+ }
+
+ public function toSpanData(): SpanDataInterface
+ {
+ return new ImmutableSpan(
+ $this,
+ $this->name,
+ $this->links,
+ $this->events,
+ $this->attributesBuilder->build(),
+ $this->totalRecordedEvents,
+ $this->status,
+ $this->endEpochNanos,
+ $this->hasEnded
+ );
+ }
+
+ /** @inheritDoc */
+ public function getDuration(): int
+ {
+ return ($this->hasEnded ? $this->endEpochNanos : ClockFactory::getDefault()->now()) - $this->startEpochNanos;
+ }
+
+ /** @inheritDoc */
+ public function getKind(): int
+ {
+ return $this->kind;
+ }
+
+ /** @inheritDoc */
+ public function getAttribute(string $key)
+ {
+ return $this->attributesBuilder[$key];
+ }
+
+ public function getStartEpochNanos(): int
+ {
+ return $this->startEpochNanos;
+ }
+
+ public function getTotalRecordedLinks(): int
+ {
+ return $this->totalRecordedLinks;
+ }
+
+ public function getTotalRecordedEvents(): int
+ {
+ return $this->totalRecordedEvents;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->resource;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanBuilder.php b/vendor/open-telemetry/sdk/Trace/SpanBuilder.php
new file mode 100644
index 000000000..2867c01c8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanBuilder.php
@@ -0,0 +1,191 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function in_array;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesBuilderInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+final class SpanBuilder implements API\SpanBuilderInterface
+{
+ /**
+ * @var non-empty-string
+ * @readonly
+ */
+ private string $spanName;
+
+ /** @readonly */
+ private InstrumentationScopeInterface $instrumentationScope;
+
+ /** @readonly */
+ private TracerSharedState $tracerSharedState;
+
+ /** @var ContextInterface|false|null */
+ private $parentContext = null;
+
+ /**
+ * @psalm-var API\SpanKind::KIND_*
+ */
+ private int $spanKind = API\SpanKind::KIND_INTERNAL;
+
+ /** @var list<LinkInterface> */
+ private array $links = [];
+
+ private AttributesBuilderInterface $attributesBuilder;
+ private int $totalNumberOfLinksAdded = 0;
+ private int $startEpochNanos = 0;
+
+ /** @param non-empty-string $spanName */
+ public function __construct(
+ string $spanName,
+ InstrumentationScopeInterface $instrumentationScope,
+ TracerSharedState $tracerSharedState
+ ) {
+ $this->spanName = $spanName;
+ $this->instrumentationScope = $instrumentationScope;
+ $this->tracerSharedState = $tracerSharedState;
+ $this->attributesBuilder = $tracerSharedState->getSpanLimits()->getAttributesFactory()->builder();
+ }
+
+ /** @inheritDoc */
+ public function setParent($context): API\SpanBuilderInterface
+ {
+ $this->parentContext = $context;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function addLink(API\SpanContextInterface $context, iterable $attributes = []): API\SpanBuilderInterface
+ {
+ if (!$context->isValid()) {
+ return $this;
+ }
+
+ $this->totalNumberOfLinksAdded++;
+
+ if (count($this->links) === $this->tracerSharedState->getSpanLimits()->getLinkCountLimit()) {
+ return $this;
+ }
+
+ $this->links[] = new Link(
+ $context,
+ $this->tracerSharedState
+ ->getSpanLimits()
+ ->getLinkAttributesFactory()
+ ->builder($attributes)
+ ->build(),
+ );
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setAttribute(string $key, $value): API\SpanBuilderInterface
+ {
+ $this->attributesBuilder[$key] = $value;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setAttributes(iterable $attributes): API\SpanBuilderInterface
+ {
+ foreach ($attributes as $key => $value) {
+ $this->attributesBuilder[$key] = $value;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @psalm-param API\SpanKind::KIND_* $spanKind
+ */
+ public function setSpanKind(int $spanKind): API\SpanBuilderInterface
+ {
+ $this->spanKind = $spanKind;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setStartTimestamp(int $timestampNanos): API\SpanBuilderInterface
+ {
+ if (0 > $timestampNanos) {
+ return $this;
+ }
+
+ $this->startEpochNanos = $timestampNanos;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function startSpan(): API\SpanInterface
+ {
+ $parentContext = Context::resolve($this->parentContext);
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+
+ $spanId = $this->tracerSharedState->getIdGenerator()->generateSpanId();
+
+ if (!$parentSpanContext->isValid()) {
+ $traceId = $this->tracerSharedState->getIdGenerator()->generateTraceId();
+ } else {
+ $traceId = $parentSpanContext->getTraceId();
+ }
+
+ $samplingResult = $this
+ ->tracerSharedState
+ ->getSampler()
+ ->shouldSample(
+ $parentContext,
+ $traceId,
+ $this->spanName,
+ $this->spanKind,
+ $this->attributesBuilder->build(),
+ $this->links,
+ );
+ $samplingDecision = $samplingResult->getDecision();
+ $samplingResultTraceState = $samplingResult->getTraceState();
+
+ $spanContext = API\SpanContext::create(
+ $traceId,
+ $spanId,
+ SamplingResult::RECORD_AND_SAMPLE === $samplingDecision ? API\TraceFlags::SAMPLED : API\TraceFlags::DEFAULT,
+ $samplingResultTraceState,
+ );
+
+ if (!in_array($samplingDecision, [SamplingResult::RECORD_AND_SAMPLE, SamplingResult::RECORD_ONLY], true)) {
+ return Span::wrap($spanContext);
+ }
+
+ $attributesBuilder = clone $this->attributesBuilder;
+ foreach ($samplingResult->getAttributes() as $key => $value) {
+ $attributesBuilder[$key] = $value;
+ }
+
+ return Span::startSpan(
+ $this->spanName,
+ $spanContext,
+ $this->instrumentationScope,
+ $this->spanKind,
+ $parentSpan,
+ $parentContext,
+ $this->tracerSharedState->getSpanLimits(),
+ $this->tracerSharedState->getSpanProcessor(),
+ $this->tracerSharedState->getResource(),
+ $attributesBuilder,
+ $this->links,
+ $this->totalNumberOfLinksAdded,
+ $this->startEpochNanos
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php b/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php
new file mode 100644
index 000000000..40552e440
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+interface SpanConverterInterface
+{
+ public function convert(iterable $spans): array;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanDataInterface.php b/vendor/open-telemetry/sdk/Trace/SpanDataInterface.php
new file mode 100644
index 000000000..37132b9e5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanDataInterface.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * Represents an immutable snapshot of a {@see API\SpanInterface}.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk.md#additional-span-interfaces
+ */
+interface SpanDataInterface
+{
+ public function getName(): string;
+ public function getKind(): int;
+ public function getContext(): API\SpanContextInterface;
+ public function getParentContext(): API\SpanContextInterface;
+ public function getTraceId(): string;
+ public function getSpanId(): string;
+ public function getParentSpanId(): string;
+ public function getStatus(): StatusDataInterface;
+ public function getStartEpochNanos(): int;
+ public function getAttributes(): AttributesInterface;
+
+ /** @return list<EventInterface> */
+ public function getEvents(): array;
+
+ /** @return list<LinkInterface> */
+ public function getLinks(): array;
+
+ public function getEndEpochNanos(): int;
+ public function hasEnded(): bool;
+ public function getInstrumentationScope(): InstrumentationScopeInterface;
+ public function getResource(): ResourceInfo;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk_exporters/non-otlp.md#dropped-events-count */
+ public function getTotalDroppedEvents(): int;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk_exporters/non-otlp.md#dropped-links-count */
+ public function getTotalDroppedLinks(): int;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php
new file mode 100644
index 000000000..42f49e815
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterDecoratorTrait;
+
+abstract class AbstractDecorator
+{
+ use SpanExporterDecoratorTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php
new file mode 100644
index 000000000..482d122cc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use JsonException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\Behavior\UsesSpanConverterTrait;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class ConsoleSpanExporter implements SpanExporterInterface
+{
+ use UsesSpanConverterTrait;
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+
+ public function __construct(TransportInterface $transport, ?SpanConverterInterface $converter = null)
+ {
+ $this->transport = $transport;
+ $this->setSpanConverter($converter ?? new FriendlySpanConverter());
+ }
+
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ $payload = '';
+ foreach ($batch as $span) {
+ try {
+ $payload .= json_encode(
+ $this->getSpanConverter()->convert([$span]),
+ JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT
+ ) . PHP_EOL;
+ } catch (JsonException $e) {
+ self::logWarning('Error converting span: ' . $e->getMessage());
+ }
+ }
+
+ return $this->transport->send($payload)
+ ->map(fn () => true)
+ ->catch(fn () => false);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->shutdown();
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->forceFlush();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php
new file mode 100644
index 000000000..7e45fb549
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Registry;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class ConsoleSpanExporterFactory implements SpanExporterFactoryInterface
+{
+ public function create(): SpanExporterInterface
+ {
+ $transport = Registry::transportFactory('stream')->create('php://stdout', 'application/json');
+
+ return new ConsoleSpanExporter($transport);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php
new file mode 100644
index 000000000..1f8178e10
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php
@@ -0,0 +1,173 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\API\Trace\SpanKind;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Trace\EventInterface;
+use OpenTelemetry\SDK\Trace\LinkInterface;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\StatusDataInterface;
+use ReflectionClass;
+
+class FriendlySpanConverter implements SpanConverterInterface
+{
+ private const NAME_ATTR = 'name';
+ private const CONTEXT_ATTR = 'context';
+ private const TRACE_ID_ATTR = 'trace_id';
+ private const SPAN_ID_ATTR = 'span_id';
+ private const TRACE_STATE_ATTR = 'trace_state';
+ private const RESOURCE_ATTR = 'resource';
+ private const PARENT_SPAN_ATTR = 'parent_span_id';
+ private const KIND_ATTR = 'kind';
+ private const START_ATTR = 'start';
+ private const END_ATTR = 'end';
+ private const ATTRIBUTES_ATTR = 'attributes';
+ private const STATUS_ATTR = 'status';
+ private const CODE_ATTR = 'code';
+ private const DESCRIPTION_ATTR = 'description';
+ private const EVENTS_ATTR = 'events';
+ private const TIMESTAMP_ATTR = 'timestamp';
+ private const LINKS_ATTR = 'links';
+
+ public function convert(iterable $spans): array
+ {
+ $aggregate = [];
+ foreach ($spans as $span) {
+ $aggregate[] = $this->convertSpan($span);
+ }
+
+ return $aggregate;
+ }
+
+ /**
+ * friendlySpan does the heavy lifting converting a span into an array
+ *
+ * @param SpanDataInterface $span
+ * @return array
+ */
+ private function convertSpan(SpanDataInterface $span): array
+ {
+ return [
+ self::NAME_ATTR => $span->getName(),
+ self::CONTEXT_ATTR => $this->convertContext($span->getContext()),
+ self::RESOURCE_ATTR => $this->convertResource($span->getResource()),
+ self::PARENT_SPAN_ATTR => $this->covertParentContext($span->getParentContext()),
+ self::KIND_ATTR => $this->convertKind($span->getKind()),
+ self::START_ATTR => $span->getStartEpochNanos(),
+ self::END_ATTR => $span->getEndEpochNanos(),
+ self::ATTRIBUTES_ATTR => $this->convertAttributes($span->getAttributes()),
+ self::STATUS_ATTR => $this->covertStatus($span->getStatus()),
+ self::EVENTS_ATTR => $this->convertEvents($span->getEvents()),
+ self::LINKS_ATTR => $this->convertLinks($span->getLinks()),
+ ];
+ }
+
+ /**
+ * @param SpanContextInterface $context
+ * @return array
+ */
+ private function convertContext(SpanContextInterface $context): array
+ {
+ return [
+ self::TRACE_ID_ATTR => $context->getTraceId(),
+ self::SPAN_ID_ATTR => $context->getSpanId(),
+ self::TRACE_STATE_ATTR => (string) $context->getTraceState(),
+ ];
+ }
+
+ /**
+ * @param ResourceInfo $resource
+ * @return array
+ */
+ private function convertResource(ResourceInfo $resource): array
+ {
+ return $resource->getAttributes()->toArray();
+ }
+
+ /**
+ * @param SpanContextInterface $context
+ * @return string
+ */
+ private function covertParentContext(SpanContextInterface $context): string
+ {
+ return $context->isValid() ? $context->getSpanId() : '';
+ }
+
+ /**
+ * Translates SpanKind from its integer representation to a more human friendly string.
+ *
+ * @param int $kind
+ * @return string
+ */
+ private function convertKind(int $kind): string
+ {
+ return array_flip(
+ (new ReflectionClass(SpanKind::class))
+ ->getConstants()
+ )[$kind];
+ }
+
+ /**
+ * @param \OpenTelemetry\SDK\Common\Attribute\AttributesInterface $attributes
+ * @return array
+ */
+ private function convertAttributes(AttributesInterface $attributes): array
+ {
+ return $attributes->toArray();
+ }
+
+ /**
+ * @param StatusDataInterface $status
+ * @return array
+ */
+ private function covertStatus(StatusDataInterface $status): array
+ {
+ return [
+ self::CODE_ATTR => $status->getCode(),
+ self::DESCRIPTION_ATTR => $status->getDescription(),
+ ];
+ }
+
+ /**
+ * @param array<EventInterface> $events
+ * @return array
+ */
+ private function convertEvents(array $events): array
+ {
+ $result = [];
+
+ foreach ($events as $event) {
+ $result[] = [
+ self::NAME_ATTR => $event->getName(),
+ self::TIMESTAMP_ATTR => $event->getEpochNanos(),
+ self::ATTRIBUTES_ATTR => $this->convertAttributes($event->getAttributes()),
+ ];
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param array<LinkInterface> $links
+ * @return array
+ */
+ private function convertLinks(array $links): array
+ {
+ $result = [];
+
+ foreach ($links as $link) {
+ $result[] = [
+ self::CONTEXT_ATTR => $this->convertContext($link->getSpanContext()),
+ self::ATTRIBUTES_ATTR => $this->convertAttributes($link->getAttributes()),
+ ];
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php
new file mode 100644
index 000000000..ebb022595
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use ArrayObject;
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterTrait;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class InMemoryExporter implements SpanExporterInterface
+{
+ use SpanExporterTrait;
+
+ private ArrayObject $storage;
+
+ public function __construct(?ArrayObject $storage = null)
+ {
+ $this->storage = $storage ?? new ArrayObject();
+ }
+
+ protected function doExport(iterable $spans): bool
+ {
+ foreach ($spans as $span) {
+ $this->storage[] = $span;
+ }
+
+ return true;
+ }
+
+ public function getSpans(): array
+ {
+ return (array) $this->storage;
+ }
+
+ public function getStorage(): ArrayObject
+ {
+ return $this->storage;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php
new file mode 100644
index 000000000..c19686fac
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class InMemorySpanExporterFactory implements SpanExporterFactoryInterface
+{
+ public function create(): SpanExporterInterface
+ {
+ return new InMemoryExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php
new file mode 100644
index 000000000..b7cf511a5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\Behavior\LoggerAwareTrait;
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterDecoratorTrait;
+use OpenTelemetry\SDK\Trace\Behavior\UsesSpanConverterTrait;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+use Psr\Log\NullLogger;
+
+class LoggerDecorator implements SpanExporterInterface, LoggerAwareInterface
+{
+ use SpanExporterDecoratorTrait;
+ use UsesSpanConverterTrait;
+ use LoggerAwareTrait;
+
+ public function __construct(
+ SpanExporterInterface $decorated,
+ ?LoggerInterface $logger = null,
+ ?SpanConverterInterface $converter = null
+ ) {
+ $this->setDecorated($decorated);
+ $this->setLogger($logger ?? new NullLogger());
+ $this->setSpanConverter($converter ?? new FriendlySpanConverter());
+ }
+
+ protected function beforeExport(iterable $spans): iterable
+ {
+ return $spans;
+ }
+
+ /**
+ * @param iterable $spans
+ * @param bool $exportSuccess
+ */
+ protected function afterExport(iterable $spans, bool $exportSuccess): void
+ {
+ if ($exportSuccess) {
+ $this->log(
+ 'Status Success',
+ $this->getSpanConverter()->convert($spans),
+ LogLevel::INFO,
+ );
+ } else {
+ $this->log(
+ 'Status Failed Retryable',
+ $this->getSpanConverter()->convert($spans),
+ LogLevel::ERROR,
+ );
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php
new file mode 100644
index 000000000..1969a5426
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php
@@ -0,0 +1,96 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\Behavior\LoggerAwareTrait;
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterTrait;
+use OpenTelemetry\SDK\Trace\Behavior\UsesSpanConverterTrait;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+use Psr\Log\NullLogger;
+use Throwable;
+
+class LoggerExporter implements SpanExporterInterface, LoggerAwareInterface
+{
+ use SpanExporterTrait;
+ use UsesSpanConverterTrait;
+ use LoggerAwareTrait;
+
+ public const GRANULARITY_AGGREGATE = 1;
+ public const GRANULARITY_SPAN = 2;
+
+ private string $serviceName;
+ private int $granularity = self::GRANULARITY_AGGREGATE;
+
+ /**
+ * @param string $serviceName
+ * @param LoggerInterface|null $logger
+ * @param string|null $defaultLogLevel
+ * @param SpanConverterInterface|null $converter
+ * @param int $granularity
+ */
+ public function __construct(
+ string $serviceName,
+ ?LoggerInterface $logger = null,
+ ?string $defaultLogLevel = LogLevel::DEBUG,
+ ?SpanConverterInterface $converter = null,
+ int $granularity = 1
+ ) {
+ $this->setServiceName($serviceName);
+ $this->setLogger($logger ?? new NullLogger());
+ $this->setDefaultLogLevel($defaultLogLevel ?? LogLevel::DEBUG);
+ $this->setSpanConverter($converter ?? new FriendlySpanConverter());
+ $this->setGranularity($granularity);
+ }
+
+ /** @inheritDoc */
+ public function doExport(iterable $spans): bool
+ {
+ try {
+ $this->doLog($spans);
+ } catch (Throwable $t) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * @param string $serviceName
+ */
+ private function setServiceName(string $serviceName): void
+ {
+ $this->serviceName = $serviceName;
+ }
+
+ /**
+ * @param int $granularity
+ */
+ public function setGranularity(int $granularity): void
+ {
+ $this->granularity = $granularity === self::GRANULARITY_SPAN
+ ? self::GRANULARITY_SPAN
+ : self::GRANULARITY_AGGREGATE;
+ }
+
+ /**
+ * @param iterable $spans
+ */
+ private function doLog(iterable $spans): void
+ {
+ if ($this->granularity === self::GRANULARITY_AGGREGATE) {
+ $this->log($this->serviceName, $this->getSpanConverter()->convert($spans));
+
+ return;
+ }
+
+ foreach ($spans as $span) {
+ $this->log($this->serviceName, $this->getSpanConverter()->convert([$span]));
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php
new file mode 100644
index 000000000..1e55431a8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+
+class NullSpanConverter implements SpanConverterInterface
+{
+ public function convert(iterable $spans): array
+ {
+ return [[]];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php
new file mode 100644
index 000000000..8d44b35eb
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+interface SpanExporterFactoryInterface
+{
+ public function create(): SpanExporterInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php
new file mode 100644
index 000000000..aad07be42
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php
@@ -0,0 +1,7 @@
+<?php
+
+declare(strict_types=1);
+\OpenTelemetry\SDK\Registry::registerSpanExporterFactory('console', \OpenTelemetry\SDK\Trace\SpanExporter\ConsoleSpanExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerSpanExporterFactory('memory', \OpenTelemetry\SDK\Trace\SpanExporter\InMemorySpanExporterFactory::class);
+
+\OpenTelemetry\SDK\Registry::registerTransportFactory('stream', \OpenTelemetry\SDK\Common\Export\Stream\StreamTransportFactory::class);
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php b/vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php
new file mode 100644
index 000000000..fca336896
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#span-exporter
+ */
+interface SpanExporterInterface
+{
+ /**
+ * @param iterable<SpanDataInterface> $batch Batch of spans to export
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#exportbatch
+ *
+ * @psalm-return FutureInterface<bool>
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#shutdown-2 */
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-2 */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanLimits.php b/vendor/open-telemetry/sdk/Trace/SpanLimits.php
new file mode 100644
index 000000000..4b07649fc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanLimits.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+
+final class SpanLimits
+{
+ public const DEFAULT_SPAN_ATTRIBUTE_LENGTH_LIMIT = PHP_INT_MAX;
+ public const DEFAULT_SPAN_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const DEFAULT_SPAN_EVENT_COUNT_LIMIT = 128;
+ public const DEFAULT_SPAN_LINK_COUNT_LIMIT = 128;
+ public const DEFAULT_EVENT_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const DEFAULT_LINK_ATTRIBUTE_COUNT_LIMIT = 128;
+
+ private AttributesFactoryInterface $attributesFactory;
+ private AttributesFactoryInterface $eventAttributesFactory;
+ private AttributesFactoryInterface $linkAttributesFactory;
+ private int $eventCountLimit;
+ private int $linkCountLimit;
+
+ public function getAttributesFactory(): AttributesFactoryInterface
+ {
+ return $this->attributesFactory;
+ }
+
+ public function getEventAttributesFactory(): AttributesFactoryInterface
+ {
+ return $this->eventAttributesFactory;
+ }
+
+ public function getLinkAttributesFactory(): AttributesFactoryInterface
+ {
+ return $this->linkAttributesFactory;
+ }
+
+ /** @return int Maximum allowed span event count */
+ public function getEventCountLimit(): int
+ {
+ return $this->eventCountLimit;
+ }
+
+ /** @return int Maximum allowed span link count */
+ public function getLinkCountLimit(): int
+ {
+ return $this->linkCountLimit;
+ }
+
+ /**
+ * @internal Use {@see SpanLimitsBuilder} to create {@see SpanLimits} instance.
+ */
+ public function __construct(
+ AttributesFactoryInterface $attributesFactory,
+ AttributesFactoryInterface $eventAttributesFactory,
+ AttributesFactoryInterface $linkAttributesFactory,
+ int $eventCountLimit,
+ int $linkCountLimit
+ ) {
+ $this->attributesFactory = $attributesFactory;
+ $this->eventAttributesFactory = $eventAttributesFactory;
+ $this->linkAttributesFactory = $linkAttributesFactory;
+ $this->eventCountLimit = $eventCountLimit;
+ $this->linkCountLimit = $linkCountLimit;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php b/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php
new file mode 100644
index 000000000..11ed5a82b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php
@@ -0,0 +1,148 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\FilteredAttributesFactory;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SemConv\TraceAttributes;
+use const PHP_INT_MAX;
+
+class SpanLimitsBuilder
+{
+ /** @var ?int Maximum allowed attribute count per record */
+ private ?int $attributeCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute value length */
+ private ?int $attributeValueLengthLimit = null;
+
+ /** @var ?int Maximum allowed span event count */
+ private ?int $eventCountLimit = null;
+
+ /** @var ?int Maximum allowed span link count */
+ private ?int $linkCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute per span event count */
+ private ?int $attributePerEventCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute per span link count */
+ private ?int $attributePerLinkCountLimit = null;
+
+ private bool $retainGeneralIdentityAttributes = false;
+
+ /**
+ * @param int $attributeCountLimit Maximum allowed attribute count per record
+ */
+ public function setAttributeCountLimit(int $attributeCountLimit): SpanLimitsBuilder
+ {
+ $this->attributeCountLimit = $attributeCountLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param int $attributeValueLengthLimit Maximum allowed attribute value length
+ */
+ public function setAttributeValueLengthLimit(int $attributeValueLengthLimit): SpanLimitsBuilder
+ {
+ $this->attributeValueLengthLimit = $attributeValueLengthLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param int $eventCountLimit Maximum allowed span event count
+ */
+ public function setEventCountLimit(int $eventCountLimit): SpanLimitsBuilder
+ {
+ $this->eventCountLimit = $eventCountLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param int $linkCountLimit Maximum allowed span link count
+ */
+ public function setLinkCountLimit(int $linkCountLimit): SpanLimitsBuilder
+ {
+ $this->linkCountLimit = $linkCountLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param int $attributePerEventCountLimit Maximum allowed attribute per span event count
+ */
+ public function setAttributePerEventCountLimit(int $attributePerEventCountLimit): SpanLimitsBuilder
+ {
+ $this->attributePerEventCountLimit = $attributePerEventCountLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param int $attributePerLinkCountLimit Maximum allowed attribute per span link count
+ */
+ public function setAttributePerLinkCountLimit(int $attributePerLinkCountLimit): SpanLimitsBuilder
+ {
+ $this->attributePerLinkCountLimit = $attributePerLinkCountLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param bool $retain whether general identity attributes should be retained
+ *
+ * @see https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#general-identity-attributes
+ */
+ public function retainGeneralIdentityAttributes(bool $retain = true): SpanLimitsBuilder
+ {
+ $this->retainGeneralIdentityAttributes = $retain;
+
+ return $this;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public function build(): SpanLimits
+ {
+ $attributeCountLimit = $this->attributeCountLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_ATTRIBUTE_COUNT_LIMIT);
+ $attributeValueLengthLimit = $this->attributeValueLengthLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, SpanLimits::DEFAULT_SPAN_ATTRIBUTE_LENGTH_LIMIT);
+ $eventCountLimit = $this->eventCountLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_EVENT_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_EVENT_COUNT_LIMIT);
+ $linkCountLimit = $this->linkCountLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_LINK_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_LINK_COUNT_LIMIT);
+ $attributePerEventCountLimit = $this->attributePerEventCountLimit
+ ?: Configuration::getInt(Env::OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_EVENT_ATTRIBUTE_COUNT_LIMIT);
+ $attributePerLinkCountLimit = $this->attributePerLinkCountLimit
+ ?: Configuration::getInt(Env::OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_LINK_ATTRIBUTE_COUNT_LIMIT);
+
+ if ($attributeValueLengthLimit === PHP_INT_MAX) {
+ $attributeValueLengthLimit = null;
+ }
+
+ $spanAttributesFactory = Attributes::factory($attributeCountLimit, $attributeValueLengthLimit);
+
+ if (!$this->retainGeneralIdentityAttributes) {
+ $spanAttributesFactory = new FilteredAttributesFactory($spanAttributesFactory, [
+ TraceAttributes::ENDUSER_ID,
+ TraceAttributes::ENDUSER_ROLE,
+ TraceAttributes::ENDUSER_SCOPE,
+ ]);
+ }
+
+ return new SpanLimits(
+ $spanAttributesFactory,
+ Attributes::factory($attributePerEventCountLimit, $attributeValueLengthLimit),
+ Attributes::factory($attributePerLinkCountLimit, $attributeValueLengthLimit),
+ $eventCountLimit,
+ $linkCountLimit,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php
new file mode 100644
index 000000000..58032749e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php
@@ -0,0 +1,290 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use function assert;
+use function count;
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+use SplQueue;
+use function sprintf;
+use Throwable;
+
+class BatchSpanProcessor implements SpanProcessorInterface
+{
+ use LogsMessagesTrait;
+
+ public const DEFAULT_SCHEDULE_DELAY = 5000;
+ public const DEFAULT_EXPORT_TIMEOUT = 30000;
+ public const DEFAULT_MAX_QUEUE_SIZE = 2048;
+ public const DEFAULT_MAX_EXPORT_BATCH_SIZE = 512;
+
+ private const ATTRIBUTES_PROCESSOR = ['processor' => 'batching'];
+ private const ATTRIBUTES_QUEUED = self::ATTRIBUTES_PROCESSOR + ['state' => 'queued'];
+ private const ATTRIBUTES_PENDING = self::ATTRIBUTES_PROCESSOR + ['state' => 'pending'];
+ private const ATTRIBUTES_PROCESSED = self::ATTRIBUTES_PROCESSOR + ['state' => 'processed'];
+ private const ATTRIBUTES_DROPPED = self::ATTRIBUTES_PROCESSOR + ['state' => 'dropped'];
+ private const ATTRIBUTES_FREE = self::ATTRIBUTES_PROCESSOR + ['state' => 'free'];
+
+ private SpanExporterInterface $exporter;
+ private ClockInterface $clock;
+ private int $maxQueueSize;
+ private int $scheduledDelayNanos;
+ private int $maxExportBatchSize;
+ private bool $autoFlush;
+ private ContextInterface $exportContext;
+
+ private ?int $nextScheduledRun = null;
+ private bool $running = false;
+ private int $dropped = 0;
+ private int $processed = 0;
+ private int $batchId = 0;
+ private int $queueSize = 0;
+ /** @var list<SpanDataInterface> */
+ private array $batch = [];
+ /** @var SplQueue<list<SpanDataInterface>> */
+ private SplQueue $queue;
+ /** @var SplQueue<array{int, string, ?CancellationInterface, bool, ContextInterface}> */
+ private SplQueue $flush;
+
+ private bool $closed = false;
+
+ public function __construct(
+ SpanExporterInterface $exporter,
+ ClockInterface $clock,
+ int $maxQueueSize = self::DEFAULT_MAX_QUEUE_SIZE,
+ int $scheduledDelayMillis = self::DEFAULT_SCHEDULE_DELAY,
+ int $exportTimeoutMillis = self::DEFAULT_EXPORT_TIMEOUT,
+ int $maxExportBatchSize = self::DEFAULT_MAX_EXPORT_BATCH_SIZE,
+ bool $autoFlush = true,
+ ?MeterProviderInterface $meterProvider = null
+ ) {
+ if ($maxQueueSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum queue size (%d) must be greater than zero', $maxQueueSize));
+ }
+ if ($scheduledDelayMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Scheduled delay (%d) must be greater than zero', $scheduledDelayMillis));
+ }
+ if ($exportTimeoutMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Export timeout (%d) must be greater than zero', $exportTimeoutMillis));
+ }
+ if ($maxExportBatchSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be greater than zero', $maxExportBatchSize));
+ }
+ if ($maxExportBatchSize > $maxQueueSize) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be less than or equal to maximum queue size (%d)', $maxExportBatchSize, $maxQueueSize));
+ }
+
+ $this->exporter = $exporter;
+ $this->clock = $clock;
+ $this->maxQueueSize = $maxQueueSize;
+ $this->scheduledDelayNanos = $scheduledDelayMillis * 1_000_000;
+ $this->maxExportBatchSize = $maxExportBatchSize;
+ $this->autoFlush = $autoFlush;
+
+ $this->exportContext = Context::getCurrent();
+ $this->queue = new SplQueue();
+ $this->flush = new SplQueue();
+
+ if ($meterProvider === null) {
+ return;
+ }
+
+ $meter = $meterProvider->getMeter('io.opentelemetry.sdk');
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.trace.span_processor.spans',
+ '{spans}',
+ 'The number of sampled spans received by the span processor',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $processed = $this->processed;
+ $dropped = $this->dropped;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($processed, self::ATTRIBUTES_PROCESSED);
+ $observer->observe($dropped, self::ATTRIBUTES_DROPPED);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.trace.span_processor.queue.limit',
+ '{spans}',
+ 'The queue size limit',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $observer->observe($this->maxQueueSize, self::ATTRIBUTES_PROCESSOR);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.trace.span_processor.queue.usage',
+ '{spans}',
+ 'The current queue usage',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $free = $this->maxQueueSize - $this->queueSize;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($free, self::ATTRIBUTES_FREE);
+ });
+ }
+
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void
+ {
+ }
+
+ public function onEnd(ReadableSpanInterface $span): void
+ {
+ if ($this->closed) {
+ return;
+ }
+ if (!$span->getContext()->isSampled()) {
+ return;
+ }
+
+ if ($this->queueSize === $this->maxQueueSize) {
+ $this->dropped++;
+
+ return;
+ }
+
+ $this->queueSize++;
+ $this->batch[] = $span->toSpanData();
+ $this->nextScheduledRun ??= $this->clock->now() + $this->scheduledDelayNanos;
+
+ if (count($this->batch) === $this->maxExportBatchSize) {
+ $this->enqueueBatch();
+ }
+ if ($this->autoFlush) {
+ $this->flush();
+ }
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ public static function builder(SpanExporterInterface $exporter): BatchSpanProcessorBuilder
+ {
+ return new BatchSpanProcessorBuilder($exporter);
+ }
+
+ private function flush(?string $flushMethod = null, ?CancellationInterface $cancellation = null): bool
+ {
+ if ($flushMethod !== null) {
+ $flushId = $this->batchId + $this->queue->count() + (int) (bool) $this->batch;
+ $this->flush->enqueue([$flushId, $flushMethod, $cancellation, !$this->running, Context::getCurrent()]);
+ }
+
+ if ($this->running) {
+ return false;
+ }
+
+ $success = true;
+ $exception = null;
+ $this->running = true;
+
+ try {
+ for (;;) {
+ while (!$this->flush->isEmpty() && $this->flush->bottom()[0] <= $this->batchId) {
+ [, $flushMethod, $cancellation, $propagateResult, $context] = $this->flush->dequeue();
+ $scope = $context->activate();
+
+ try {
+ $result = $this->exporter->$flushMethod($cancellation);
+ if ($propagateResult) {
+ $success = $result;
+ }
+ } catch (Throwable $e) {
+ if ($propagateResult) {
+ $exception = $e;
+ } else {
+ self::logError(sprintf('Unhandled %s error', $flushMethod), ['exception' => $e]);
+ }
+ } finally {
+ $scope->detach();
+ }
+ }
+
+ if (!$this->shouldFlush()) {
+ break;
+ }
+
+ if ($this->queue->isEmpty()) {
+ $this->enqueueBatch();
+ }
+ $batchSize = count($this->queue->bottom());
+ $this->batchId++;
+ $scope = $this->exportContext->activate();
+
+ try {
+ $this->exporter->export($this->queue->dequeue())->await();
+ } catch (Throwable $e) {
+ self::logError('Unhandled export error', ['exception' => $e]);
+ } finally {
+ $this->processed += $batchSize;
+ $this->queueSize -= $batchSize;
+ $scope->detach();
+ }
+ }
+ } finally {
+ $this->running = false;
+ }
+
+ if ($exception !== null) {
+ throw $exception;
+ }
+
+ return $success;
+ }
+
+ private function shouldFlush(): bool
+ {
+ return !$this->flush->isEmpty()
+ || $this->autoFlush && !$this->queue->isEmpty()
+ || $this->autoFlush && $this->nextScheduledRun !== null && $this->clock->now() > $this->nextScheduledRun;
+ }
+
+ private function enqueueBatch(): void
+ {
+ assert($this->batch !== []);
+
+ $this->queue->enqueue($this->batch);
+ $this->batch = [];
+ $this->nextScheduledRun = null;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php
new file mode 100644
index 000000000..8e81e7dd6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class BatchSpanProcessorBuilder
+{
+ private SpanExporterInterface $exporter;
+ private ?MeterProviderInterface $meterProvider = null;
+
+ public function __construct(SpanExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+ }
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): self
+ {
+ $this->meterProvider = $meterProvider;
+
+ return $this;
+ }
+
+ public function build(): BatchSpanProcessor
+ {
+ return new BatchSpanProcessor(
+ $this->exporter,
+ ClockFactory::getDefault(),
+ BatchSpanProcessor::DEFAULT_MAX_QUEUE_SIZE,
+ BatchSpanProcessor::DEFAULT_SCHEDULE_DELAY,
+ BatchSpanProcessor::DEFAULT_EXPORT_TIMEOUT,
+ BatchSpanProcessor::DEFAULT_MAX_EXPORT_BATCH_SIZE,
+ true,
+ $this->meterProvider
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php
new file mode 100644
index 000000000..e690791f2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php
@@ -0,0 +1,79 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+
+/**
+ * Class SpanMultiProcessor is a SpanProcessor that forwards all events to an
+ * array of SpanProcessors.
+ */
+final class MultiSpanProcessor implements SpanProcessorInterface
+{
+ /** @var list<SpanProcessorInterface> */
+ private array $processors = [];
+
+ public function __construct(SpanProcessorInterface ...$spanProcessors)
+ {
+ foreach ($spanProcessors as $processor) {
+ $this->addSpanProcessor($processor);
+ }
+ }
+
+ public function addSpanProcessor(SpanProcessorInterface $processor): void
+ {
+ $this->processors[] = $processor;
+ }
+
+ /** @return list<SpanProcessorInterface> */
+ public function getSpanProcessors(): array
+ {
+ return $this->processors;
+ }
+
+ /** @inheritDoc */
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void
+ {
+ foreach ($this->processors as $processor) {
+ $processor->onStart($span, $parentContext);
+ }
+ }
+
+ /** @inheritDoc */
+ public function onEnd(ReadableSpanInterface $span): void
+ {
+ foreach ($this->processors as $processor) {
+ $processor->onEnd($span);
+ }
+ }
+
+ /** @inheritDoc */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+
+ foreach ($this->processors as $processor) {
+ $result = $result && $processor->shutdown();
+ }
+
+ return $result;
+ }
+
+ /** @inheritDoc */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+
+ foreach ($this->processors as $processor) {
+ $result = $result && $processor->forceFlush();
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php
new file mode 100644
index 000000000..9c4d1eabe
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+
+class NoopSpanProcessor implements SpanProcessorInterface
+{
+ private static ?SpanProcessorInterface $instance = null;
+
+ public static function getInstance(): SpanProcessorInterface
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /** @inheritDoc */
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void
+ {
+ } //@codeCoverageIgnore
+
+ /** @inheritDoc */
+ public function onEnd(ReadableSpanInterface $span): void
+ {
+ } //@codeCoverageIgnore
+
+ /** @inheritDoc */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ /** @inheritDoc */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->forceFlush();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php
new file mode 100644
index 000000000..4e86e79ab
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php
@@ -0,0 +1,120 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use Closure;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+use SplQueue;
+use function sprintf;
+use Throwable;
+
+class SimpleSpanProcessor implements SpanProcessorInterface
+{
+ use LogsMessagesTrait;
+
+ private SpanExporterInterface $exporter;
+ private ContextInterface $exportContext;
+
+ private bool $running = false;
+ /** @var SplQueue<array{Closure, string, bool, ContextInterface}> */
+ private SplQueue $queue;
+
+ private bool $closed = false;
+
+ public function __construct(SpanExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+
+ $this->exportContext = Context::getCurrent();
+ $this->queue = new SplQueue();
+ }
+
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void
+ {
+ }
+
+ public function onEnd(ReadableSpanInterface $span): void
+ {
+ if ($this->closed) {
+ return;
+ }
+ if (!$span->getContext()->isSampled()) {
+ return;
+ }
+
+ $spanData = $span->toSpanData();
+ $this->flush(fn () => $this->exporter->export([$spanData])->await(), 'export', false, $this->exportContext);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->flush(fn (): bool => $this->exporter->forceFlush($cancellation), __FUNCTION__, true, Context::getCurrent());
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return $this->flush(fn (): bool => $this->exporter->shutdown($cancellation), __FUNCTION__, true, Context::getCurrent());
+ }
+
+ private function flush(Closure $task, string $taskName, bool $propagateResult, ContextInterface $context): bool
+ {
+ $this->queue->enqueue([$task, $taskName, $propagateResult && !$this->running, $context]);
+
+ if ($this->running) {
+ return false;
+ }
+
+ $success = true;
+ $exception = null;
+ $this->running = true;
+
+ try {
+ while (!$this->queue->isEmpty()) {
+ [$task, $taskName, $propagateResult, $context] = $this->queue->dequeue();
+ $scope = $context->activate();
+
+ try {
+ $result = $task();
+ if ($propagateResult) {
+ $success = $result;
+ }
+ } catch (Throwable $e) {
+ if ($propagateResult) {
+ $exception = $e;
+ } else {
+ self::logError(sprintf('Unhandled %s error', $taskName), ['exception' => $e]);
+ }
+ } finally {
+ $scope->detach();
+ }
+ }
+ } finally {
+ $this->running = false;
+ }
+
+ if ($exception !== null) {
+ throw $exception;
+ }
+
+ return $success;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php b/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php
new file mode 100644
index 000000000..39144cdf6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Metrics\NoopMeterProvider;
+use OpenTelemetry\SDK\Trace\SpanProcessor\BatchSpanProcessor;
+use OpenTelemetry\SDK\Trace\SpanProcessor\NoopSpanProcessor;
+use OpenTelemetry\SDK\Trace\SpanProcessor\SimpleSpanProcessor;
+
+class SpanProcessorFactory
+{
+ public function create(?SpanExporterInterface $exporter = null, ?MeterProviderInterface $meterProvider = null): SpanProcessorInterface
+ {
+ if ($exporter === null) {
+ return new NoopSpanProcessor();
+ }
+
+ $name = Configuration::getEnum(Env::OTEL_PHP_TRACES_PROCESSOR);
+ switch ($name) {
+ case Values::VALUE_BATCH:
+ return new BatchSpanProcessor(
+ $exporter,
+ ClockFactory::getDefault(),
+ Configuration::getInt(Env::OTEL_BSP_MAX_QUEUE_SIZE, BatchSpanProcessor::DEFAULT_MAX_QUEUE_SIZE),
+ Configuration::getInt(Env::OTEL_BSP_SCHEDULE_DELAY, BatchSpanProcessor::DEFAULT_SCHEDULE_DELAY),
+ Configuration::getInt(Env::OTEL_BSP_EXPORT_TIMEOUT, BatchSpanProcessor::DEFAULT_EXPORT_TIMEOUT),
+ Configuration::getInt(Env::OTEL_BSP_MAX_EXPORT_BATCH_SIZE, BatchSpanProcessor::DEFAULT_MAX_EXPORT_BATCH_SIZE),
+ true, //autoflush
+ $meterProvider ?? new NoopMeterProvider(),
+ );
+ case Values::VALUE_SIMPLE:
+ return new SimpleSpanProcessor($exporter);
+ case Values::VALUE_NOOP:
+ case Values::VALUE_NONE:
+ return NoopSpanProcessor::getInstance();
+ default:
+ throw new InvalidArgumentException('Unknown processor: ' . $name);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php b/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php
new file mode 100644
index 000000000..24bcea2dd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+/** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk.md#span-processor */
+interface SpanProcessorInterface
+{
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#onstart
+ */
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#onendspan
+ */
+ public function onEnd(ReadableSpanInterface $span): void;
+
+ /**
+ * Export all ended spans to the configured Exporter that have not yet been exported.
+ * Returns `true` if the flush was successful, otherwise `false`.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-1
+ */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+
+ /**
+ * Cleanup; after shutdown, calling onStart, onEnd, or forceFlush is invalid
+ * Returns `false` is the processor is already shutdown, otherwise `true`.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#shutdown-1
+ */
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/StatusData.php b/vendor/open-telemetry/sdk/Trace/StatusData.php
new file mode 100644
index 000000000..c28ea22ab
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/StatusData.php
@@ -0,0 +1,84 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+
+final class StatusData implements StatusDataInterface
+{
+ private static ?self $ok = null;
+ private static ?self $unset = null;
+ private static ?self $error = null;
+ private string $code;
+ private string $description;
+
+ /** @psalm-param API\StatusCode::STATUS_* $code */
+ public function __construct(
+ string $code,
+ string $description
+ ) {
+ $this->code = $code;
+ $this->description = $description;
+ }
+
+ /** @psalm-param API\StatusCode::STATUS_* $code */
+ public static function create(string $code, ?string $description = null): self
+ {
+ if (empty($description)) {
+ switch ($code) {
+ case API\StatusCode::STATUS_UNSET:
+ return self::unset();
+ case API\StatusCode::STATUS_ERROR:
+ return self::error();
+ case API\StatusCode::STATUS_OK:
+ return self::ok();
+ }
+ }
+
+ // Ignore description for non Error statuses.
+ if (API\StatusCode::STATUS_ERROR !== $code) {
+ $description = '';
+ }
+
+ return new self($code, $description); /** @phan-suppress-current-line PhanTypeMismatchArgumentNullable */
+ }
+
+ public static function ok(): self
+ {
+ if (null === self::$ok) {
+ self::$ok = new self(API\StatusCode::STATUS_OK, '');
+ }
+
+ return self::$ok;
+ }
+
+ public static function error(): self
+ {
+ if (null === self::$error) {
+ self::$error = new self(API\StatusCode::STATUS_ERROR, '');
+ }
+
+ return self::$error;
+ }
+
+ public static function unset(): self
+ {
+ if (null === self::$unset) {
+ self::$unset = new self(API\StatusCode::STATUS_UNSET, '');
+ }
+
+ return self::$unset;
+ }
+
+ public function getCode(): string
+ {
+ return $this->code;
+ }
+
+ public function getDescription(): string
+ {
+ return $this->description;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php b/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php
new file mode 100644
index 000000000..973d2b519
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+interface StatusDataInterface
+{
+ public static function ok(): self;
+
+ public static function error(): self;
+
+ public static function unset(): self;
+
+ public function getCode(): string;
+
+ public function getDescription(): string;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Tracer.php b/vendor/open-telemetry/sdk/Trace/Tracer.php
new file mode 100644
index 000000000..913773f60
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Tracer.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function ctype_space;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+class Tracer implements API\TracerInterface
+{
+ public const FALLBACK_SPAN_NAME = 'empty';
+
+ /** @readonly */
+ private TracerSharedState $tracerSharedState;
+
+ /** @readonly */
+ private InstrumentationScopeInterface $instrumentationScope;
+
+ public function __construct(
+ TracerSharedState $tracerSharedState,
+ InstrumentationScopeInterface $instrumentationScope
+ ) {
+ $this->tracerSharedState = $tracerSharedState;
+ $this->instrumentationScope = $instrumentationScope;
+ }
+
+ /** @inheritDoc */
+ public function spanBuilder(string $spanName): API\SpanBuilderInterface
+ {
+ if (ctype_space($spanName)) {
+ $spanName = self::FALLBACK_SPAN_NAME;
+ }
+
+ if ($this->tracerSharedState->hasShutdown()) {
+ return new API\NoopSpanBuilder(Context::storage());
+ }
+
+ return new SpanBuilder(
+ $spanName,
+ $this->instrumentationScope,
+ $this->tracerSharedState,
+ );
+ }
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface
+ {
+ return $this->instrumentationScope;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProvider.php b/vendor/open-telemetry/sdk/Trace/TracerProvider.php
new file mode 100644
index 000000000..fdae4aea2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProvider.php
@@ -0,0 +1,99 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function is_array;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\API\Trace\NoopTracer;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactoryInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+use OpenTelemetry\SDK\Trace\Sampler\AlwaysOnSampler;
+use OpenTelemetry\SDK\Trace\Sampler\ParentBased;
+
+final class TracerProvider implements TracerProviderInterface
+{
+ /** @readonly */
+ private TracerSharedState $tracerSharedState;
+ private InstrumentationScopeFactoryInterface $instrumentationScopeFactory;
+
+ /** @param list<SpanProcessorInterface>|SpanProcessorInterface|null $spanProcessors */
+ public function __construct(
+ $spanProcessors = [],
+ SamplerInterface $sampler = null,
+ ResourceInfo $resource = null,
+ SpanLimits $spanLimits = null,
+ IdGeneratorInterface $idGenerator = null,
+ ?InstrumentationScopeFactoryInterface $instrumentationScopeFactory = null
+ ) {
+ if (null === $spanProcessors) {
+ $spanProcessors = [];
+ }
+
+ $spanProcessors = is_array($spanProcessors) ? $spanProcessors : [$spanProcessors];
+ $resource ??= ResourceInfoFactory::defaultResource();
+ $sampler ??= new ParentBased(new AlwaysOnSampler());
+ $idGenerator ??= new RandomIdGenerator();
+ $spanLimits ??= (new SpanLimitsBuilder())->build();
+
+ $this->tracerSharedState = new TracerSharedState(
+ $idGenerator,
+ $resource,
+ $spanLimits,
+ $sampler,
+ $spanProcessors
+ );
+ $this->instrumentationScopeFactory = $instrumentationScopeFactory ?? new InstrumentationScopeFactory(Attributes::factory());
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->tracerSharedState->getSpanProcessor()->forceFlush($cancellation);
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getTracer(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): API\TracerInterface {
+ if ($this->tracerSharedState->hasShutdown()) {
+ return NoopTracer::getInstance();
+ }
+
+ return new Tracer(
+ $this->tracerSharedState,
+ $this->instrumentationScopeFactory->create($name, $version, $schemaUrl, $attributes),
+ );
+ }
+
+ public function getSampler(): SamplerInterface
+ {
+ return $this->tracerSharedState->getSampler();
+ }
+
+ /**
+ * Returns `false` is the provider is already shutdown, otherwise `true`.
+ */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->tracerSharedState->hasShutdown()) {
+ return true;
+ }
+
+ return $this->tracerSharedState->shutdown($cancellation);
+ }
+
+ public static function builder(): TracerProviderBuilder
+ {
+ return new TracerProviderBuilder();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php b/vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php
new file mode 100644
index 000000000..8dcfdc700
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php
@@ -0,0 +1,45 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class TracerProviderBuilder
+{
+ // @var array<SpanProcessorInterface>
+ private ?array $spanProcessors = [];
+ private ?ResourceInfo $resource = null;
+ private ?SamplerInterface $sampler = null;
+
+ public function addSpanProcessor(SpanProcessorInterface $spanProcessor): self
+ {
+ $this->spanProcessors[] = $spanProcessor;
+
+ return $this;
+ }
+
+ public function setResource(ResourceInfo $resource): self
+ {
+ $this->resource = $resource;
+
+ return $this;
+ }
+
+ public function setSampler(SamplerInterface $sampler): self
+ {
+ $this->sampler = $sampler;
+
+ return $this;
+ }
+
+ public function build(): TracerProviderInterface
+ {
+ return new TracerProvider(
+ $this->spanProcessors,
+ $this->sampler,
+ $this->resource,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php b/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php
new file mode 100644
index 000000000..a545319b6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Sdk;
+
+final class TracerProviderFactory
+{
+ use LogsMessagesTrait;
+
+ private ExporterFactory $exporterFactory;
+ private SamplerFactory $samplerFactory;
+ private SpanProcessorFactory $spanProcessorFactory;
+
+ public function __construct(
+ ?ExporterFactory $exporterFactory = null,
+ ?SamplerFactory $samplerFactory = null,
+ ?SpanProcessorFactory $spanProcessorFactory = null
+ ) {
+ $this->exporterFactory = $exporterFactory ?: new ExporterFactory();
+ $this->samplerFactory = $samplerFactory ?: new SamplerFactory();
+ $this->spanProcessorFactory = $spanProcessorFactory ?: new SpanProcessorFactory();
+ }
+
+ public function create(): TracerProviderInterface
+ {
+ if (Sdk::isDisabled()) {
+ return new NoopTracerProvider();
+ }
+
+ try {
+ $exporter = $this->exporterFactory->create();
+ } catch (\Throwable $t) {
+ self::logWarning('Unable to create exporter', ['exception' => $t]);
+ $exporter = null;
+ }
+
+ try {
+ $sampler = $this->samplerFactory->create();
+ } catch (\Throwable $t) {
+ self::logWarning('Unable to create sampler', ['exception' => $t]);
+ $sampler = null;
+ }
+
+ try {
+ $spanProcessor = $this->spanProcessorFactory->create($exporter);
+ } catch (\Throwable $t) {
+ self::logWarning('Unable to create span processor', ['exception' => $t]);
+ $spanProcessor = null;
+ }
+
+ return new TracerProvider(
+ $spanProcessor,
+ $sampler,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php b/vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php
new file mode 100644
index 000000000..d61c1ea8f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+interface TracerProviderInterface extends API\TracerProviderInterface
+{
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerSharedState.php b/vendor/open-telemetry/sdk/Trace/TracerSharedState.php
new file mode 100644
index 000000000..d0540cc1f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerSharedState.php
@@ -0,0 +1,100 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API; /** @phan-suppress-current-line PhanUnreferencedUseNormal */
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Trace\SpanProcessor\MultiSpanProcessor;
+use OpenTelemetry\SDK\Trace\SpanProcessor\NoopSpanProcessor;
+
+/**
+ * Stores shared state/config between all {@see API\TracerInterface} created via the same {@see API\TracerProviderInterface}.
+ */
+final class TracerSharedState
+{
+ /** @readonly */
+ private IdGeneratorInterface $idGenerator;
+
+ /** @readonly */
+ private ResourceInfo $resource;
+
+ /** @readonly */
+ private SpanLimits $spanLimits;
+
+ /** @readonly */
+ private SamplerInterface $sampler;
+
+ /** @readonly */
+ private SpanProcessorInterface $spanProcessor;
+
+ private ?bool $shutdownResult = null;
+
+ public function __construct(
+ IdGeneratorInterface $idGenerator,
+ ResourceInfo $resource,
+ SpanLimits $spanLimits,
+ SamplerInterface $sampler,
+ array $spanProcessors
+ ) {
+ $this->idGenerator = $idGenerator;
+ $this->resource = $resource;
+ $this->spanLimits = $spanLimits;
+ $this->sampler = $sampler;
+
+ switch (count($spanProcessors)) {
+ case 0:
+ $this->spanProcessor = NoopSpanProcessor::getInstance();
+
+ break;
+ case 1:
+ $this->spanProcessor = $spanProcessors[0];
+
+ break;
+ default:
+ $this->spanProcessor = new MultiSpanProcessor(...$spanProcessors);
+
+ break;
+ }
+ }
+
+ public function hasShutdown(): bool
+ {
+ return null !== $this->shutdownResult;
+ }
+
+ public function getIdGenerator(): IdGeneratorInterface
+ {
+ return $this->idGenerator;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->resource;
+ }
+
+ public function getSpanLimits(): SpanLimits
+ {
+ return $this->spanLimits;
+ }
+
+ public function getSampler(): SamplerInterface
+ {
+ return $this->sampler;
+ }
+
+ public function getSpanProcessor(): SpanProcessorInterface
+ {
+ return $this->spanProcessor;
+ }
+
+ /**
+ * Returns `false` is the provider is already shutdown, otherwise `true`.
+ */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->shutdownResult ?? ($this->shutdownResult = $this->spanProcessor->shutdown($cancellation));
+ }
+}
diff --git a/vendor/open-telemetry/sdk/_autoload.php b/vendor/open-telemetry/sdk/_autoload.php
new file mode 100644
index 000000000..4e1de3450
--- /dev/null
+++ b/vendor/open-telemetry/sdk/_autoload.php
@@ -0,0 +1,5 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\SdkAutoloader::autoload();
diff --git a/vendor/open-telemetry/sdk/composer.json b/vendor/open-telemetry/sdk/composer.json
new file mode 100644
index 000000000..4497c9400
--- /dev/null
+++ b/vendor/open-telemetry/sdk/composer.json
@@ -0,0 +1,59 @@
+{
+ "name": "open-telemetry/sdk",
+ "description": "SDK for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "sdk"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "ext-json": "*",
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/context": "^1.0",
+ "open-telemetry/sem-conv": "^1.0",
+ "php-http/discovery": "^1.14",
+ "psr/http-client-implementation": "^1.0",
+ "psr/http-factory-implementation": "^1.0",
+ "psr/http-client": "^1.0",
+ "psr/http-message": "^1.0.1|^2.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-mbstring": "^1.23",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\SDK\\": "."
+ },
+ "files": [
+ "Common/Util/functions.php",
+ "Logs/Exporter/_register.php",
+ "Metrics/MetricExporter/_register.php",
+ "Propagation/_register.php",
+ "Trace/SpanExporter/_register.php",
+ "Common/Dev/Compatibility/_load.php",
+ "_autoload.php"
+ ]
+ },
+ "suggest": {
+ "ext-gmp": "To support unlimited number of synchronous metric readers",
+ "ext-mbstring": "To increase performance of string operations"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sem-conv/README.md b/vendor/open-telemetry/sem-conv/README.md
new file mode 100644
index 000000000..58083e1f5
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/README.md
@@ -0,0 +1,25 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/sem-conv/releases)
+[![Source](https://img.shields.io/badge/source-sem--conv-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/SemConv)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:sem--conv-blue)](https://github.com/opentelemetry-php/sem-conv)
+[![Latest Version](http://poser.pugx.org/open-telemetry/sem-conv/v/unstable)](https://packagist.org/packages/open-telemetry/sem-conv/)
+[![Stable](http://poser.pugx.org/open-telemetry/sem-conv/v/stable)](https://packagist.org/packages/open-telemetry/sem-conv/)
+
+# OpenTelemetry Semantic Conventions
+
+Common semantic conventions used by OpenTelemetry implementations across all languages.
+
+Please note that Semantic Conventions are tagged with the version of the
+[Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tags) that they were generated from.
+
+See https://opentelemetry.io/docs/concepts/semantic-conventions/.
+
+## Installation
+
+```shell
+composer require open-telemetry/sem-conv
+```
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/sem-conv/ResourceAttributes.php b/vendor/open-telemetry/sem-conv/ResourceAttributes.php
new file mode 100644
index 000000000..cdde885a9
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/ResourceAttributes.php
@@ -0,0 +1,1007 @@
+<?php
+
+// DO NOT EDIT, this is an Auto-generated file from script/semantic-convention/templates/Attributes.php.j2
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SemConv;
+
+interface ResourceAttributes
+{
+ /**
+ * The URL of the OpenTelemetry schema for these keys and values.
+ */
+ public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.22.0';
+
+ /**
+ * Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found here.
+ *
+ * @example 33
+ * @example 32
+ */
+ public const ANDROID_OS_API_LEVEL = 'android.os.api_level';
+
+ /**
+ * Array of brand name and version separated by a space.
+ *
+ * This value is intended to be taken from the UA client hints API (`navigator.userAgentData.brands`).
+ *
+ * @example Not A;Brand 99
+ * @example Chromium 99
+ * @example Chrome 99
+ */
+ public const BROWSER_BRANDS = 'browser.brands';
+
+ /**
+ * Preferred language of the user using the browser.
+ *
+ * This value is intended to be taken from the Navigator API `navigator.language`.
+ *
+ * @example en
+ * @example en-US
+ * @example fr
+ * @example fr-FR
+ */
+ public const BROWSER_LANGUAGE = 'browser.language';
+
+ /**
+ * A boolean that is true if the browser is running on a mobile device.
+ *
+ * This value is intended to be taken from the UA client hints API (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset.
+ */
+ public const BROWSER_MOBILE = 'browser.mobile';
+
+ /**
+ * The platform on which the browser is running.
+ *
+ * This value is intended to be taken from the UA client hints API (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent.
+ * The list of possible values is defined in the W3C User-Agent Client Hints specification. Note that some (but not all) of these values can overlap with values in the `os.type` and `os.name` attributes. However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.
+ *
+ * @example Windows
+ * @example macOS
+ * @example Android
+ */
+ public const BROWSER_PLATFORM = 'browser.platform';
+
+ /**
+ * Full user-agent string provided by the browser.
+ *
+ * The user-agent value SHOULD be provided only from browsers that do not have a mechanism to retrieve brands and platform individually from the User-Agent Client Hints API. To retrieve the value, the legacy `navigator.userAgent` API can be used.
+ *
+ * @example Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
+ */
+ public const USER_AGENT_ORIGINAL = 'user_agent.original';
+
+ /**
+ * The cloud account ID the resource is assigned to.
+ *
+ * @example 111111111111
+ * @example opentelemetry
+ */
+ public const CLOUD_ACCOUNT_ID = 'cloud.account.id';
+
+ /**
+ * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.
+ *
+ * Availability zones are called &quot;zones&quot; on Alibaba Cloud and Google Cloud.
+ *
+ * @example us-east-1c
+ */
+ public const CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';
+
+ /**
+ * The cloud platform in use.
+ *
+ * The prefix of the service SHOULD match the one specified in `cloud.provider`.
+ */
+ public const CLOUD_PLATFORM = 'cloud.platform';
+
+ /**
+ * Name of the cloud provider.
+ */
+ public const CLOUD_PROVIDER = 'cloud.provider';
+
+ /**
+ * The geographical region the resource is running.
+ *
+ * Refer to your provider's docs to see the available regions, for example Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or Tencent Cloud regions.
+ *
+ * @example us-central1
+ * @example us-east-1
+ */
+ public const CLOUD_REGION = 'cloud.region';
+
+ /**
+ * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on GCP).
+ *
+ * On some cloud providers, it may not be possible to determine the full ID at startup,
+ * so it may be necessary to set `cloud.resource_id` as a span attribute instead.The exact value to use for `cloud.resource_id` depends on the cloud provider.
+ * The following well-known definitions MUST be used if you set this attribute and they apply:<ul>
+ * <li><strong>AWS Lambda:</strong> The function ARN.
+ * Take care not to use the &quot;invoked ARN&quot; directly but replace any
+ * alias suffix
+ * with the resolved function version, as the same runtime instance may be invokable with
+ * multiple different aliases.</li>
+ * <li><strong>GCP:</strong> The URI of the resource</li>
+ * <li><strong>Azure:</strong> The Fully Qualified Resource ID of the invoked function,
+ * <em>not</em> the function app, having the form
+ * `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
+ * This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
+ * a TracerProvider.</li>
+ * </ul>
+ *
+ * @example arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function
+ * @example //run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID
+ * @example /subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>
+ */
+ public const CLOUD_RESOURCE_ID = 'cloud.resource_id';
+
+ /**
+ * The ARN of an ECS cluster.
+ *
+ * @example arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster
+ */
+ public const AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn';
+
+ /**
+ * The Amazon Resource Name (ARN) of an ECS container instance.
+ *
+ * @example arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9
+ */
+ public const AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn';
+
+ /**
+ * The launch type for an ECS task.
+ */
+ public const AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype';
+
+ /**
+ * The ARN of an ECS task definition.
+ *
+ * @example arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b
+ */
+ public const AWS_ECS_TASK_ARN = 'aws.ecs.task.arn';
+
+ /**
+ * The task definition family this task definition is a member of.
+ *
+ * @example opentelemetry-family
+ */
+ public const AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family';
+
+ /**
+ * The revision for this task definition.
+ *
+ * @example 8
+ * @example 26
+ */
+ public const AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision';
+
+ /**
+ * The ARN of an EKS cluster.
+ *
+ * @example arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster
+ */
+ public const AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn';
+
+ /**
+ * The Amazon Resource Name(s) (ARN) of the AWS log group(s).
+ *
+ * See the log group ARN format documentation.
+ *
+ * @example arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*
+ */
+ public const AWS_LOG_GROUP_ARNS = 'aws.log.group.arns';
+
+ /**
+ * The name(s) of the AWS log group(s) an application is writing to.
+ *
+ * Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.
+ *
+ * @example /aws/lambda/my-function
+ * @example opentelemetry-service
+ */
+ public const AWS_LOG_GROUP_NAMES = 'aws.log.group.names';
+
+ /**
+ * The ARN(s) of the AWS log stream(s).
+ *
+ * See the log stream ARN format documentation. One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.
+ *
+ * @example arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b
+ */
+ public const AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns';
+
+ /**
+ * The name(s) of the AWS log stream(s) an application is writing to.
+ *
+ * @example logs/main/10838bed-421f-43ef-870a-f43feacbbb5b
+ */
+ public const AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';
+
+ /**
+ * The name of the Cloud Run execution being run for the Job, as set by the `CLOUD_RUN_EXECUTION` environment variable.
+ *
+ * @example job-name-xxxx
+ * @example sample-job-mdw84
+ */
+ public const GCP_CLOUD_RUN_JOB_EXECUTION = 'gcp.cloud_run.job.execution';
+
+ /**
+ * The index for a task within an execution as provided by the `CLOUD_RUN_TASK_INDEX` environment variable.
+ *
+ * @example 1
+ */
+ public const GCP_CLOUD_RUN_JOB_TASK_INDEX = 'gcp.cloud_run.job.task_index';
+
+ /**
+ * The hostname of a GCE instance. This is the full value of the default or custom hostname.
+ *
+ * @example my-host1234.example.com
+ * @example sample-vm.us-west1-b.c.my-project.internal
+ */
+ public const GCP_GCE_INSTANCE_HOSTNAME = 'gcp.gce.instance.hostname';
+
+ /**
+ * The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the default internal DNS name.
+ *
+ * @example instance-1
+ * @example my-vm-name
+ */
+ public const GCP_GCE_INSTANCE_NAME = 'gcp.gce.instance.name';
+
+ /**
+ * Unique identifier for the application.
+ *
+ * @example 2daa2797-e42b-4624-9322-ec3f968df4da
+ */
+ public const HEROKU_APP_ID = 'heroku.app.id';
+
+ /**
+ * Commit hash for the current release.
+ *
+ * @example e6134959463efd8966b20e75b913cafe3f5ec
+ */
+ public const HEROKU_RELEASE_COMMIT = 'heroku.release.commit';
+
+ /**
+ * Time and date the release was created.
+ *
+ * @example 2022-10-23T18:00:42Z
+ */
+ public const HEROKU_RELEASE_CREATION_TIMESTAMP = 'heroku.release.creation_timestamp';
+
+ /**
+ * The command used to run the container (i.e. the command name).
+ *
+ * If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.
+ *
+ * @example otelcontribcol
+ */
+ public const CONTAINER_COMMAND = 'container.command';
+
+ /**
+ * All the command arguments (including the command/executable itself) run by the container. [2].
+ *
+ * @example otelcontribcol, --config, config.yaml
+ */
+ public const CONTAINER_COMMAND_ARGS = 'container.command_args';
+
+ /**
+ * The full command run by the container as a single string representing the full command. [2].
+ *
+ * @example otelcontribcol --config config.yaml
+ */
+ public const CONTAINER_COMMAND_LINE = 'container.command_line';
+
+ /**
+ * Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated.
+ *
+ * @example a3bf90e006b2
+ */
+ public const CONTAINER_ID = 'container.id';
+
+ /**
+ * Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
+ *
+ * Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect API endpoint.
+ * K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
+ * The ID is assinged by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.
+ *
+ * @example sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f
+ */
+ public const CONTAINER_IMAGE_ID = 'container.image.id';
+
+ /**
+ * Name of the image the container was built on.
+ *
+ * @example gcr.io/opentelemetry/operator
+ */
+ public const CONTAINER_IMAGE_NAME = 'container.image.name';
+
+ /**
+ * Repo digests of the container image as provided by the container runtime.
+ *
+ * Docker and CRI report those under the `RepoDigests` field.
+ *
+ * @example example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb
+ * @example internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578
+ */
+ public const CONTAINER_IMAGE_REPO_DIGESTS = 'container.image.repo_digests';
+
+ /**
+ * Container image tags. An example can be found in Docker Image Inspect. Should be only the `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`.
+ *
+ * @example v1.27.1
+ * @example 3.5.7-0
+ */
+ public const CONTAINER_IMAGE_TAGS = 'container.image.tags';
+
+ /**
+ * Container name used by container runtime.
+ *
+ * @example opentelemetry-autoconf
+ */
+ public const CONTAINER_NAME = 'container.name';
+
+ /**
+ * The container runtime managing this container.
+ *
+ * @example docker
+ * @example containerd
+ * @example rkt
+ */
+ public const CONTAINER_RUNTIME = 'container.runtime';
+
+ /**
+ * Name of the deployment environment (aka deployment tier).
+ *
+ * @example staging
+ * @example production
+ */
+ public const DEPLOYMENT_ENVIRONMENT = 'deployment.environment';
+
+ /**
+ * A unique identifier representing the device.
+ *
+ * The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor identifier. On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found here on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.
+ *
+ * @example 2ab2916d-a51f-4ac8-80ee-45ac31a28092
+ */
+ public const DEVICE_ID = 'device.id';
+
+ /**
+ * The name of the device manufacturer.
+ *
+ * The Android OS provides this field via Build. iOS apps SHOULD hardcode the value `Apple`.
+ *
+ * @example Apple
+ * @example Samsung
+ */
+ public const DEVICE_MANUFACTURER = 'device.manufacturer';
+
+ /**
+ * The model identifier for the device.
+ *
+ * It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.
+ *
+ * @example iPhone3,4
+ * @example SM-G920F
+ */
+ public const DEVICE_MODEL_IDENTIFIER = 'device.model.identifier';
+
+ /**
+ * The marketing name for the device model.
+ *
+ * It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.
+ *
+ * @example iPhone 6s Plus
+ * @example Samsung Galaxy S6
+ */
+ public const DEVICE_MODEL_NAME = 'device.model.name';
+
+ /**
+ * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.
+ *
+ * <ul>
+ * <li><strong>AWS Lambda:</strong> Use the (full) log stream name.</li>
+ * </ul>
+ *
+ * @example 2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de
+ */
+ public const FAAS_INSTANCE = 'faas.instance';
+
+ /**
+ * The amount of memory available to the serverless function converted to Bytes.
+ *
+ * It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576).
+ *
+ * @example 134217728
+ */
+ public const FAAS_MAX_MEMORY = 'faas.max_memory';
+
+ /**
+ * The name of the single function that this runtime instance executes.
+ *
+ * This is the name of the function as configured/deployed on the FaaS
+ * platform and is usually different from the name of the callback
+ * function (which may be stored in the
+ * `code.namespace`/`code.function`
+ * span attributes).For some cloud providers, the above definition is ambiguous. The following
+ * definition of function name MUST be used for this attribute
+ * (and consequently the span name) for the listed cloud providers/products:<ul>
+ * <li><strong>Azure:</strong> The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
+ * followed by a forward slash followed by the function name (this form
+ * can also be seen in the resource JSON for the function).
+ * This means that a span attribute MUST be used, as an Azure function
+ * app can host multiple functions that would usually share
+ * a TracerProvider (see also the `cloud.resource_id` attribute).</li>
+ * </ul>
+ *
+ * @example my-function
+ * @example myazurefunctionapp/some-function-name
+ */
+ public const FAAS_NAME = 'faas.name';
+
+ /**
+ * The immutable version of the function being executed.
+ *
+ * Depending on the cloud provider and platform, use:<ul>
+ * <li><strong>AWS Lambda:</strong> The function version
+ * (an integer represented as a decimal string).</li>
+ * <li><strong>Google Cloud Run (Services):</strong> The revision
+ * (i.e., the function name plus the revision suffix).</li>
+ * <li><strong>Google Cloud Functions:</strong> The value of the
+ * `K_REVISION` environment variable.</li>
+ * <li><strong>Azure Functions:</strong> Not applicable. Do not set this attribute.</li>
+ * </ul>
+ *
+ * @example 26
+ * @example pinkfroid-00002
+ */
+ public const FAAS_VERSION = 'faas.version';
+
+ /**
+ * The CPU architecture the host system is running on.
+ */
+ public const HOST_ARCH = 'host.arch';
+
+ /**
+ * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system.
+ *
+ * @example fdbf79e8af94cb7f9e8df36789187052
+ */
+ public const HOST_ID = 'host.id';
+
+ /**
+ * VM image ID or host OS image ID. For Cloud, this value is from the provider.
+ *
+ * @example ami-07b06b442921831e5
+ */
+ public const HOST_IMAGE_ID = 'host.image.id';
+
+ /**
+ * Name of the VM image or OS install the host was instantiated from.
+ *
+ * @example infra-ami-eks-worker-node-7d4ec78312
+ * @example CentOS-8-x86_64-1905
+ */
+ public const HOST_IMAGE_NAME = 'host.image.name';
+
+ /**
+ * The version string of the VM image or host OS as defined in Version Attributes.
+ *
+ * @example 0.1
+ */
+ public const HOST_IMAGE_VERSION = 'host.image.version';
+
+ /**
+ * Available IP addresses of the host, excluding loopback interfaces.
+ *
+ * IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the RFC 5952 format.
+ *
+ * @example 192.168.1.140
+ * @example fe80::abc2:4a28:737a:609e
+ */
+ public const HOST_IP = 'host.ip';
+
+ /**
+ * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.
+ *
+ * @example opentelemetry-test
+ */
+ public const HOST_NAME = 'host.name';
+
+ /**
+ * Type of host. For Cloud, this must be the machine type.
+ *
+ * @example n1-standard-1
+ */
+ public const HOST_TYPE = 'host.type';
+
+ /**
+ * The amount of level 2 memory cache available to the processor (in Bytes).
+ *
+ * @example 12288000
+ */
+ public const HOST_CPU_CACHE_L2_SIZE = 'host.cpu.cache.l2.size';
+
+ /**
+ * Numeric value specifying the family or generation of the CPU.
+ *
+ * @example 6
+ */
+ public const HOST_CPU_FAMILY = 'host.cpu.family';
+
+ /**
+ * Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.
+ *
+ * @example 6
+ */
+ public const HOST_CPU_MODEL_ID = 'host.cpu.model.id';
+
+ /**
+ * Model designation of the processor.
+ *
+ * @example 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
+ */
+ public const HOST_CPU_MODEL_NAME = 'host.cpu.model.name';
+
+ /**
+ * Stepping or core revisions.
+ *
+ * @example 1
+ */
+ public const HOST_CPU_STEPPING = 'host.cpu.stepping';
+
+ /**
+ * Processor manufacturer identifier. A maximum 12-character string.
+ *
+ * CPUID command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string.
+ *
+ * @example GenuineIntel
+ */
+ public const HOST_CPU_VENDOR_ID = 'host.cpu.vendor.id';
+
+ /**
+ * The name of the cluster.
+ *
+ * @example opentelemetry-cluster
+ */
+ public const K8S_CLUSTER_NAME = 'k8s.cluster.name';
+
+ /**
+ * A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace.
+ *
+ * K8s does not have support for obtaining a cluster ID. If this is ever
+ * added, we will recommend collecting the `k8s.cluster.uid` through the
+ * official APIs. In the meantime, we are able to use the `uid` of the
+ * `kube-system` namespace as a proxy for cluster ID. Read on for the
+ * rationale.Every object created in a K8s cluster is assigned a distinct UID. The
+ * `kube-system` namespace is used by Kubernetes itself and will exist
+ * for the lifetime of the cluster. Using the `uid` of the `kube-system`
+ * namespace is a reasonable proxy for the K8s ClusterID as it will only
+ * change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
+ * UUIDs as standardized by
+ * ISO/IEC 9834-8 and ITU-T X.667.
+ * Which states:<blockquote>
+ * If generated according to one of the mechanisms defined in Rec.</blockquote>
+ * ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
+ * different from all other UUIDs generated before 3603 A.D., or is
+ * extremely likely to be different (depending on the mechanism chosen).Therefore, UIDs between clusters should be extremely unlikely to
+ * conflict.
+ *
+ * @example 218fc5a9-a5f1-4b54-aa05-46717d0ab26d
+ */
+ public const K8S_CLUSTER_UID = 'k8s.cluster.uid';
+
+ /**
+ * The name of the Node.
+ *
+ * @example node-1
+ */
+ public const K8S_NODE_NAME = 'k8s.node.name';
+
+ /**
+ * The UID of the Node.
+ *
+ * @example 1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2
+ */
+ public const K8S_NODE_UID = 'k8s.node.uid';
+
+ /**
+ * The name of the namespace that the pod is running in.
+ *
+ * @example default
+ */
+ public const K8S_NAMESPACE_NAME = 'k8s.namespace.name';
+
+ /**
+ * The name of the Pod.
+ *
+ * @example opentelemetry-pod-autoconf
+ */
+ public const K8S_POD_NAME = 'k8s.pod.name';
+
+ /**
+ * The UID of the Pod.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_POD_UID = 'k8s.pod.uid';
+
+ /**
+ * The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`).
+ *
+ * @example redis
+ */
+ public const K8S_CONTAINER_NAME = 'k8s.container.name';
+
+ /**
+ * Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.
+ *
+ * @example 2
+ */
+ public const K8S_CONTAINER_RESTART_COUNT = 'k8s.container.restart_count';
+
+ /**
+ * The name of the ReplicaSet.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_REPLICASET_NAME = 'k8s.replicaset.name';
+
+ /**
+ * The UID of the ReplicaSet.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_REPLICASET_UID = 'k8s.replicaset.uid';
+
+ /**
+ * The name of the Deployment.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_DEPLOYMENT_NAME = 'k8s.deployment.name';
+
+ /**
+ * The UID of the Deployment.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';
+
+ /**
+ * The name of the StatefulSet.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_STATEFULSET_NAME = 'k8s.statefulset.name';
+
+ /**
+ * The UID of the StatefulSet.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_STATEFULSET_UID = 'k8s.statefulset.uid';
+
+ /**
+ * The name of the DaemonSet.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_DAEMONSET_NAME = 'k8s.daemonset.name';
+
+ /**
+ * The UID of the DaemonSet.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_DAEMONSET_UID = 'k8s.daemonset.uid';
+
+ /**
+ * The name of the Job.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_JOB_NAME = 'k8s.job.name';
+
+ /**
+ * The UID of the Job.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_JOB_UID = 'k8s.job.uid';
+
+ /**
+ * The name of the CronJob.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_CRONJOB_NAME = 'k8s.cronjob.name';
+
+ /**
+ * The UID of the CronJob.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_CRONJOB_UID = 'k8s.cronjob.uid';
+
+ /**
+ * The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.
+ *
+ * Follows OCI Image Manifest Specification, and specifically the Digest property.
+ * An example can be found in Example Image Manifest.
+ *
+ * @example sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4
+ */
+ public const OCI_MANIFEST_DIGEST = 'oci.manifest.digest';
+
+ /**
+ * Unique identifier for a particular build or compilation of the operating system.
+ *
+ * @example TQ3C.230805.001.B2
+ * @example 20E247
+ * @example 22621
+ */
+ public const OS_BUILD_ID = 'os.build_id';
+
+ /**
+ * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.
+ *
+ * @example Microsoft Windows [Version 10.0.18363.778]
+ * @example Ubuntu 18.04.1 LTS
+ */
+ public const OS_DESCRIPTION = 'os.description';
+
+ /**
+ * Human readable operating system name.
+ *
+ * @example iOS
+ * @example Android
+ * @example Ubuntu
+ */
+ public const OS_NAME = 'os.name';
+
+ /**
+ * The operating system type.
+ */
+ public const OS_TYPE = 'os.type';
+
+ /**
+ * The version string of the operating system as defined in Version Attributes.
+ *
+ * @example 14.2.1
+ * @example 18.04.1
+ */
+ public const OS_VERSION = 'os.version';
+
+ /**
+ * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.
+ *
+ * @example cmd/otelcol
+ */
+ public const PROCESS_COMMAND = 'process.command';
+
+ /**
+ * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.
+ *
+ * @example cmd/otecol
+ * @example --config=config.yaml
+ */
+ public const PROCESS_COMMAND_ARGS = 'process.command_args';
+
+ /**
+ * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.
+ *
+ * @example C:\cmd\otecol --config="my directory\config.yaml"
+ */
+ public const PROCESS_COMMAND_LINE = 'process.command_line';
+
+ /**
+ * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.
+ *
+ * @example otelcol
+ */
+ public const PROCESS_EXECUTABLE_NAME = 'process.executable.name';
+
+ /**
+ * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.
+ *
+ * @example /usr/bin/cmd/otelcol
+ */
+ public const PROCESS_EXECUTABLE_PATH = 'process.executable.path';
+
+ /**
+ * The username of the user that owns the process.
+ *
+ * @example root
+ */
+ public const PROCESS_OWNER = 'process.owner';
+
+ /**
+ * Parent Process identifier (PID).
+ *
+ * @example 111
+ */
+ public const PROCESS_PARENT_PID = 'process.parent_pid';
+
+ /**
+ * Process identifier (PID).
+ *
+ * @example 1234
+ */
+ public const PROCESS_PID = 'process.pid';
+
+ /**
+ * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.
+ *
+ * @example Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0
+ */
+ public const PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description';
+
+ /**
+ * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.
+ *
+ * @example OpenJDK Runtime Environment
+ */
+ public const PROCESS_RUNTIME_NAME = 'process.runtime.name';
+
+ /**
+ * The version of the runtime of this process, as returned by the runtime without modification.
+ *
+ * @example 14.0.2
+ */
+ public const PROCESS_RUNTIME_VERSION = 'process.runtime.version';
+
+ /**
+ * Logical name of the service.
+ *
+ * MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with `process.executable.name`, e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.
+ *
+ * @example shoppingcart
+ */
+ public const SERVICE_NAME = 'service.name';
+
+ /**
+ * The version string of the service API or implementation. The format is not defined by these conventions.
+ *
+ * @example 2.0.0
+ * @example a01dbef8a
+ */
+ public const SERVICE_VERSION = 'service.version';
+
+ /**
+ * The string ID of the service instance.
+ *
+ * MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).
+ *
+ * @example my-k8s-pod-deployment-1
+ * @example 627cc493-f310-47de-96bd-71410b7dec09
+ */
+ public const SERVICE_INSTANCE_ID = 'service.instance.id';
+
+ /**
+ * A namespace for `service.name`.
+ *
+ * A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.
+ *
+ * @example Shop
+ */
+ public const SERVICE_NAMESPACE = 'service.namespace';
+
+ /**
+ * The language of the telemetry SDK.
+ */
+ public const TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';
+
+ /**
+ * The name of the telemetry SDK as defined above.
+ *
+ * The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
+ * If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
+ * `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point
+ * or another suitable identifier depending on the language.
+ * The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
+ * All custom identifiers SHOULD be stable across different versions of an implementation.
+ *
+ * @example opentelemetry
+ */
+ public const TELEMETRY_SDK_NAME = 'telemetry.sdk.name';
+
+ /**
+ * The version string of the telemetry SDK.
+ *
+ * @example 1.2.3
+ */
+ public const TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';
+
+ /**
+ * The name of the auto instrumentation agent or distribution, if used.
+ *
+ * Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to
+ * a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.
+ *
+ * @example parts-unlimited-java
+ */
+ public const TELEMETRY_DISTRO_NAME = 'telemetry.distro.name';
+
+ /**
+ * The version string of the auto instrumentation agent or distribution, if used.
+ *
+ * @example 1.2.3
+ */
+ public const TELEMETRY_DISTRO_VERSION = 'telemetry.distro.version';
+
+ /**
+ * Additional description of the web engine (e.g. detailed version and edition information).
+ *
+ * @example WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final
+ */
+ public const WEBENGINE_DESCRIPTION = 'webengine.description';
+
+ /**
+ * The name of the web engine.
+ *
+ * @example WildFly
+ */
+ public const WEBENGINE_NAME = 'webengine.name';
+
+ /**
+ * The version of the web engine.
+ *
+ * @example 21.0.0
+ */
+ public const WEBENGINE_VERSION = 'webengine.version';
+
+ /**
+ * The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+ *
+ * @example io.opentelemetry.contrib.mongodb
+ */
+ public const OTEL_SCOPE_NAME = 'otel.scope.name';
+
+ /**
+ * The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+ *
+ * @example 1.0.0
+ */
+ public const OTEL_SCOPE_VERSION = 'otel.scope.version';
+
+ /**
+ * Deprecated, use the `otel.scope.name` attribute.
+ *
+ * @deprecated Deprecated, use the `otel.scope.name` attribute..
+ * @example io.opentelemetry.contrib.mongodb
+ */
+ public const OTEL_LIBRARY_NAME = 'otel.library.name';
+
+ /**
+ * Deprecated, use the `otel.scope.version` attribute.
+ *
+ * @deprecated Deprecated, use the `otel.scope.version` attribute..
+ * @example 1.0.0
+ */
+ public const OTEL_LIBRARY_VERSION = 'otel.library.version';
+
+ /**
+ * @deprecated Use USER_AGENT_ORIGINAL
+ */
+ public const BROWSER_USER_AGENT = 'browser.user_agent';
+
+ /**
+ * @deprecated Use CLOUD_RESOURCE_ID
+ */
+ public const FAAS_ID = 'faas.id';
+
+ /**
+ * @deprecated Use TELEMETRY_DISTRO_VERSION
+ */
+ public const TELEMETRY_AUTO_VERSION = 'telemetry.auto.version';
+
+ /**
+ * @deprecated Use CONTAINER_IMAGE_TAGS
+ */
+ public const CONTAINER_IMAGE_TAG = 'container.image.tag';
+}
diff --git a/vendor/open-telemetry/sem-conv/TraceAttributes.php b/vendor/open-telemetry/sem-conv/TraceAttributes.php
new file mode 100644
index 000000000..4329db5f9
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/TraceAttributes.php
@@ -0,0 +1,2052 @@
+<?php
+
+// DO NOT EDIT, this is an Auto-generated file from script/semantic-convention/templates/Attributes.php.j2
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SemConv;
+
+interface TraceAttributes
+{
+ /**
+ * The URL of the OpenTelemetry schema for these keys and values.
+ */
+ public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.22.0';
+
+ /**
+ * Client address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name.
+ *
+ * When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example client.example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const CLIENT_ADDRESS = 'client.address';
+
+ /**
+ * Client port number.
+ *
+ * When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example 65123
+ */
+ public const CLIENT_PORT = 'client.port';
+
+ /**
+ * Deprecated, use `server.address`.
+ *
+ * @deprecated Deprecated, use `server.address`..
+ * @example example.com
+ */
+ public const NET_HOST_NAME = 'net.host.name';
+
+ /**
+ * Deprecated, use `server.port`.
+ *
+ * @deprecated Deprecated, use `server.port`..
+ * @example 8080
+ */
+ public const NET_HOST_PORT = 'net.host.port';
+
+ /**
+ * Deprecated, use `server.address` on client spans and `client.address` on server spans.
+ *
+ * @deprecated Deprecated, use `server.address` on client spans and `client.address` on server spans..
+ * @example example.com
+ */
+ public const NET_PEER_NAME = 'net.peer.name';
+
+ /**
+ * Deprecated, use `server.port` on client spans and `client.port` on server spans.
+ *
+ * @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans..
+ * @example 8080
+ */
+ public const NET_PEER_PORT = 'net.peer.port';
+
+ /**
+ * Deprecated, use `network.protocol.name`.
+ *
+ * @deprecated Deprecated, use `network.protocol.name`..
+ * @example amqp
+ * @example http
+ * @example mqtt
+ */
+ public const NET_PROTOCOL_NAME = 'net.protocol.name';
+
+ /**
+ * Deprecated, use `network.protocol.version`.
+ *
+ * @deprecated Deprecated, use `network.protocol.version`..
+ * @example 3.1.1
+ */
+ public const NET_PROTOCOL_VERSION = 'net.protocol.version';
+
+ /**
+ * Deprecated, use `network.transport` and `network.type`.
+ */
+ public const NET_SOCK_FAMILY = 'net.sock.family';
+
+ /**
+ * Deprecated, use `network.local.address`.
+ *
+ * @deprecated Deprecated, use `network.local.address`..
+ * @example /var/my.sock
+ */
+ public const NET_SOCK_HOST_ADDR = 'net.sock.host.addr';
+
+ /**
+ * Deprecated, use `network.local.port`.
+ *
+ * @deprecated Deprecated, use `network.local.port`..
+ * @example 8080
+ */
+ public const NET_SOCK_HOST_PORT = 'net.sock.host.port';
+
+ /**
+ * Deprecated, use `network.peer.address`.
+ *
+ * @deprecated Deprecated, use `network.peer.address`..
+ * @example 192.168.0.1
+ */
+ public const NET_SOCK_PEER_ADDR = 'net.sock.peer.addr';
+
+ /**
+ * Deprecated, no replacement at this time.
+ *
+ * @deprecated Deprecated, no replacement at this time..
+ * @example /var/my.sock
+ */
+ public const NET_SOCK_PEER_NAME = 'net.sock.peer.name';
+
+ /**
+ * Deprecated, use `network.peer.port`.
+ *
+ * @deprecated Deprecated, use `network.peer.port`..
+ * @example 65531
+ */
+ public const NET_SOCK_PEER_PORT = 'net.sock.peer.port';
+
+ /**
+ * Deprecated, use `network.transport`.
+ */
+ public const NET_TRANSPORT = 'net.transport';
+
+ /**
+ * Destination address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name.
+ *
+ * When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example destination.example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const DESTINATION_ADDRESS = 'destination.address';
+
+ /**
+ * Destination port number.
+ *
+ * @example 3389
+ * @example 2888
+ */
+ public const DESTINATION_PORT = 'destination.port';
+
+ /**
+ * Describes a class of error the operation ended with.
+ *
+ * The `error.type` SHOULD be predictable and SHOULD have low cardinality.
+ * Instrumentations SHOULD document the list of errors they report.The cardinality of `error.type` within one instrumentation library SHOULD be low, but
+ * telemetry consumers that aggregate data from multiple instrumentation libraries and applications
+ * should be prepared for `error.type` to have high cardinality at query time, when no
+ * additional filters are applied.If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.If a specific domain defines its own set of error codes (such as HTTP or gRPC status codes),
+ * it's RECOMMENDED to use a domain-specific attribute and also set `error.type` to capture
+ * all errors, regardless of whether they are defined within the domain-specific set or not.
+ *
+ * @example timeout
+ * @example java.net.UnknownHostException
+ * @example server_certificate_invalid
+ * @example 500
+ */
+ public const ERROR_TYPE = 'error.type';
+
+ /**
+ * The exception message.
+ *
+ * @example Division by zero
+ * @example Can't convert 'int' object to str implicitly
+ */
+ public const EXCEPTION_MESSAGE = 'exception.message';
+
+ /**
+ * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.
+ *
+ * @example Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)
+ */
+ public const EXCEPTION_STACKTRACE = 'exception.stacktrace';
+
+ /**
+ * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.
+ *
+ * @example java.net.ConnectException
+ * @example OSError
+ */
+ public const EXCEPTION_TYPE = 'exception.type';
+
+ /**
+ * The name of the invoked function.
+ *
+ * SHOULD be equal to the `faas.name` resource attribute of the invoked function.
+ *
+ * @example my-function
+ */
+ public const FAAS_INVOKED_NAME = 'faas.invoked_name';
+
+ /**
+ * The cloud provider of the invoked function.
+ *
+ * SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.
+ */
+ public const FAAS_INVOKED_PROVIDER = 'faas.invoked_provider';
+
+ /**
+ * The cloud region of the invoked function.
+ *
+ * SHOULD be equal to the `cloud.region` resource attribute of the invoked function.
+ *
+ * @example eu-central-1
+ */
+ public const FAAS_INVOKED_REGION = 'faas.invoked_region';
+
+ /**
+ * Type of the trigger which caused this function invocation.
+ */
+ public const FAAS_TRIGGER = 'faas.trigger';
+
+ /**
+ * The `service.name` of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.
+ *
+ * @example AuthTokenCache
+ */
+ public const PEER_SERVICE = 'peer.service';
+
+ /**
+ * Username or client_id extracted from the access token or Authorization header in the inbound request from outside the system.
+ *
+ * @example username
+ */
+ public const ENDUSER_ID = 'enduser.id';
+
+ /**
+ * Actual/assumed role the client is making the request under extracted from token or application security context.
+ *
+ * @example admin
+ */
+ public const ENDUSER_ROLE = 'enduser.role';
+
+ /**
+ * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 Assertion.
+ *
+ * @example read:message, write:files
+ */
+ public const ENDUSER_SCOPE = 'enduser.scope';
+
+ /**
+ * Whether the thread is daemon or not.
+ */
+ public const THREAD_DAEMON = 'thread.daemon';
+
+ /**
+ * Current &quot;managed&quot; thread ID (as opposed to OS thread ID).
+ *
+ * @example 42
+ */
+ public const THREAD_ID = 'thread.id';
+
+ /**
+ * Current thread name.
+ *
+ * @example main
+ */
+ public const THREAD_NAME = 'thread.name';
+
+ /**
+ * The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
+ *
+ * @example 16
+ */
+ public const CODE_COLUMN = 'code.column';
+
+ /**
+ * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
+ *
+ * @example /usr/local/MyApplication/content_root/app/index.php
+ */
+ public const CODE_FILEPATH = 'code.filepath';
+
+ /**
+ * The method or function name, or equivalent (usually rightmost part of the code unit's name).
+ *
+ * @example serveRequest
+ */
+ public const CODE_FUNCTION = 'code.function';
+
+ /**
+ * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
+ *
+ * @example 42
+ */
+ public const CODE_LINENO = 'code.lineno';
+
+ /**
+ * The &quot;namespace&quot; within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.
+ *
+ * @example com.example.MyHttpService
+ */
+ public const CODE_NAMESPACE = 'code.namespace';
+
+ /**
+ * HTTP request method.
+ *
+ * HTTP request method value SHOULD be &quot;known&quot; to the instrumentation.
+ * By default, this convention defines &quot;known&quot; methods as the ones listed in RFC9110
+ * and the PATCH method defined in RFC5789.If the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override
+ * the list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named
+ * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods
+ * (this list MUST be a full override of the default known method, it is not a list of known methods in addition to the defaults).HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.
+ * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.
+ * Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.
+ *
+ * @example GET
+ * @example POST
+ * @example HEAD
+ */
+ public const HTTP_REQUEST_METHOD = 'http.request.method';
+
+ /**
+ * HTTP response status code.
+ *
+ * @example 200
+ */
+ public const HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code';
+
+ /**
+ * OSI application layer or non-OSI equivalent.
+ *
+ * The value SHOULD be normalized to lowercase.
+ *
+ * @example http
+ * @example spdy
+ */
+ public const NETWORK_PROTOCOL_NAME = 'network.protocol.name';
+
+ /**
+ * Version of the protocol specified in `network.protocol.name`.
+ *
+ * `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
+ *
+ * @example 1.0
+ * @example 1.1
+ * @example 2
+ * @example 3
+ */
+ public const NETWORK_PROTOCOL_VERSION = 'network.protocol.version';
+
+ /**
+ * Host identifier of the &quot;URI origin&quot; HTTP request is sent to.
+ *
+ * Determined by using the first of the following that applies<ul>
+ * <li>Host identifier of the request target
+ * if it's sent in absolute-form</li>
+ * <li>Host identifier of the `Host` header</li>
+ * </ul>
+ * If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then
+ * `server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
+ *
+ * @example example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const SERVER_ADDRESS = 'server.address';
+
+ /**
+ * Port identifier of the &quot;URI origin&quot; HTTP request is sent to.
+ *
+ * When request target is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
+ *
+ * @example 80
+ * @example 8080
+ * @example 443
+ */
+ public const SERVER_PORT = 'server.port';
+
+ /**
+ * The matched route (path template in the format used by the respective server framework). See note below.
+ *
+ * MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
+ * SHOULD include the application root if there is one.
+ *
+ * @example /users/:userID?
+ * @example {controller}/{action}/{id?}
+ */
+ public const HTTP_ROUTE = 'http.route';
+
+ /**
+ * The URI scheme component identifying the used protocol.
+ *
+ * @example http
+ * @example https
+ */
+ public const URL_SCHEME = 'url.scheme';
+
+ /**
+ * The domain identifies the business context for the events.
+ *
+ * Events across different domains may have same `event.name`, yet be
+ * unrelated events.
+ */
+ public const EVENT_DOMAIN = 'event.domain';
+
+ /**
+ * The name identifies the event.
+ *
+ * @example click
+ * @example exception
+ */
+ public const EVENT_NAME = 'event.name';
+
+ /**
+ * A unique identifier for the Log Record.
+ *
+ * If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values.
+ * The id MAY be an Universally Unique Lexicographically Sortable Identifier (ULID), but other identifiers (e.g. UUID) may be used as needed.
+ *
+ * @example 01ARZ3NDEKTSV4RRFFQ69G5FAV
+ */
+ public const LOG_RECORD_UID = 'log.record.uid';
+
+ /**
+ * The unique identifier of the feature flag.
+ *
+ * @example logo-color
+ */
+ public const FEATURE_FLAG_KEY = 'feature_flag.key';
+
+ /**
+ * The name of the service provider that performs the flag evaluation.
+ *
+ * @example Flag Manager
+ */
+ public const FEATURE_FLAG_PROVIDER_NAME = 'feature_flag.provider_name';
+
+ /**
+ * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used.
+ *
+ * A semantic identifier, commonly referred to as a variant, provides a means
+ * for referring to a value without including the value itself. This can
+ * provide additional context for understanding the meaning behind a value.
+ * For example, the variant `red` maybe be used for the value `#c05543`.A stringified version of the value can be used in situations where a
+ * semantic identifier is unavailable. String representation of the value
+ * should be determined by the implementer.
+ *
+ * @example red
+ * @example true
+ * @example on
+ */
+ public const FEATURE_FLAG_VARIANT = 'feature_flag.variant';
+
+ /**
+ * The stream associated with the log. See below for a list of well-known values.
+ */
+ public const LOG_IOSTREAM = 'log.iostream';
+
+ /**
+ * The basename of the file.
+ *
+ * @example audit.log
+ */
+ public const LOG_FILE_NAME = 'log.file.name';
+
+ /**
+ * The basename of the file, with symlinks resolved.
+ *
+ * @example uuid.log
+ */
+ public const LOG_FILE_NAME_RESOLVED = 'log.file.name_resolved';
+
+ /**
+ * The full path to the file.
+ *
+ * @example /var/log/mysql/audit.log
+ */
+ public const LOG_FILE_PATH = 'log.file.path';
+
+ /**
+ * The full path to the file, with symlinks resolved.
+ *
+ * @example /var/lib/docker/uuid.log
+ */
+ public const LOG_FILE_PATH_RESOLVED = 'log.file.path_resolved';
+
+ /**
+ * The name of the connection pool; unique within the instrumented application. In case the connection pool implementation does not provide a name, then the db.connection_string should be used.
+ *
+ * @example myDataSource
+ */
+ public const POOL_NAME = 'pool.name';
+
+ /**
+ * The state of a connection in the pool.
+ *
+ * @example idle
+ */
+ public const STATE = 'state';
+
+ /**
+ * Name of the buffer pool.
+ *
+ * Pool names are generally obtained via BufferPoolMXBean#getName().
+ *
+ * @example mapped
+ * @example direct
+ */
+ public const JVM_BUFFER_POOL_NAME = 'jvm.buffer.pool.name';
+
+ /**
+ * Name of the memory pool.
+ *
+ * Pool names are generally obtained via MemoryPoolMXBean#getName().
+ *
+ * @example G1 Old Gen
+ * @example G1 Eden space
+ * @example G1 Survivor Space
+ */
+ public const JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name';
+
+ /**
+ * The type of memory.
+ *
+ * @example heap
+ * @example non_heap
+ */
+ public const JVM_MEMORY_TYPE = 'jvm.memory.type';
+
+ /**
+ * OSI transport layer or inter-process communication method.
+ *
+ * The value SHOULD be normalized to lowercase.Consider always setting the transport when setting a port number, since
+ * a port number is ambiguous without knowing the transport, for example
+ * different processes could be listening on TCP port 12345 and UDP port 12345.
+ *
+ * @example tcp
+ * @example udp
+ */
+ public const NETWORK_TRANSPORT = 'network.transport';
+
+ /**
+ * OSI network layer or non-OSI equivalent.
+ *
+ * The value SHOULD be normalized to lowercase.
+ *
+ * @example ipv4
+ * @example ipv6
+ */
+ public const NETWORK_TYPE = 'network.type';
+
+ /**
+ * The name of the (logical) method being called, must be equal to the $method part in the span name.
+ *
+ * This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).
+ *
+ * @example exampleMethod
+ */
+ public const RPC_METHOD = 'rpc.method';
+
+ /**
+ * The full (logical) name of the service being called, including its package name, if applicable.
+ *
+ * This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).
+ *
+ * @example myservice.EchoService
+ */
+ public const RPC_SERVICE = 'rpc.service';
+
+ /**
+ * A string identifying the remoting system. See below for a list of well-known identifiers.
+ */
+ public const RPC_SYSTEM = 'rpc.system';
+
+ /**
+ * The device identifier.
+ *
+ * @example (identifier)
+ */
+ public const SYSTEM_DEVICE = 'system.device';
+
+ /**
+ * The logical CPU number [0..n-1].
+ *
+ * @example 1
+ */
+ public const SYSTEM_CPU_LOGICAL_NUMBER = 'system.cpu.logical_number';
+
+ /**
+ * The state of the CPU.
+ *
+ * @example idle
+ * @example interrupt
+ */
+ public const SYSTEM_CPU_STATE = 'system.cpu.state';
+
+ /**
+ * The memory state.
+ *
+ * @example free
+ * @example cached
+ */
+ public const SYSTEM_MEMORY_STATE = 'system.memory.state';
+
+ /**
+ * The paging access direction.
+ *
+ * @example in
+ */
+ public const SYSTEM_PAGING_DIRECTION = 'system.paging.direction';
+
+ /**
+ * The memory paging state.
+ *
+ * @example free
+ */
+ public const SYSTEM_PAGING_STATE = 'system.paging.state';
+
+ /**
+ * The memory paging type.
+ *
+ * @example minor
+ */
+ public const SYSTEM_PAGING_TYPE = 'system.paging.type';
+
+ /**
+ * The disk operation direction.
+ *
+ * @example read
+ */
+ public const SYSTEM_DISK_DIRECTION = 'system.disk.direction';
+
+ /**
+ * The filesystem mode.
+ *
+ * @example rw, ro
+ */
+ public const SYSTEM_FILESYSTEM_MODE = 'system.filesystem.mode';
+
+ /**
+ * The filesystem mount path.
+ *
+ * @example /mnt/data
+ */
+ public const SYSTEM_FILESYSTEM_MOUNTPOINT = 'system.filesystem.mountpoint';
+
+ /**
+ * The filesystem state.
+ *
+ * @example used
+ */
+ public const SYSTEM_FILESYSTEM_STATE = 'system.filesystem.state';
+
+ /**
+ * The filesystem type.
+ *
+ * @example ext4
+ */
+ public const SYSTEM_FILESYSTEM_TYPE = 'system.filesystem.type';
+
+ /**
+ * .
+ *
+ * @example transmit
+ */
+ public const SYSTEM_NETWORK_DIRECTION = 'system.network.direction';
+
+ /**
+ * A stateless protocol MUST NOT set this attribute.
+ *
+ * @example close_wait
+ */
+ public const SYSTEM_NETWORK_STATE = 'system.network.state';
+
+ /**
+ * The process state, e.g., Linux Process State Codes.
+ *
+ * @example running
+ */
+ public const SYSTEM_PROCESSES_STATUS = 'system.processes.status';
+
+ /**
+ * Local address of the network connection - IP address or Unix domain socket name.
+ *
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const NETWORK_LOCAL_ADDRESS = 'network.local.address';
+
+ /**
+ * Local port number of the network connection.
+ *
+ * @example 65123
+ */
+ public const NETWORK_LOCAL_PORT = 'network.local.port';
+
+ /**
+ * Peer address of the network connection - IP address or Unix domain socket name.
+ *
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const NETWORK_PEER_ADDRESS = 'network.peer.address';
+
+ /**
+ * Peer port number of the network connection.
+ *
+ * @example 65123
+ */
+ public const NETWORK_PEER_PORT = 'network.peer.port';
+
+ /**
+ * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.
+ *
+ * @example DE
+ */
+ public const NETWORK_CARRIER_ICC = 'network.carrier.icc';
+
+ /**
+ * The mobile carrier country code.
+ *
+ * @example 310
+ */
+ public const NETWORK_CARRIER_MCC = 'network.carrier.mcc';
+
+ /**
+ * The mobile carrier network code.
+ *
+ * @example 001
+ */
+ public const NETWORK_CARRIER_MNC = 'network.carrier.mnc';
+
+ /**
+ * The name of the mobile carrier.
+ *
+ * @example sprint
+ */
+ public const NETWORK_CARRIER_NAME = 'network.carrier.name';
+
+ /**
+ * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.
+ *
+ * @example LTE
+ */
+ public const NETWORK_CONNECTION_SUBTYPE = 'network.connection.subtype';
+
+ /**
+ * The internet connection type.
+ *
+ * @example wifi
+ */
+ public const NETWORK_CONNECTION_TYPE = 'network.connection.type';
+
+ /**
+ * Deprecated, use `http.request.method` instead.
+ *
+ * @deprecated Deprecated, use `http.request.method` instead..
+ * @example GET
+ * @example POST
+ * @example HEAD
+ */
+ public const HTTP_METHOD = 'http.method';
+
+ /**
+ * Deprecated, use `http.request.body.size` instead.
+ *
+ * @deprecated Deprecated, use `http.request.body.size` instead..
+ * @example 3495
+ */
+ public const HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length';
+
+ /**
+ * Deprecated, use `http.response.body.size` instead.
+ *
+ * @deprecated Deprecated, use `http.response.body.size` instead..
+ * @example 3495
+ */
+ public const HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';
+
+ /**
+ * Deprecated, use `url.scheme` instead.
+ *
+ * @deprecated Deprecated, use `url.scheme` instead..
+ * @example http
+ * @example https
+ */
+ public const HTTP_SCHEME = 'http.scheme';
+
+ /**
+ * Deprecated, use `http.response.status_code` instead.
+ *
+ * @deprecated Deprecated, use `http.response.status_code` instead..
+ * @example 200
+ */
+ public const HTTP_STATUS_CODE = 'http.status_code';
+
+ /**
+ * Deprecated, use `url.path` and `url.query` instead.
+ *
+ * @deprecated Deprecated, use `url.path` and `url.query` instead..
+ * @example /search?q=OpenTelemetry#SemConv
+ */
+ public const HTTP_TARGET = 'http.target';
+
+ /**
+ * Deprecated, use `url.full` instead.
+ *
+ * @deprecated Deprecated, use `url.full` instead..
+ * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv
+ */
+ public const HTTP_URL = 'http.url';
+
+ /**
+ * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
+ *
+ * @example 3495
+ */
+ public const HTTP_REQUEST_BODY_SIZE = 'http.request.body.size';
+
+ /**
+ * Original HTTP method sent by the client in the request line.
+ *
+ * @example GeT
+ * @example ACL
+ * @example foo
+ */
+ public const HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original';
+
+ /**
+ * The ordinal number of request resending attempt (for any reason, including redirects).
+ *
+ * The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).
+ *
+ * @example 3
+ */
+ public const HTTP_RESEND_COUNT = 'http.resend_count';
+
+ /**
+ * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
+ *
+ * @example 3495
+ */
+ public const HTTP_RESPONSE_BODY_SIZE = 'http.response.body.size';
+
+ /**
+ * A unique id to identify a session.
+ *
+ * @example 00112233-4455-6677-8899-aabbccddeeff
+ */
+ public const SESSION_ID = 'session.id';
+
+ /**
+ * Source address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name.
+ *
+ * When observed from the destination side, and when communicating through an intermediary, `source.address` SHOULD represent the source address behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example source.example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const SOURCE_ADDRESS = 'source.address';
+
+ /**
+ * Source port number.
+ *
+ * @example 3389
+ * @example 2888
+ */
+ public const SOURCE_PORT = 'source.port';
+
+ /**
+ * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).
+ *
+ * This may be different from `cloud.resource_id` if an alias is involved.
+ *
+ * @example arn:aws:lambda:us-east-1:123456:function:myfunction:myalias
+ */
+ public const AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn';
+
+ /**
+ * The event_id uniquely identifies the event.
+ *
+ * @example 123e4567-e89b-12d3-a456-426614174000
+ * @example 0001
+ */
+ public const CLOUDEVENTS_EVENT_ID = 'cloudevents.event_id';
+
+ /**
+ * The source identifies the context in which an event happened.
+ *
+ * @example https://github.com/cloudevents
+ * @example /cloudevents/spec/pull/123
+ * @example my-service
+ */
+ public const CLOUDEVENTS_EVENT_SOURCE = 'cloudevents.event_source';
+
+ /**
+ * The version of the CloudEvents specification which the event uses.
+ *
+ * @example 1.0
+ */
+ public const CLOUDEVENTS_EVENT_SPEC_VERSION = 'cloudevents.event_spec_version';
+
+ /**
+ * The subject of the event in the context of the event producer (identified by source).
+ *
+ * @example mynewfile.jpg
+ */
+ public const CLOUDEVENTS_EVENT_SUBJECT = 'cloudevents.event_subject';
+
+ /**
+ * The event_type contains a value describing the type of event related to the originating occurrence.
+ *
+ * @example com.github.pull_request.opened
+ * @example com.example.object.deleted.v2
+ */
+ public const CLOUDEVENTS_EVENT_TYPE = 'cloudevents.event_type';
+
+ /**
+ * Parent-child Reference type.
+ *
+ * The causal relationship between a child Span and a parent Span.
+ */
+ public const OPENTRACING_REF_TYPE = 'opentracing.ref_type';
+
+ /**
+ * The connection string used to connect to the database. It is recommended to remove embedded credentials.
+ *
+ * @example Server=(localdb)\v11.0;Integrated Security=true;
+ */
+ public const DB_CONNECTION_STRING = 'db.connection_string';
+
+ /**
+ * The fully-qualified class name of the Java Database Connectivity (JDBC) driver used to connect.
+ *
+ * @example org.postgresql.Driver
+ * @example com.microsoft.sqlserver.jdbc.SQLServerDriver
+ */
+ public const DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname';
+
+ /**
+ * This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).
+ *
+ * In some SQL databases, the database name to be used is called &quot;schema name&quot;. In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name).
+ *
+ * @example customers
+ * @example main
+ */
+ public const DB_NAME = 'db.name';
+
+ /**
+ * The name of the operation being executed, e.g. the MongoDB command name such as `findAndModify`, or the SQL keyword.
+ *
+ * When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.
+ *
+ * @example findAndModify
+ * @example HMSET
+ * @example SELECT
+ */
+ public const DB_OPERATION = 'db.operation';
+
+ /**
+ * The database statement being executed.
+ *
+ * @example SELECT * FROM wuser_table
+ * @example SET mykey "WuValue"
+ */
+ public const DB_STATEMENT = 'db.statement';
+
+ /**
+ * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.
+ */
+ public const DB_SYSTEM = 'db.system';
+
+ /**
+ * Username for accessing the database.
+ *
+ * @example readonly_user
+ * @example reporting_user
+ */
+ public const DB_USER = 'db.user';
+
+ /**
+ * The Microsoft SQL Server instance name connecting to. This name is used to determine the port of a named instance.
+ *
+ * If setting a `db.mssql.instance_name`, `server.port` is no longer required (but still recommended if non-standard).
+ *
+ * @example MSSQLSERVER
+ */
+ public const DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name';
+
+ /**
+ * The consistency level of the query. Based on consistency values from CQL.
+ */
+ public const DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level';
+
+ /**
+ * The data center of the coordinating node for a query.
+ *
+ * @example us-west-2
+ */
+ public const DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc';
+
+ /**
+ * The ID of the coordinating node for a query.
+ *
+ * @example be13faa2-8574-4d71-926d-27f16cf8a7af
+ */
+ public const DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id';
+
+ /**
+ * Whether or not the query is idempotent.
+ */
+ public const DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence';
+
+ /**
+ * The fetch size used for paging, i.e. how many rows will be returned at once.
+ *
+ * @example 5000
+ */
+ public const DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size';
+
+ /**
+ * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.
+ *
+ * @example 2
+ */
+ public const DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count';
+
+ /**
+ * The name of the primary table that the operation is acting upon, including the keyspace name (if applicable).
+ *
+ * This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.
+ *
+ * @example mytable
+ */
+ public const DB_CASSANDRA_TABLE = 'db.cassandra.table';
+
+ /**
+ * The index of the database being accessed as used in the `SELECT` command, provided as an integer. To be used instead of the generic `db.name` attribute.
+ *
+ * @example 1
+ * @example 15
+ */
+ public const DB_REDIS_DATABASE_INDEX = 'db.redis.database_index';
+
+ /**
+ * The collection being accessed within the database stated in `db.name`.
+ *
+ * @example customers
+ * @example products
+ */
+ public const DB_MONGODB_COLLECTION = 'db.mongodb.collection';
+
+ /**
+ * Represents the identifier of an Elasticsearch cluster.
+ *
+ * @example e9106fc68e3044f0b1475b04bf4ffd5f
+ */
+ public const DB_ELASTICSEARCH_CLUSTER_NAME = 'db.elasticsearch.cluster.name';
+
+ /**
+ * Represents the human-readable identifier of the node/instance to which a request was routed.
+ *
+ * @example instance-0000000001
+ */
+ public const DB_ELASTICSEARCH_NODE_NAME = 'db.elasticsearch.node.name';
+
+ /**
+ * Absolute URL describing a network resource according to RFC3986.
+ *
+ * For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.
+ * `url.full` MUST NOT contain credentials passed via URL in form of `https://username:[email protected]/`. In such case username and password should be redacted and attribute's value should be `https://REDACTED:[email protected]/`.
+ * `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes.
+ *
+ * @example https://localhost:9200/index/_search?q=user.id:kimchy
+ */
+ public const URL_FULL = 'url.full';
+
+ /**
+ * The name of the primary table that the operation is acting upon, including the database name (if applicable).
+ *
+ * It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.
+ *
+ * @example public.users
+ * @example customers
+ */
+ public const DB_SQL_TABLE = 'db.sql.table';
+
+ /**
+ * Unique Cosmos client instance id.
+ *
+ * @example 3ba4827d-4422-483f-b59f-85b74211c11d
+ */
+ public const DB_COSMOSDB_CLIENT_ID = 'db.cosmosdb.client_id';
+
+ /**
+ * Cosmos client connection mode.
+ */
+ public const DB_COSMOSDB_CONNECTION_MODE = 'db.cosmosdb.connection_mode';
+
+ /**
+ * Cosmos DB container name.
+ *
+ * @example anystring
+ */
+ public const DB_COSMOSDB_CONTAINER = 'db.cosmosdb.container';
+
+ /**
+ * CosmosDB Operation Type.
+ */
+ public const DB_COSMOSDB_OPERATION_TYPE = 'db.cosmosdb.operation_type';
+
+ /**
+ * RU consumed for that operation.
+ *
+ * @example 46.18
+ * @example 1.0
+ */
+ public const DB_COSMOSDB_REQUEST_CHARGE = 'db.cosmosdb.request_charge';
+
+ /**
+ * Request payload size in bytes.
+ */
+ public const DB_COSMOSDB_REQUEST_CONTENT_LENGTH = 'db.cosmosdb.request_content_length';
+
+ /**
+ * Cosmos DB status code.
+ *
+ * @example 200
+ * @example 201
+ */
+ public const DB_COSMOSDB_STATUS_CODE = 'db.cosmosdb.status_code';
+
+ /**
+ * Cosmos DB sub status code.
+ *
+ * @example 1000
+ * @example 1002
+ */
+ public const DB_COSMOSDB_SUB_STATUS_CODE = 'db.cosmosdb.sub_status_code';
+
+ /**
+ * Full user-agent string is generated by Cosmos DB SDK.
+ *
+ * The user-agent value is generated by SDK which is a combination of&lt;br&gt; `sdk_version` : Current version of SDK. e.g. 'cosmos-netstandard-sdk/3.23.0'&lt;br&gt; `direct_pkg_version` : Direct package version used by Cosmos DB SDK. e.g. '3.23.1'&lt;br&gt; `number_of_client_instances` : Number of cosmos client instances created by the application. e.g. '1'&lt;br&gt; `type_of_machine_architecture` : Machine architecture. e.g. 'X64'&lt;br&gt; `operating_system` : Operating System. e.g. 'Linux 5.4.0-1098-azure 104 18'&lt;br&gt; `runtime_framework` : Runtime Framework. e.g. '.NET Core 3.1.32'&lt;br&gt; `failover_information` : Generated key to determine if region failover enabled.
+ * Format Reg-{D (Disabled discovery)}-S(application region)|L(List of preferred regions)|N(None, user did not configure it).
+ * Default value is &quot;NS&quot;.
+ *
+ * @example cosmos-netstandard-sdk/3.23.0\|3.23.1\|1\|X64\|Linux 5.4.0-1098-azure 104 18\|.NET Core 3.1.32\|S\|
+ */
+ public const USER_AGENT_ORIGINAL = 'user_agent.original';
+
+ /**
+ * Name of the code, either &quot;OK&quot; or &quot;ERROR&quot;. MUST NOT be set if the status code is UNSET.
+ */
+ public const OTEL_STATUS_CODE = 'otel.status_code';
+
+ /**
+ * Description of the Status if it has a value, otherwise not set.
+ *
+ * @example resource not found
+ */
+ public const OTEL_STATUS_DESCRIPTION = 'otel.status_description';
+
+ /**
+ * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on GCP).
+ *
+ * On some cloud providers, it may not be possible to determine the full ID at startup,
+ * so it may be necessary to set `cloud.resource_id` as a span attribute instead.The exact value to use for `cloud.resource_id` depends on the cloud provider.
+ * The following well-known definitions MUST be used if you set this attribute and they apply:<ul>
+ * <li><strong>AWS Lambda:</strong> The function ARN.
+ * Take care not to use the &quot;invoked ARN&quot; directly but replace any
+ * alias suffix
+ * with the resolved function version, as the same runtime instance may be invokable with
+ * multiple different aliases.</li>
+ * <li><strong>GCP:</strong> The URI of the resource</li>
+ * <li><strong>Azure:</strong> The Fully Qualified Resource ID of the invoked function,
+ * <em>not</em> the function app, having the form
+ * `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
+ * This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
+ * a TracerProvider.</li>
+ * </ul>
+ *
+ * @example arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function
+ * @example //run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID
+ * @example /subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>
+ */
+ public const CLOUD_RESOURCE_ID = 'cloud.resource_id';
+
+ /**
+ * The invocation ID of the current function invocation.
+ *
+ * @example af9d5aa4-a685-4c5f-a22b-444f80b3cc28
+ */
+ public const FAAS_INVOCATION_ID = 'faas.invocation_id';
+
+ /**
+ * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.
+ *
+ * @example myBucketName
+ * @example myDbName
+ */
+ public const FAAS_DOCUMENT_COLLECTION = 'faas.document.collection';
+
+ /**
+ * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.
+ *
+ * @example myFile.txt
+ * @example myTableName
+ */
+ public const FAAS_DOCUMENT_NAME = 'faas.document.name';
+
+ /**
+ * Describes the type of the operation that was performed on the data.
+ */
+ public const FAAS_DOCUMENT_OPERATION = 'faas.document.operation';
+
+ /**
+ * A string containing the time when the data was accessed in the ISO 8601 format expressed in UTC.
+ *
+ * @example 2020-01-23T13:47:06Z
+ */
+ public const FAAS_DOCUMENT_TIME = 'faas.document.time';
+
+ /**
+ * The URI path component.
+ *
+ * When missing, the value is assumed to be `/`
+ *
+ * @example /search
+ */
+ public const URL_PATH = 'url.path';
+
+ /**
+ * The URI query component.
+ *
+ * Sensitive content provided in query string SHOULD be scrubbed when instrumentations can identify it.
+ *
+ * @example q=OpenTelemetry
+ */
+ public const URL_QUERY = 'url.query';
+
+ /**
+ * The number of messages sent, received, or processed in the scope of the batching operation.
+ *
+ * Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.
+ *
+ * @example 1
+ * @example 2
+ */
+ public const MESSAGING_BATCH_MESSAGE_COUNT = 'messaging.batch.message_count';
+
+ /**
+ * A unique identifier for the client that consumes or produces a message.
+ *
+ * @example client-5
+ * @example myhost@8742@s8083jm
+ */
+ public const MESSAGING_CLIENT_ID = 'messaging.client_id';
+
+ /**
+ * A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).
+ */
+ public const MESSAGING_DESTINATION_ANONYMOUS = 'messaging.destination.anonymous';
+
+ /**
+ * The message destination name.
+ *
+ * Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If
+ * the broker does not have such notion, the destination name SHOULD uniquely identify the broker.
+ *
+ * @example MyQueue
+ * @example MyTopic
+ */
+ public const MESSAGING_DESTINATION_NAME = 'messaging.destination.name';
+
+ /**
+ * Low cardinality representation of the messaging destination name.
+ *
+ * Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.
+ *
+ * @example /customers/{customerId}
+ */
+ public const MESSAGING_DESTINATION_TEMPLATE = 'messaging.destination.template';
+
+ /**
+ * A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed.
+ */
+ public const MESSAGING_DESTINATION_TEMPORARY = 'messaging.destination.temporary';
+
+ /**
+ * The size of the message body in bytes.
+ *
+ * This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed
+ * body size should be used.
+ *
+ * @example 1439
+ */
+ public const MESSAGING_MESSAGE_BODY_SIZE = 'messaging.message.body.size';
+
+ /**
+ * The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called &quot;Correlation ID&quot;.
+ *
+ * @example MyConversationId
+ */
+ public const MESSAGING_MESSAGE_CONVERSATION_ID = 'messaging.message.conversation_id';
+
+ /**
+ * The size of the message body and metadata in bytes.
+ *
+ * This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed
+ * size should be used.
+ *
+ * @example 2738
+ */
+ public const MESSAGING_MESSAGE_ENVELOPE_SIZE = 'messaging.message.envelope.size';
+
+ /**
+ * A value used by the messaging system as an identifier for the message, represented as a string.
+ *
+ * @example 452a7c7c7c7048c2f887f61572b18fc2
+ */
+ public const MESSAGING_MESSAGE_ID = 'messaging.message.id';
+
+ /**
+ * A string identifying the kind of messaging operation as defined in the Operation names section above.
+ *
+ * If a custom value is used, it MUST be of low cardinality.
+ */
+ public const MESSAGING_OPERATION = 'messaging.operation';
+
+ /**
+ * A string identifying the messaging system.
+ *
+ * @example kafka
+ * @example rabbitmq
+ * @example rocketmq
+ * @example activemq
+ * @example AmazonSQS
+ */
+ public const MESSAGING_SYSTEM = 'messaging.system';
+
+ /**
+ * A string containing the schedule period as Cron Expression.
+ *
+ * @example 0/5 * * * ? *
+ */
+ public const FAAS_CRON = 'faas.cron';
+
+ /**
+ * A string containing the function invocation time in the ISO 8601 format expressed in UTC.
+ *
+ * @example 2020-01-23T13:47:06Z
+ */
+ public const FAAS_TIME = 'faas.time';
+
+ /**
+ * A boolean that is true if the serverless function is executed for the first time (aka cold-start).
+ */
+ public const FAAS_COLDSTART = 'faas.coldstart';
+
+ /**
+ * The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
+ *
+ * @example 79b9da39-b7ae-508a-a6bc-864b2829c622
+ * @example C9ER4AJX75574TDJ
+ */
+ public const AWS_REQUEST_ID = 'aws.request_id';
+
+ /**
+ * The value of the `AttributesToGet` request parameter.
+ *
+ * @example lives
+ * @example id
+ */
+ public const AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get';
+
+ /**
+ * The value of the `ConsistentRead` request parameter.
+ */
+ public const AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read';
+
+ /**
+ * The JSON-serialized value of each item in the `ConsumedCapacity` response field.
+ *
+ * @example { "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": "string", "WriteCapacityUnits": number }
+ */
+ public const AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity';
+
+ /**
+ * The value of the `IndexName` request parameter.
+ *
+ * @example name_to_group
+ */
+ public const AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name';
+
+ /**
+ * The JSON-serialized value of the `ItemCollectionMetrics` response field.
+ *
+ * @example { "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }
+ */
+ public const AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics';
+
+ /**
+ * The value of the `Limit` request parameter.
+ *
+ * @example 10
+ */
+ public const AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit';
+
+ /**
+ * The value of the `ProjectionExpression` request parameter.
+ *
+ * @example Title
+ * @example Title, Price, Color
+ * @example Title, Description, RelatedItems, ProductReviews
+ */
+ public const AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection';
+
+ /**
+ * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
+ *
+ * @example 1.0
+ * @example 2.0
+ */
+ public const AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity';
+
+ /**
+ * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.
+ *
+ * @example 1.0
+ * @example 2.0
+ */
+ public const AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity';
+
+ /**
+ * The value of the `Select` request parameter.
+ *
+ * @example ALL_ATTRIBUTES
+ * @example COUNT
+ */
+ public const AWS_DYNAMODB_SELECT = 'aws.dynamodb.select';
+
+ /**
+ * The keys in the `RequestItems` object field.
+ *
+ * @example Users
+ * @example Cats
+ */
+ public const AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names';
+
+ /**
+ * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.
+ *
+ * @example { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }
+ */
+ public const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes';
+
+ /**
+ * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.
+ *
+ * @example { "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }
+ */
+ public const AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes';
+
+ /**
+ * The value of the `ExclusiveStartTableName` request parameter.
+ *
+ * @example Users
+ * @example CatsTable
+ */
+ public const AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table';
+
+ /**
+ * The the number of items in the `TableNames` response parameter.
+ *
+ * @example 20
+ */
+ public const AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count';
+
+ /**
+ * The value of the `ScanIndexForward` request parameter.
+ */
+ public const AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward';
+
+ /**
+ * The value of the `Count` response parameter.
+ *
+ * @example 10
+ */
+ public const AWS_DYNAMODB_COUNT = 'aws.dynamodb.count';
+
+ /**
+ * The value of the `ScannedCount` response parameter.
+ *
+ * @example 50
+ */
+ public const AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count';
+
+ /**
+ * The value of the `Segment` request parameter.
+ *
+ * @example 10
+ */
+ public const AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment';
+
+ /**
+ * The value of the `TotalSegments` request parameter.
+ *
+ * @example 100
+ */
+ public const AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments';
+
+ /**
+ * The JSON-serialized value of each item in the `AttributeDefinitions` request field.
+ *
+ * @example { "AttributeName": "string", "AttributeType": "string" }
+ */
+ public const AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions';
+
+ /**
+ * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.
+ *
+ * @example { "Create": { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }
+ */
+ public const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates';
+
+ /**
+ * The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the S3 API operations.
+ *
+ * The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter.
+ * This applies to almost all S3 operations except `list-buckets`.
+ *
+ * @example some-bucket-name
+ */
+ public const AWS_S3_BUCKET = 'aws.s3.bucket';
+
+ /**
+ * The source object (in the form `bucket`/`key`) for the copy operation.
+ *
+ * The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter
+ * of the copy-object operation within the S3 API.
+ * This applies in particular to the following operations:<ul>
+ * <li>copy-object</li>
+ * <li>upload-part-copy</li>
+ * </ul>
+ *
+ * @example someFile.yml
+ */
+ public const AWS_S3_COPY_SOURCE = 'aws.s3.copy_source';
+
+ /**
+ * The delete request container that specifies the objects to be deleted.
+ *
+ * The `delete` attribute is only applicable to the delete-object operation.
+ * The `delete` attribute corresponds to the `--delete` parameter of the
+ * delete-objects operation within the S3 API.
+ *
+ * @example Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean
+ */
+ public const AWS_S3_DELETE = 'aws.s3.delete';
+
+ /**
+ * The S3 object key the request refers to. Corresponds to the `--key` parameter of the S3 API operations.
+ *
+ * The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter.
+ * This applies in particular to the following operations:<ul>
+ * <li>copy-object</li>
+ * <li>delete-object</li>
+ * <li>get-object</li>
+ * <li>head-object</li>
+ * <li>put-object</li>
+ * <li>restore-object</li>
+ * <li>select-object-content</li>
+ * <li>abort-multipart-upload</li>
+ * <li>complete-multipart-upload</li>
+ * <li>create-multipart-upload</li>
+ * <li>list-parts</li>
+ * <li>upload-part</li>
+ * <li>upload-part-copy</li>
+ * </ul>
+ *
+ * @example someFile.yml
+ */
+ public const AWS_S3_KEY = 'aws.s3.key';
+
+ /**
+ * The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.
+ *
+ * The `part_number` attribute is only applicable to the upload-part
+ * and upload-part-copy operations.
+ * The `part_number` attribute corresponds to the `--part-number` parameter of the
+ * upload-part operation within the S3 API.
+ *
+ * @example 3456
+ */
+ public const AWS_S3_PART_NUMBER = 'aws.s3.part_number';
+
+ /**
+ * Upload ID that identifies the multipart upload.
+ *
+ * The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter
+ * of the S3 API multipart operations.
+ * This applies in particular to the following operations:<ul>
+ * <li>abort-multipart-upload</li>
+ * <li>complete-multipart-upload</li>
+ * <li>list-parts</li>
+ * <li>upload-part</li>
+ * <li>upload-part-copy</li>
+ * </ul>
+ *
+ * @example dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ
+ */
+ public const AWS_S3_UPLOAD_ID = 'aws.s3.upload_id';
+
+ /**
+ * The GraphQL document being executed.
+ *
+ * The value may be sanitized to exclude sensitive information.
+ *
+ * @example query findBookById { bookById(id: ?) { name } }
+ */
+ public const GRAPHQL_DOCUMENT = 'graphql.document';
+
+ /**
+ * The name of the operation being executed.
+ *
+ * @example findBookById
+ */
+ public const GRAPHQL_OPERATION_NAME = 'graphql.operation.name';
+
+ /**
+ * The type of the operation being executed.
+ *
+ * @example query
+ * @example mutation
+ * @example subscription
+ */
+ public const GRAPHQL_OPERATION_TYPE = 'graphql.operation.type';
+
+ /**
+ * A boolean that is true if the publish message destination is anonymous (could be unnamed or have auto-generated name).
+ */
+ public const MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = 'messaging.destination_publish.anonymous';
+
+ /**
+ * The name of the original destination the message was published to.
+ *
+ * The name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If
+ * the broker does not have such notion, the original destination name SHOULD uniquely identify the broker.
+ *
+ * @example MyQueue
+ * @example MyTopic
+ */
+ public const MESSAGING_DESTINATION_PUBLISH_NAME = 'messaging.destination_publish.name';
+
+ /**
+ * RabbitMQ message routing key.
+ *
+ * @example myKey
+ */
+ public const MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = 'messaging.rabbitmq.destination.routing_key';
+
+ /**
+ * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.
+ *
+ * @example my-group
+ */
+ public const MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer.group';
+
+ /**
+ * Partition the message is sent to.
+ *
+ * @example 2
+ */
+ public const MESSAGING_KAFKA_DESTINATION_PARTITION = 'messaging.kafka.destination.partition';
+
+ /**
+ * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.
+ *
+ * If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
+ *
+ * @example myKey
+ */
+ public const MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message.key';
+
+ /**
+ * The offset of a record in the corresponding Kafka partition.
+ *
+ * @example 42
+ */
+ public const MESSAGING_KAFKA_MESSAGE_OFFSET = 'messaging.kafka.message.offset';
+
+ /**
+ * A boolean that is true if the message is a tombstone.
+ */
+ public const MESSAGING_KAFKA_MESSAGE_TOMBSTONE = 'messaging.kafka.message.tombstone';
+
+ /**
+ * Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind.
+ *
+ * @example myConsumerGroup
+ */
+ public const MESSAGING_ROCKETMQ_CLIENT_GROUP = 'messaging.rocketmq.client_group';
+
+ /**
+ * Model of message consumption. This only applies to consumer spans.
+ */
+ public const MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = 'messaging.rocketmq.consumption_model';
+
+ /**
+ * The delay time level for delay message, which determines the message delay time.
+ *
+ * @example 3
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = 'messaging.rocketmq.message.delay_time_level';
+
+ /**
+ * The timestamp in milliseconds that the delay message is expected to be delivered to consumer.
+ *
+ * @example 1665987217045
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = 'messaging.rocketmq.message.delivery_timestamp';
+
+ /**
+ * It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group.
+ *
+ * @example myMessageGroup
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_GROUP = 'messaging.rocketmq.message.group';
+
+ /**
+ * Key(s) of message, another way to mark message besides message id.
+ *
+ * @example keyA
+ * @example keyB
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_KEYS = 'messaging.rocketmq.message.keys';
+
+ /**
+ * The secondary classifier of message besides topic.
+ *
+ * @example tagA
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_TAG = 'messaging.rocketmq.message.tag';
+
+ /**
+ * Type of message.
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_TYPE = 'messaging.rocketmq.message.type';
+
+ /**
+ * Namespace of RocketMQ resources, resources in different namespaces are individual.
+ *
+ * @example myNamespace
+ */
+ public const MESSAGING_ROCKETMQ_NAMESPACE = 'messaging.rocketmq.namespace';
+
+ /**
+ * The numeric status code of the gRPC request.
+ */
+ public const RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code';
+
+ /**
+ * `error.code` property of response if it is an error response.
+ *
+ * @example -32700
+ * @example 100
+ */
+ public const RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code';
+
+ /**
+ * `error.message` property of response if it is an error response.
+ *
+ * @example Parse error
+ * @example User already exists
+ */
+ public const RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message';
+
+ /**
+ * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.
+ *
+ * @example 10
+ * @example request-7
+ */
+ public const RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id';
+
+ /**
+ * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.
+ *
+ * @example 2.0
+ * @example 1.0
+ */
+ public const RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version';
+
+ /**
+ * Compressed size of the message in bytes.
+ */
+ public const MESSAGE_COMPRESSED_SIZE = 'message.compressed_size';
+
+ /**
+ * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.
+ *
+ * This way we guarantee that the values will be consistent between different implementations.
+ */
+ public const MESSAGE_ID = 'message.id';
+
+ /**
+ * Whether this is a received or sent message.
+ */
+ public const MESSAGE_TYPE = 'message.type';
+
+ /**
+ * Uncompressed size of the message in bytes.
+ */
+ public const MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size';
+
+ /**
+ * The error codes of the Connect request. Error codes are always string values.
+ */
+ public const RPC_CONNECT_RPC_ERROR_CODE = 'rpc.connect_rpc.error_code';
+
+ /**
+ * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.
+ *
+ * An exception is considered to have escaped (or left) the scope of a span,
+ * if that span is ended while the exception is still logically &quot;in flight&quot;.
+ * This may be actually &quot;in flight&quot; in some languages (e.g. if the exception
+ * is passed to a Context manager's `__exit__` method in Python) but will
+ * usually be caught at the point of recording the exception in most languages.It is usually not possible to determine at the point where an exception is thrown
+ * whether it will escape the scope of a span.
+ * However, it is trivial to know that an exception
+ * will escape, if one checks for an active exception just before ending the span,
+ * as done in the example above.It follows that an exception may still escape the scope of the span
+ * even if the `exception.escaped` attribute was not set or set to false,
+ * since the event might have been recorded at a time where it was not
+ * clear whether the exception will escape.
+ */
+ public const EXCEPTION_ESCAPED = 'exception.escaped';
+
+ /**
+ * The URI fragment component.
+ *
+ * @example SemConv
+ */
+ public const URL_FRAGMENT = 'url.fragment';
+
+ /**
+ * @deprecated
+ */
+ public const FAAS_EXECUTION = 'faas.execution';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_HOST = 'http.host';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_RETRY_COUNT = 'http.retry_count';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_SERVER_NAME = 'http.server_name';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_USER_AGENT = 'http.user_agent';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_CONVERSATION_ID = 'messaging.conversation_id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_DESTINATION = 'messaging.destination';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_PROTOCOL = 'messaging.protocol';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_URL = 'messaging.url';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_IP = 'net.host.ip';
+
+ /**
+ * @deprecated
+ */
+ public const NET_PEER_IP = 'net.peer.ip';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_CLIENT_IP = 'http.client_ip';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_FLAVOR = 'http.flavor';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_CONSUMER_ID = 'messaging.consumer.id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_DESTINATION_KIND = 'messaging.destination.kind';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_SOURCE_PARTITION = 'messaging.kafka.source.partition';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message.payload_compressed_size_bytes';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message.payload_size_bytes';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_ROCKETMQ_CLIENT_ID = 'messaging.rocketmq.client_id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_ANONYMOUS = 'messaging.source.anonymous';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_KIND = 'messaging.source.kind';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_NAME = 'messaging.source.name';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_TEMPLATE = 'messaging.source.template';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_TEMPORARY = 'messaging.source.temporary';
+
+ /**
+ * @deprecated
+ */
+ public const NET_APP_PROTOCOL_NAME = 'net.app.protocol.name';
+
+ /**
+ * @deprecated
+ */
+ public const NET_APP_PROTOCOL_VERSION = 'net.app.protocol.version';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_ICC = 'net.host.carrier.icc';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_NAME = 'net.host.carrier.name';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CONNECTION_TYPE = 'net.host.connection.type';
+}
diff --git a/vendor/open-telemetry/sem-conv/composer.json b/vendor/open-telemetry/sem-conv/composer.json
new file mode 100644
index 000000000..a601ca5dc
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/composer.json
@@ -0,0 +1,32 @@
+{
+ "name": "open-telemetry/sem-conv",
+ "description": "Semantic conventions for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "semconv", "semantic conventions"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\SemConv\\": "."
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ }
+}