├── LICENSE
├── README.md
├── code-of-conduct.md
├── codecov.yml
├── composer.json
├── deptrac.baseline.yaml
├── deptrac.yaml
├── docs
├── laravel-quickstart.md
└── versioning.md
├── files
└── collector
│ └── otel-collector-config.yml
├── infection.json5
├── phpdoc.dist.xml
├── phpmetrics.json
├── proto
└── otel
│ ├── .gitignore
│ ├── GPBMetadata
│ └── Opentelemetry
│ │ └── Proto
│ │ ├── Collector
│ │ ├── Logs
│ │ │ └── V1
│ │ │ │ └── LogsService.php
│ │ ├── Metrics
│ │ │ └── V1
│ │ │ │ └── MetricsService.php
│ │ ├── Profiles
│ │ │ └── V1Development
│ │ │ │ └── ProfilesService.php
│ │ └── Trace
│ │ │ └── V1
│ │ │ └── TraceService.php
│ │ ├── Common
│ │ └── V1
│ │ │ └── Common.php
│ │ ├── Logs
│ │ └── V1
│ │ │ └── Logs.php
│ │ ├── Metrics
│ │ ├── Experimental
│ │ │ └── MetricsConfigService.php
│ │ └── V1
│ │ │ └── Metrics.php
│ │ ├── Profiles
│ │ └── V1Development
│ │ │ └── Profiles.php
│ │ ├── Resource
│ │ └── V1
│ │ │ └── Resource.php
│ │ └── Trace
│ │ └── V1
│ │ ├── Trace.php
│ │ └── TraceConfig.php
│ ├── Opentelemetry
│ └── Proto
│ │ ├── Collector
│ │ ├── Logs
│ │ │ └── V1
│ │ │ │ ├── ExportLogsPartialSuccess.php
│ │ │ │ ├── ExportLogsServiceRequest.php
│ │ │ │ ├── ExportLogsServiceResponse.php
│ │ │ │ └── LogsServiceClient.php
│ │ ├── Metrics
│ │ │ └── V1
│ │ │ │ ├── ExportMetricsPartialSuccess.php
│ │ │ │ ├── ExportMetricsServiceRequest.php
│ │ │ │ ├── ExportMetricsServiceResponse.php
│ │ │ │ └── MetricsServiceClient.php
│ │ ├── Profiles
│ │ │ └── V1development
│ │ │ │ ├── ExportProfilesPartialSuccess.php
│ │ │ │ ├── ExportProfilesServiceRequest.php
│ │ │ │ ├── ExportProfilesServiceResponse.php
│ │ │ │ └── ProfilesServiceClient.php
│ │ └── Trace
│ │ │ └── V1
│ │ │ ├── ExportTracePartialSuccess.php
│ │ │ ├── ExportTraceServiceRequest.php
│ │ │ ├── ExportTraceServiceResponse.php
│ │ │ └── TraceServiceClient.php
│ │ ├── Common
│ │ └── V1
│ │ │ ├── AnyValue.php
│ │ │ ├── ArrayValue.php
│ │ │ ├── InstrumentationLibrary.php
│ │ │ ├── InstrumentationScope.php
│ │ │ ├── KeyValue.php
│ │ │ ├── KeyValueList.php
│ │ │ └── StringKeyValue.php
│ │ ├── Logs
│ │ └── V1
│ │ │ ├── InstrumentationLibraryLogs.php
│ │ │ ├── LogRecord.php
│ │ │ ├── LogRecordFlags.php
│ │ │ ├── LogsData.php
│ │ │ ├── ResourceLogs.php
│ │ │ ├── ScopeLogs.php
│ │ │ └── SeverityNumber.php
│ │ ├── Metrics
│ │ ├── Experimental
│ │ │ ├── MetricConfigRequest.php
│ │ │ ├── MetricConfigResponse.php
│ │ │ ├── MetricConfigResponse
│ │ │ │ ├── Schedule.php
│ │ │ │ └── Schedule
│ │ │ │ │ └── Pattern.php
│ │ │ ├── MetricConfigResponse_Schedule.php
│ │ │ └── MetricConfigResponse_Schedule_Pattern.php
│ │ └── V1
│ │ │ ├── AggregationTemporality.php
│ │ │ ├── DataPointFlags.php
│ │ │ ├── Exemplar.php
│ │ │ ├── ExponentialHistogram.php
│ │ │ ├── ExponentialHistogramDataPoint.php
│ │ │ ├── ExponentialHistogramDataPoint
│ │ │ └── Buckets.php
│ │ │ ├── ExponentialHistogramDataPoint_Buckets.php
│ │ │ ├── Gauge.php
│ │ │ ├── Histogram.php
│ │ │ ├── HistogramDataPoint.php
│ │ │ ├── InstrumentationLibraryMetrics.php
│ │ │ ├── IntDataPoint.php
│ │ │ ├── IntExemplar.php
│ │ │ ├── IntGauge.php
│ │ │ ├── IntHistogram.php
│ │ │ ├── IntHistogramDataPoint.php
│ │ │ ├── IntSum.php
│ │ │ ├── Metric.php
│ │ │ ├── MetricsData.php
│ │ │ ├── NumberDataPoint.php
│ │ │ ├── ResourceMetrics.php
│ │ │ ├── ScopeMetrics.php
│ │ │ ├── Sum.php
│ │ │ ├── Summary.php
│ │ │ ├── SummaryDataPoint.php
│ │ │ ├── SummaryDataPoint
│ │ │ └── ValueAtQuantile.php
│ │ │ └── SummaryDataPoint_ValueAtQuantile.php
│ │ ├── Profiles
│ │ └── V1development
│ │ │ ├── AggregationTemporality.php
│ │ │ ├── AttributeUnit.php
│ │ │ ├── Line.php
│ │ │ ├── Link.php
│ │ │ ├── Location.php
│ │ │ ├── Mapping.php
│ │ │ ├── PBFunction.php
│ │ │ ├── Profile.php
│ │ │ ├── ProfilesData.php
│ │ │ ├── ResourceProfiles.php
│ │ │ ├── Sample.php
│ │ │ ├── ScopeProfiles.php
│ │ │ └── ValueType.php
│ │ ├── Resource
│ │ └── V1
│ │ │ └── Resource.php
│ │ └── Trace
│ │ └── V1
│ │ ├── ConstantSampler.php
│ │ ├── ConstantSampler
│ │ └── ConstantDecision.php
│ │ ├── ConstantSampler_ConstantDecision.php
│ │ ├── InstrumentationLibrarySpans.php
│ │ ├── RateLimitingSampler.php
│ │ ├── ResourceSpans.php
│ │ ├── ScopeSpans.php
│ │ ├── Span.php
│ │ ├── Span
│ │ ├── Event.php
│ │ ├── Link.php
│ │ └── SpanKind.php
│ │ ├── SpanFlags.php
│ │ ├── Span_Event.php
│ │ ├── Span_Link.php
│ │ ├── Span_SpanKind.php
│ │ ├── Status.php
│ │ ├── Status
│ │ ├── DeprecatedStatusCode.php
│ │ └── StatusCode.php
│ │ ├── Status_DeprecatedStatusCode.php
│ │ ├── Status_StatusCode.php
│ │ ├── TraceConfig.php
│ │ ├── TraceIdRatioBased.php
│ │ └── TracesData.php
│ ├── README.md
│ ├── VERSION
│ └── composer.json
├── rector.php
├── script
├── proto_gen.sh
└── semantic-conventions
│ ├── README.md
│ ├── semconv.sh
│ └── templates
│ └── registry
│ └── php
│ ├── .gitignore
│ ├── AttributeValues.php.j2
│ ├── Attributes.php.j2
│ ├── ResourceAttributeValues.php.j2
│ ├── ResourceAttributes.php.j2
│ ├── common.j2
│ └── weaver.yaml
├── src
├── API
│ ├── Baggage
│ │ ├── Baggage.php
│ │ ├── BaggageBuilder.php
│ │ ├── BaggageBuilderInterface.php
│ │ ├── BaggageInterface.php
│ │ ├── Entry.php
│ │ ├── Metadata.php
│ │ ├── MetadataInterface.php
│ │ └── Propagation
│ │ │ ├── BaggagePropagator.php
│ │ │ └── Parser.php
│ ├── Behavior
│ │ ├── Internal
│ │ │ ├── LogWriter
│ │ │ │ ├── ErrorLogWriter.php
│ │ │ │ ├── Formatter.php
│ │ │ │ ├── LogWriterInterface.php
│ │ │ │ ├── NoopLogWriter.php
│ │ │ │ ├── Psr3LogWriter.php
│ │ │ │ └── StreamLogWriter.php
│ │ │ ├── LogWriterFactory.php
│ │ │ └── Logging.php
│ │ └── LogsMessagesTrait.php
│ ├── Common
│ │ └── Time
│ │ │ ├── Clock.php
│ │ │ ├── ClockInterface.php
│ │ │ ├── SystemClock.php
│ │ │ └── TestClock.php
│ ├── Configuration
│ │ ├── ConfigProperties.php
│ │ ├── ConfigProviderInterface.php
│ │ └── Noop
│ │ │ ├── NoopConfigProperties.php
│ │ │ └── NoopConfigProvider.php
│ ├── Globals.php
│ ├── Instrumentation
│ │ ├── AutoInstrumentation
│ │ │ ├── ConfigurationRegistry.php
│ │ │ ├── Context.php
│ │ │ ├── ExtensionHookManager.php
│ │ │ ├── GeneralInstrumentationConfiguration.php
│ │ │ ├── HookManager.php
│ │ │ ├── HookManagerInterface.php
│ │ │ ├── Instrumentation.php
│ │ │ ├── InstrumentationConfiguration.php
│ │ │ └── NoopHookManager.php
│ │ ├── CachedInstrumentation.php
│ │ ├── Configuration
│ │ │ └── General
│ │ │ │ ├── HttpConfig.php
│ │ │ │ └── PeerConfig.php
│ │ ├── ConfigurationResolver.php
│ │ ├── ConfigurationResolverInterface.php
│ │ ├── Configurator.php
│ │ ├── ContextKeys.php
│ │ ├── InstrumentationInterface.php
│ │ ├── InstrumentationTrait.php
│ │ ├── SpanAttribute.php
│ │ ├── WithSpan.php
│ │ └── WithSpanHandler.php
│ ├── LoggerHolder.php
│ ├── Logs
│ │ ├── EventLoggerInterface.php
│ │ ├── EventLoggerProviderInterface.php
│ │ ├── LateBindingLogger.php
│ │ ├── LateBindingLoggerProvider.php
│ │ ├── LogRecord.php
│ │ ├── LoggerInterface.php
│ │ ├── LoggerProviderInterface.php
│ │ ├── Map
│ │ │ └── Psr3.php
│ │ ├── NoopEventLogger.php
│ │ ├── NoopEventLoggerProvider.php
│ │ ├── NoopLogger.php
│ │ ├── NoopLoggerProvider.php
│ │ ├── README.md
│ │ └── Severity.php
│ ├── Metrics
│ │ ├── AsynchronousInstrument.php
│ │ ├── CounterInterface.php
│ │ ├── GaugeInterface.php
│ │ ├── HistogramInterface.php
│ │ ├── Instrument.php
│ │ ├── LateBindingMeter.php
│ │ ├── LateBindingMeterProvider.php
│ │ ├── MeterInterface.php
│ │ ├── MeterProviderInterface.php
│ │ ├── Noop
│ │ │ ├── NoopCounter.php
│ │ │ ├── NoopGauge.php
│ │ │ ├── NoopHistogram.php
│ │ │ ├── NoopMeter.php
│ │ │ ├── NoopMeterProvider.php
│ │ │ ├── NoopObservableCallback.php
│ │ │ ├── NoopObservableCounter.php
│ │ │ ├── NoopObservableGauge.php
│ │ │ ├── NoopObservableUpDownCounter.php
│ │ │ └── NoopUpDownCounter.php
│ │ ├── ObservableCallbackInterface.php
│ │ ├── ObservableCounterInterface.php
│ │ ├── ObservableGaugeInterface.php
│ │ ├── ObservableUpDownCounterInterface.php
│ │ ├── ObserverInterface.php
│ │ ├── SynchronousInstrument.php
│ │ └── UpDownCounterInterface.php
│ ├── README.md
│ ├── Signals.php
│ ├── Trace
│ │ ├── LateBindingTracer.php
│ │ ├── LateBindingTracerProvider.php
│ │ ├── LocalRootSpan.php
│ │ ├── NonRecordingSpan.php
│ │ ├── NoopSpanBuilder.php
│ │ ├── NoopTracer.php
│ │ ├── NoopTracerProvider.php
│ │ ├── Propagation
│ │ │ ├── TraceContextPropagator.php
│ │ │ └── TraceContextValidator.php
│ │ ├── Span.php
│ │ ├── SpanBuilderInterface.php
│ │ ├── SpanContext.php
│ │ ├── SpanContextInterface.php
│ │ ├── SpanContextValidator.php
│ │ ├── SpanInterface.php
│ │ ├── SpanKind.php
│ │ ├── StatusCode.php
│ │ ├── TraceFlags.php
│ │ ├── TraceState.php
│ │ ├── TraceStateInterface.php
│ │ ├── TracerInterface.php
│ │ ├── TracerProviderInterface.php
│ │ └── functions.php
│ └── composer.json
├── Config
│ └── SDK
│ │ ├── ComponentProvider
│ │ ├── Detector
│ │ │ ├── Composer.php
│ │ │ ├── Host.php
│ │ │ └── Process.php
│ │ ├── Instrumentation
│ │ │ └── General
│ │ │ │ ├── HttpConfigProvider.php
│ │ │ │ └── PeerConfigProvider.php
│ │ ├── InstrumentationConfigurationRegistry.php
│ │ ├── Logs
│ │ │ ├── LogRecordExporterConsole.php
│ │ │ ├── LogRecordExporterMemory.php
│ │ │ ├── LogRecordExporterOtlpFile.php
│ │ │ ├── LogRecordExporterOtlpGrpc.php
│ │ │ ├── LogRecordExporterOtlpHttp.php
│ │ │ ├── LogRecordProcessorBatch.php
│ │ │ └── LogRecordProcessorSimple.php
│ │ ├── Metrics
│ │ │ ├── AggregationResolverDefault.php
│ │ │ ├── MetricExporterConsole.php
│ │ │ ├── MetricExporterMemory.php
│ │ │ ├── MetricExporterOtlpFile.php
│ │ │ ├── MetricExporterOtlpGrpc.php
│ │ │ ├── MetricExporterOtlpHttp.php
│ │ │ └── MetricReaderPeriodic.php
│ │ ├── OpenTelemetrySdk.php
│ │ ├── OutputStreamParser.php
│ │ ├── Propagator
│ │ │ ├── TextMapPropagatorB3.php
│ │ │ ├── TextMapPropagatorB3Multi.php
│ │ │ ├── TextMapPropagatorBaggage.php
│ │ │ ├── TextMapPropagatorComposite.php
│ │ │ ├── TextMapPropagatorJaeger.php
│ │ │ └── TextMapPropagatorTraceContext.php
│ │ └── Trace
│ │ │ ├── SamplerAlwaysOff.php
│ │ │ ├── SamplerAlwaysOn.php
│ │ │ ├── SamplerParentBased.php
│ │ │ ├── SamplerTraceIdRatioBased.php
│ │ │ ├── SpanExporterConsole.php
│ │ │ ├── SpanExporterMemory.php
│ │ │ ├── SpanExporterOtlpFile.php
│ │ │ ├── SpanExporterOtlpGrpc.php
│ │ │ ├── SpanExporterOtlpHttp.php
│ │ │ ├── SpanExporterZipkin.php
│ │ │ ├── SpanProcessorBatch.php
│ │ │ └── SpanProcessorSimple.php
│ │ ├── Configuration.php
│ │ ├── Configuration
│ │ ├── ComponentPlugin.php
│ │ ├── ComponentProvider.php
│ │ ├── ComponentProviderRegistry.php
│ │ ├── ConfigurationFactory.php
│ │ ├── Context.php
│ │ ├── Environment
│ │ │ ├── ArrayEnvSource.php
│ │ │ ├── EnvReader.php
│ │ │ ├── EnvResource.php
│ │ │ ├── EnvResourceChecker.php
│ │ │ ├── EnvSource.php
│ │ │ ├── EnvSourceReader.php
│ │ │ ├── PhpIniEnvSource.php
│ │ │ └── ServerEnvSource.php
│ │ ├── Internal
│ │ │ ├── CompiledConfigurationFactory.php
│ │ │ ├── ComponentPlugin.php
│ │ │ ├── ComponentProviderRegistry.php
│ │ │ ├── ComponentProviderRegistryEntry.php
│ │ │ ├── ComposerPackageResource.php
│ │ │ ├── ConfigurationLoader.php
│ │ │ ├── EnvSubstitutionNormalization.php
│ │ │ ├── Node
│ │ │ │ ├── ArrayNode.php
│ │ │ │ ├── BooleanNode.php
│ │ │ │ ├── EnumNode.php
│ │ │ │ ├── FloatNode.php
│ │ │ │ ├── IntegerNode.php
│ │ │ │ ├── NodeTrait.php
│ │ │ │ ├── PrototypedArrayNode.php
│ │ │ │ ├── ScalarNode.php
│ │ │ │ ├── StringNode.php
│ │ │ │ └── VariableNode.php
│ │ │ ├── NodeDefinition
│ │ │ │ ├── ArrayNodeDefinition.php
│ │ │ │ ├── BooleanNodeDefinition.php
│ │ │ │ ├── EnumNodeDefinition.php
│ │ │ │ ├── FloatNodeDefinition.php
│ │ │ │ ├── IntegerNodeDefinition.php
│ │ │ │ ├── NodeDefinitionTrait.php
│ │ │ │ ├── ScalarNodeDefinition.php
│ │ │ │ ├── StringNodeDefinition.php
│ │ │ │ └── VariableNodeDefinition.php
│ │ │ ├── Normalization.php
│ │ │ ├── ResourceCollection.php
│ │ │ ├── ResourceTrackable.php
│ │ │ └── TrackingEnvReader.php
│ │ ├── Loader
│ │ │ ├── ConfigurationLoader.php
│ │ │ ├── YamlExtensionFileLoader.php
│ │ │ └── YamlSymfonyFileLoader.php
│ │ ├── README.md
│ │ ├── ResourceCollection.php
│ │ └── Validation.php
│ │ ├── Instrumentation.php
│ │ ├── Parser
│ │ └── AttributesParser.php
│ │ ├── README.md
│ │ └── composer.json
├── Context
│ ├── Context.php
│ ├── ContextInterface.php
│ ├── ContextKey.php
│ ├── ContextKeyInterface.php
│ ├── ContextKeys.php
│ ├── ContextStorage.php
│ ├── ContextStorageHead.php
│ ├── ContextStorageHeadAware.php
│ ├── ContextStorageInterface.php
│ ├── ContextStorageNode.php
│ ├── ContextStorageScopeInterface.php
│ ├── DebugScope.php
│ ├── ExecutionContextAwareInterface.php
│ ├── FiberBoundContextStorage.php
│ ├── FiberBoundContextStorageExecutionAwareBC.php
│ ├── ImplicitContextKeyedInterface.php
│ ├── Propagation
│ │ ├── ArrayAccessGetterSetter.php
│ │ ├── ExtendedPropagationGetterInterface.php
│ │ ├── MultiTextMapPropagator.php
│ │ ├── NoopTextMapPropagator.php
│ │ ├── PropagationGetterInterface.php
│ │ ├── PropagationSetterInterface.php
│ │ ├── SanitizeCombinedHeadersPropagationGetter.php
│ │ └── TextMapPropagatorInterface.php
│ ├── README.md
│ ├── ScopeInterface.php
│ ├── ZendObserverFiber.php
│ ├── composer.json
│ └── fiber
│ │ ├── initialize_fiber_handler.php
│ │ └── zend_observer_fiber.h
├── Contrib
│ ├── Grpc
│ │ ├── GrpcTransport.php
│ │ ├── GrpcTransportFactory.php
│ │ ├── README.md
│ │ ├── _register.php
│ │ └── composer.json
│ ├── Otlp
│ │ ├── AttributesConverter.php
│ │ ├── ContentTypes.php
│ │ ├── HttpEndpointResolver.php
│ │ ├── HttpEndpointResolverInterface.php
│ │ ├── LogsConverter.php
│ │ ├── LogsExporter.php
│ │ ├── LogsExporterFactory.php
│ │ ├── MetricConverter.php
│ │ ├── MetricExporter.php
│ │ ├── MetricExporterFactory.php
│ │ ├── OtlpHttpTransportFactory.php
│ │ ├── OtlpUtil.php
│ │ ├── ProtobufSerializer.php
│ │ ├── Protocols.php
│ │ ├── README.md
│ │ ├── SpanConverter.php
│ │ ├── SpanExporter.php
│ │ ├── SpanExporterFactory.php
│ │ ├── StdoutLogsExporterFactory.php
│ │ ├── StdoutMetricExporterFactory.php
│ │ ├── StdoutSpanExporterFactory.php
│ │ ├── _register.php
│ │ └── composer.json
│ ├── README.md
│ ├── Zipkin
│ │ ├── Exporter.php
│ │ ├── README.md
│ │ ├── SpanConverter.php
│ │ ├── SpanExporterFactory.php
│ │ ├── SpanKind.php
│ │ ├── _register.php
│ │ └── composer.json
│ └── composer.json
├── Extension
│ └── Propagator
│ │ ├── B3
│ │ ├── B3DebugFlagContextKey.php
│ │ ├── B3MultiPropagator.php
│ │ ├── B3Propagator.php
│ │ ├── B3SinglePropagator.php
│ │ ├── README.md
│ │ ├── _register.php
│ │ └── composer.json
│ │ ├── CloudTrace
│ │ ├── CloudTraceFormatter.php
│ │ ├── CloudTracePropagator.php
│ │ ├── README.md
│ │ ├── Utils.php
│ │ ├── _register.php
│ │ └── composer.json
│ │ └── Jaeger
│ │ ├── JaegerBaggagePropagator.php
│ │ ├── JaegerDebugFlagContextKey.php
│ │ ├── JaegerPropagator.php
│ │ ├── README.md
│ │ ├── _register.php
│ │ └── composer.json
├── SDK
│ ├── Common
│ │ ├── Adapter
│ │ │ └── HttpDiscovery
│ │ │ │ ├── DependencyResolver.php
│ │ │ │ ├── HttpPlugClientResolver.php
│ │ │ │ ├── MessageFactoryResolver.php
│ │ │ │ └── PsrClientResolver.php
│ │ ├── Attribute
│ │ │ ├── AttributeValidator.php
│ │ │ ├── AttributeValidatorInterface.php
│ │ │ ├── Attributes.php
│ │ │ ├── AttributesBuilder.php
│ │ │ ├── AttributesBuilderInterface.php
│ │ │ ├── AttributesFactory.php
│ │ │ ├── AttributesFactoryInterface.php
│ │ │ ├── AttributesInterface.php
│ │ │ └── LogRecordAttributeValidator.php
│ │ ├── Configuration
│ │ │ ├── Configuration.php
│ │ │ ├── Defaults.php
│ │ │ ├── KnownValues.php
│ │ │ ├── Parser
│ │ │ │ ├── BooleanParser.php
│ │ │ │ ├── ListParser.php
│ │ │ │ ├── MapParser.php
│ │ │ │ └── RatioParser.php
│ │ │ ├── Resolver
│ │ │ │ ├── CompositeResolver.php
│ │ │ │ ├── EnvironmentResolver.php
│ │ │ │ ├── PhpIniAccessor.php
│ │ │ │ ├── PhpIniResolver.php
│ │ │ │ └── ResolverInterface.php
│ │ │ ├── ValueTypes.php
│ │ │ ├── VariableTypes.php
│ │ │ └── Variables.php
│ │ ├── Dev
│ │ │ └── Compatibility
│ │ │ │ ├── README.md
│ │ │ │ ├── Util.php
│ │ │ │ └── _load.php
│ │ ├── Exception
│ │ │ └── StackTraceFormatter.php
│ │ ├── Export
│ │ │ ├── Http
│ │ │ │ ├── PsrTransport.php
│ │ │ │ ├── PsrTransportFactory.php
│ │ │ │ └── PsrUtils.php
│ │ │ ├── InMemoryStorageManager.php
│ │ │ ├── Stream
│ │ │ │ ├── StreamTransport.php
│ │ │ │ └── StreamTransportFactory.php
│ │ │ ├── TransportFactoryInterface.php
│ │ │ └── TransportInterface.php
│ │ ├── Future
│ │ │ ├── CancellationInterface.php
│ │ │ ├── CompletedFuture.php
│ │ │ ├── ErrorFuture.php
│ │ │ ├── FutureInterface.php
│ │ │ └── NullCancellation.php
│ │ ├── Http
│ │ │ ├── DependencyResolverInterface.php
│ │ │ ├── HttpPlug
│ │ │ │ └── Client
│ │ │ │ │ └── ResolverInterface.php
│ │ │ └── Psr
│ │ │ │ ├── Client
│ │ │ │ ├── Discovery.php
│ │ │ │ ├── Discovery
│ │ │ │ │ ├── Buzz.php
│ │ │ │ │ ├── CurlClient.php
│ │ │ │ │ ├── DiscoveryInterface.php
│ │ │ │ │ ├── Guzzle.php
│ │ │ │ │ └── Symfony.php
│ │ │ │ └── ResolverInterface.php
│ │ │ │ └── Message
│ │ │ │ ├── FactoryResolverInterface.php
│ │ │ │ ├── MessageFactory.php
│ │ │ │ └── MessageFactoryInterface.php
│ │ ├── Instrumentation
│ │ │ ├── InstrumentationScope.php
│ │ │ ├── InstrumentationScopeFactory.php
│ │ │ ├── InstrumentationScopeFactoryInterface.php
│ │ │ └── InstrumentationScopeInterface.php
│ │ ├── InstrumentationScope
│ │ │ ├── Config.php
│ │ │ ├── ConfigTrait.php
│ │ │ ├── Configurable.php
│ │ │ ├── Configurator.php
│ │ │ └── ConfiguratorClosure.php
│ │ ├── Time
│ │ │ ├── ClockFactory.php
│ │ │ └── ClockInterface.php
│ │ └── Util
│ │ │ ├── ClassConstantAccessor.php
│ │ │ ├── ShutdownHandler.php
│ │ │ └── functions.php
│ ├── Logs
│ │ ├── EventLogger.php
│ │ ├── EventLoggerProvider.php
│ │ ├── EventLoggerProviderFactory.php
│ │ ├── EventLoggerProviderInterface.php
│ │ ├── Exporter
│ │ │ ├── ConsoleExporter.php
│ │ │ ├── ConsoleExporterFactory.php
│ │ │ ├── InMemoryExporter.php
│ │ │ ├── InMemoryExporterFactory.php
│ │ │ ├── NoopExporter.php
│ │ │ └── _register.php
│ │ ├── ExporterFactory.php
│ │ ├── LogRecordExporterFactoryInterface.php
│ │ ├── LogRecordExporterInterface.php
│ │ ├── LogRecordLimits.php
│ │ ├── LogRecordLimitsBuilder.php
│ │ ├── LogRecordProcessorFactory.php
│ │ ├── LogRecordProcessorInterface.php
│ │ ├── Logger.php
│ │ ├── LoggerConfig.php
│ │ ├── LoggerProvider.php
│ │ ├── LoggerProviderBuilder.php
│ │ ├── LoggerProviderFactory.php
│ │ ├── LoggerProviderInterface.php
│ │ ├── LoggerSharedState.php
│ │ ├── NoopEventLoggerProvider.php
│ │ ├── NoopLoggerProvider.php
│ │ ├── Processor
│ │ │ ├── BatchLogRecordProcessor.php
│ │ │ ├── MultiLogRecordProcessor.php
│ │ │ ├── NoopLogRecordProcessor.php
│ │ │ └── SimpleLogRecordProcessor.php
│ │ ├── PsrSeverityMapperInterface.php
│ │ ├── ReadWriteLogRecord.php
│ │ ├── ReadableLogRecord.php
│ │ └── SimplePsrFileLogger.php
│ ├── Metrics
│ │ ├── Aggregation
│ │ │ ├── ExplicitBucketHistogramAggregation.php
│ │ │ ├── ExplicitBucketHistogramSummary.php
│ │ │ ├── LastValueAggregation.php
│ │ │ ├── LastValueSummary.php
│ │ │ ├── SumAggregation.php
│ │ │ └── SumSummary.php
│ │ ├── AggregationInterface.php
│ │ ├── AggregationTemporalitySelectorInterface.php
│ │ ├── AsynchronousInstruments.php
│ │ ├── AttributeProcessor
│ │ │ ├── FilteredAttributeProcessor.php
│ │ │ └── IdentityAttributeProcessor.php
│ │ ├── AttributeProcessorInterface.php
│ │ ├── Counter.php
│ │ ├── Data
│ │ │ ├── DataInterface.php
│ │ │ ├── Exemplar.php
│ │ │ ├── Gauge.php
│ │ │ ├── Histogram.php
│ │ │ ├── HistogramDataPoint.php
│ │ │ ├── Metric.php
│ │ │ ├── NumberDataPoint.php
│ │ │ ├── Sum.php
│ │ │ └── Temporality.php
│ │ ├── DefaultAggregationProviderInterface.php
│ │ ├── DefaultAggregationProviderTrait.php
│ │ ├── Exemplar
│ │ │ ├── BucketEntry.php
│ │ │ ├── BucketStorage.php
│ │ │ ├── ExemplarFilter
│ │ │ │ ├── AllExemplarFilter.php
│ │ │ │ ├── NoneExemplarFilter.php
│ │ │ │ └── WithSampledTraceExemplarFilter.php
│ │ │ ├── ExemplarFilterInterface.php
│ │ │ ├── ExemplarReservoirInterface.php
│ │ │ ├── FilteredReservoir.php
│ │ │ ├── FixedSizeReservoir.php
│ │ │ ├── HistogramBucketReservoir.php
│ │ │ └── NoopReservoir.php
│ │ ├── Gauge.php
│ │ ├── Histogram.php
│ │ ├── Instrument.php
│ │ ├── InstrumentHandle.php
│ │ ├── InstrumentType.php
│ │ ├── Meter.php
│ │ ├── MeterConfig.php
│ │ ├── MeterInstruments.php
│ │ ├── MeterProvider.php
│ │ ├── MeterProviderBuilder.php
│ │ ├── MeterProviderFactory.php
│ │ ├── MeterProviderInterface.php
│ │ ├── MetricExporter
│ │ │ ├── ConsoleMetricExporter.php
│ │ │ ├── ConsoleMetricExporterFactory.php
│ │ │ ├── InMemoryExporter.php
│ │ │ ├── InMemoryExporterFactory.php
│ │ │ ├── NoopMetricExporter.php
│ │ │ ├── NoopMetricExporterFactory.php
│ │ │ └── _register.php
│ │ ├── MetricExporterFactoryInterface.php
│ │ ├── MetricExporterInterface.php
│ │ ├── MetricFactory
│ │ │ ├── StreamFactory.php
│ │ │ ├── StreamMetricSource.php
│ │ │ └── StreamMetricSourceProvider.php
│ │ ├── MetricFactoryInterface.php
│ │ ├── MetricMetadataInterface.php
│ │ ├── MetricReader
│ │ │ └── ExportingReader.php
│ │ ├── MetricReaderInterface.php
│ │ ├── MetricRegistration
│ │ │ ├── MultiRegistryRegistration.php
│ │ │ └── RegistryRegistration.php
│ │ ├── MetricRegistrationInterface.php
│ │ ├── MetricRegistry
│ │ │ ├── MetricCollectorInterface.php
│ │ │ ├── MetricRegistry.php
│ │ │ ├── MetricRegistryInterface.php
│ │ │ ├── MetricWriterInterface.php
│ │ │ ├── MultiObserver.php
│ │ │ └── NoopObserver.php
│ │ ├── MetricSourceInterface.php
│ │ ├── MetricSourceProviderInterface.php
│ │ ├── MetricSourceRegistryInterface.php
│ │ ├── MetricSourceRegistryUnregisterInterface.php
│ │ ├── NoopMeterProvider.php
│ │ ├── ObservableCallback.php
│ │ ├── ObservableCallbackDestructor.php
│ │ ├── ObservableCounter.php
│ │ ├── ObservableGauge.php
│ │ ├── ObservableInstrumentTrait.php
│ │ ├── ObservableUpDownCounter.php
│ │ ├── PushMetricExporterInterface.php
│ │ ├── ReferenceCounterInterface.php
│ │ ├── RegisteredInstrument.php
│ │ ├── StalenessHandler
│ │ │ ├── DelayedStalenessHandler.php
│ │ │ ├── DelayedStalenessHandlerFactory.php
│ │ │ ├── ImmediateStalenessHandler.php
│ │ │ ├── ImmediateStalenessHandlerFactory.php
│ │ │ ├── MultiReferenceCounter.php
│ │ │ ├── NoopStalenessHandler.php
│ │ │ └── NoopStalenessHandlerFactory.php
│ │ ├── StalenessHandlerFactoryInterface.php
│ │ ├── StalenessHandlerInterface.php
│ │ ├── Stream
│ │ │ ├── AsynchronousMetricStream.php
│ │ │ ├── Delta.php
│ │ │ ├── DeltaStorage.php
│ │ │ ├── Metric.php
│ │ │ ├── MetricAggregator.php
│ │ │ ├── MetricAggregatorFactory.php
│ │ │ ├── MetricAggregatorFactoryInterface.php
│ │ │ ├── MetricAggregatorInterface.php
│ │ │ ├── MetricCollectorInterface.php
│ │ │ ├── MetricStreamInterface.php
│ │ │ ├── SynchronousMetricStream.php
│ │ │ └── WritableMetricStreamInterface.php
│ │ ├── SynchronousInstrumentTrait.php
│ │ ├── UpDownCounter.php
│ │ ├── View
│ │ │ ├── CriteriaViewRegistry.php
│ │ │ ├── SelectionCriteria
│ │ │ │ ├── AllCriteria.php
│ │ │ │ ├── InstrumentNameCriteria.php
│ │ │ │ ├── InstrumentTypeCriteria.php
│ │ │ │ ├── InstrumentationScopeNameCriteria.php
│ │ │ │ ├── InstrumentationScopeSchemaUrlCriteria.php
│ │ │ │ └── InstrumentationScopeVersionCriteria.php
│ │ │ ├── SelectionCriteriaInterface.php
│ │ │ └── ViewTemplate.php
│ │ ├── ViewProjection.php
│ │ └── ViewRegistryInterface.php
│ ├── Propagation
│ │ ├── LateBindingTextMapPropagator.php
│ │ ├── PropagatorFactory.php
│ │ └── _register.php
│ ├── README.md
│ ├── Registry.php
│ ├── Resource
│ │ ├── Detectors
│ │ │ ├── Composer.php
│ │ │ ├── Composite.php
│ │ │ ├── Constant.php
│ │ │ ├── Environment.php
│ │ │ ├── Host.php
│ │ │ ├── OperatingSystem.php
│ │ │ ├── Process.php
│ │ │ ├── ProcessRuntime.php
│ │ │ ├── Sdk.php
│ │ │ ├── SdkProvided.php
│ │ │ └── Service.php
│ │ ├── ResourceDetectorInterface.php
│ │ ├── ResourceInfo.php
│ │ └── ResourceInfoFactory.php
│ ├── Sdk.php
│ ├── SdkAutoloader.php
│ ├── SdkBuilder.php
│ ├── Trace
│ │ ├── AutoRootSpan.php
│ │ ├── Behavior
│ │ │ ├── LoggerAwareTrait.php
│ │ │ ├── SpanExporterDecoratorTrait.php
│ │ │ ├── SpanExporterTrait.php
│ │ │ └── UsesSpanConverterTrait.php
│ │ ├── Event.php
│ │ ├── EventInterface.php
│ │ ├── ExporterFactory.php
│ │ ├── IdGeneratorInterface.php
│ │ ├── ImmutableSpan.php
│ │ ├── Link.php
│ │ ├── LinkInterface.php
│ │ ├── NoopTracerProvider.php
│ │ ├── RandomIdGenerator.php
│ │ ├── ReadWriteSpanInterface.php
│ │ ├── ReadableSpanInterface.php
│ │ ├── Sampler
│ │ │ ├── AlwaysOffSampler.php
│ │ │ ├── AlwaysOnSampler.php
│ │ │ ├── ParentBased.php
│ │ │ └── TraceIdRatioBasedSampler.php
│ │ ├── SamplerFactory.php
│ │ ├── SamplerInterface.php
│ │ ├── SamplingResult.php
│ │ ├── Span.php
│ │ ├── SpanBuilder.php
│ │ ├── SpanConverterInterface.php
│ │ ├── SpanDataInterface.php
│ │ ├── SpanExporter
│ │ │ ├── AbstractDecorator.php
│ │ │ ├── ConsoleSpanExporter.php
│ │ │ ├── ConsoleSpanExporterFactory.php
│ │ │ ├── FriendlySpanConverter.php
│ │ │ ├── InMemoryExporter.php
│ │ │ ├── InMemorySpanExporterFactory.php
│ │ │ ├── LoggerDecorator.php
│ │ │ ├── LoggerExporter.php
│ │ │ ├── NullSpanConverter.php
│ │ │ ├── SpanExporterFactoryInterface.php
│ │ │ └── _register.php
│ │ ├── SpanExporterInterface.php
│ │ ├── SpanLimits.php
│ │ ├── SpanLimitsBuilder.php
│ │ ├── SpanProcessor
│ │ │ ├── BatchSpanProcessor.php
│ │ │ ├── BatchSpanProcessorBuilder.php
│ │ │ ├── MultiSpanProcessor.php
│ │ │ ├── NoopSpanProcessor.php
│ │ │ └── SimpleSpanProcessor.php
│ │ ├── SpanProcessorFactory.php
│ │ ├── SpanProcessorInterface.php
│ │ ├── StatusData.php
│ │ ├── StatusDataInterface.php
│ │ ├── Tracer.php
│ │ ├── TracerConfig.php
│ │ ├── TracerProvider.php
│ │ ├── TracerProviderBuilder.php
│ │ ├── TracerProviderFactory.php
│ │ ├── TracerProviderInterface.php
│ │ └── TracerSharedState.php
│ ├── _autoload.php
│ └── composer.json
└── SemConv
│ ├── README.md
│ ├── ResourceAttributeValues.php
│ ├── ResourceAttributes.php
│ ├── TraceAttributeValues.php
│ ├── TraceAttributes.php
│ ├── Version.php
│ └── composer.json
├── var
└── metrics
│ └── .gitkeep
└── vendor-bin
├── README.md
├── deptrac
└── composer.json
├── infection
└── composer.json
├── phan
└── composer.json
├── php-cs-fixer
└── composer.json
├── phpbench
└── composer.json
├── phpmetrics
└── composer.json
├── psalm
└── composer.json
└── rector
└── composer.json
/code-of-conduct.md:
--------------------------------------------------------------------------------
1 | #Code Of Conduct
2 | opentelemetry-php follows the code of conduct that the rest of the OpenTelemetry [community](https://github.com/open-telemetry/community/blob/master/code-of-conduct.md) follows, the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md)
3 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | codecov:
2 | require_ci_to_pass: false
3 |
4 | coverage:
5 | precision: 2
6 | round: down
7 | range: "70...100"
8 | status:
9 | project: true
10 | patch: false
11 |
12 | parsers:
13 | gcov:
14 | branch_detection:
15 | conditional: true
16 | loop: true
17 | method: false
18 | macro: false
19 |
20 | comment:
21 | layout: "reach,diff,flags,files,footer"
22 | behavior: default
23 | require_changes: false
24 |
--------------------------------------------------------------------------------
/deptrac.baseline.yaml:
--------------------------------------------------------------------------------
1 | deptrac:
2 | skip_violations:
3 | /src/Extension/Propagator/B3/_register.php:
4 | - OpenTelemetry\SDK\Registry
5 | /src/Extension/Propagator/CloudTrace/_register.php:
6 | - OpenTelemetry\SDK\Registry
7 | /src/Extension/Propagator/Jaeger/_register.php:
8 | - OpenTelemetry\SDK\Registry
9 |
--------------------------------------------------------------------------------
/files/collector/otel-collector-config.yml:
--------------------------------------------------------------------------------
1 | receivers:
2 | otlp:
3 | protocols:
4 | grpc:
5 | http:
6 | zipkin:
7 |
8 | exporters:
9 | zipkin:
10 | endpoint: "http://zipkin:9411/api/v2/spans"
11 | debug:
12 | verbosity: detailed
13 |
14 | processors:
15 | batch:
16 |
17 | extensions:
18 | health_check:
19 | pprof:
20 | zpages:
21 |
22 | service:
23 | extensions: [pprof, zpages, health_check]
24 | telemetry:
25 | logs:
26 | level: "debug"
27 | pipelines:
28 | traces:
29 | receivers: [otlp, zipkin]
30 | exporters: [debug]
31 | processors: [batch]
32 | metrics:
33 | receivers: [otlp]
34 | exporters: [debug]
35 | logs:
36 | receivers: [ otlp ]
37 | processors: [ batch ]
38 | exporters: [ debug ]
39 |
--------------------------------------------------------------------------------
/infection.json5:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://raw.githubusercontent.com/infection/infection/0.28.1/resources/schema.json",
3 | "source": {
4 | "directories": [
5 | "src"
6 | ],
7 | "excludes": [
8 | "Composer"
9 | ]
10 | },
11 | "logs": {
12 | "text": "var/infection/infection.log",
13 | "html": "var/infection/infection.html",
14 | },
15 | "timeout": 1,
16 | "mutators": {
17 | "@default": true
18 | }
19 | }
--------------------------------------------------------------------------------
/phpdoc.dist.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 | OpenTelemetry PHP
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/proto/otel/.gitignore:
--------------------------------------------------------------------------------
1 | opentelemetry-proto
2 |
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Profiles/V1Development/ProfilesService.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Profiles/V1Development/ProfilesService.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Profiles/V1Development/Profiles.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Profiles/V1Development/Profiles.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php
--------------------------------------------------------------------------------
/proto/otel/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-telemetry/opentelemetry-php/78bd695c02668f7d1bcd20cdd3c9e48438dd9b8a/proto/otel/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php
--------------------------------------------------------------------------------
/proto/otel/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php:
--------------------------------------------------------------------------------
1 | value;
18 | }
19 |
20 | public function getMetadata(): MetadataInterface
21 | {
22 | return $this->metadata;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/API/Baggage/Metadata.php:
--------------------------------------------------------------------------------
1 | metadata;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/API/Baggage/MetadataInterface.php:
--------------------------------------------------------------------------------
1 | logger->log($level, $message, $context);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/API/Behavior/Internal/LogWriter/StreamLogWriter.php:
--------------------------------------------------------------------------------
1 | stream = $stream;
16 | } else {
17 | throw new \RuntimeException(sprintf('Unable to open %s for writing', $destination));
18 | }
19 | }
20 |
21 | public function write($level, string $message, array $context): void
22 | {
23 | fwrite($this->stream, Formatter::format($level, $message, $context));
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/API/Common/Time/Clock.php:
--------------------------------------------------------------------------------
1 | configurations[$configuration::class] = $configuration;
16 |
17 | return $this;
18 | }
19 |
20 | /**
21 | * @template C of InstrumentationConfiguration
22 | * @psalm-suppress MoreSpecificImplementedParamType
23 | * @param class-string $id
24 | * @return C|null
25 | */
26 | public function get(string $id): ?InstrumentationConfiguration
27 | {
28 | return $this->configurations[$id] ?? null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/API/Instrumentation/AutoInstrumentation/GeneralInstrumentationConfiguration.php:
--------------------------------------------------------------------------------
1 | logger ??= ($this->factory)())->emit($logRecord);
23 | }
24 |
25 | public function isEnabled(?ContextInterface $context = null, ?int $severityNumber = null): bool
26 | {
27 | return true;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/API/Logs/LateBindingLoggerProvider.php:
--------------------------------------------------------------------------------
1 | loggerProvider?->getLogger($name, $version, $schemaUrl, $attributes)
22 | ?? new LateBindingLogger(fn (): LoggerInterface => ($this->loggerProvider ??= ($this->factory)())->getLogger($name, $version, $schemaUrl, $attributes));
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/API/Logs/LoggerInterface.php:
--------------------------------------------------------------------------------
1 | $attributes
14 | * attributes of the data point
15 | *
16 | * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#add
17 | */
18 | public function add(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null): void;
19 | }
20 |
--------------------------------------------------------------------------------
/src/API/Metrics/GaugeInterface.php:
--------------------------------------------------------------------------------
1 | $attributes
21 | * attributes of the data point
22 | * @param ContextInterface|false|null $context execution context
23 | *
24 | * @see https://opentelemetry.io/docs/specs/otel/metrics/api/#record-1
25 | */
26 | public function record(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null): void;
27 | }
28 |
--------------------------------------------------------------------------------
/src/API/Metrics/HistogramInterface.php:
--------------------------------------------------------------------------------
1 | $attributes
14 | * attributes of the data point
15 | * @param ContextInterface|false|null $context execution context
16 | *
17 | * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#record
18 | */
19 | public function record(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null): void;
20 | }
21 |
--------------------------------------------------------------------------------
/src/API/Metrics/Instrument.php:
--------------------------------------------------------------------------------
1 | meterProvider?->getMeter($name, $version, $schemaUrl, $attributes)
22 | ?? new LateBindingMeter(fn (): MeterInterface => ($this->meterProvider ??= ($this->factory)())->getMeter($name, $version, $schemaUrl, $attributes));
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/API/Metrics/Noop/NoopCounter.php:
--------------------------------------------------------------------------------
1 | $attributes
14 | * attributes of the data point
15 | */
16 | public function observe(float|int $amount, iterable $attributes = []): void;
17 | }
18 |
--------------------------------------------------------------------------------
/src/API/Metrics/SynchronousInstrument.php:
--------------------------------------------------------------------------------
1 | $attributes
14 | * attributes of the data point
15 | * @param ContextInterface|false|null $context execution context
16 | */
17 | public function add($amount, iterable $attributes = [], $context = null): void;
18 | }
19 |
--------------------------------------------------------------------------------
/src/API/README.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/opentelemetry-php/api/releases)
2 | [](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/API)
3 | [](https://github.com/opentelemetry-php/api)
4 | [](https://packagist.org/packages/open-telemetry/api/)
5 | [](https://packagist.org/packages/open-telemetry/api/)
6 |
7 | # OpenTelemetry API
8 |
9 | Documentation: https://opentelemetry.io/docs/instrumentation/php
10 |
11 | ## Contributing
12 |
13 | This repository is a read-only git subtree split.
14 | To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
15 |
--------------------------------------------------------------------------------
/src/API/Signals.php:
--------------------------------------------------------------------------------
1 | tracer ??= ($this->factory)())->spanBuilder($spanName);
22 | }
23 |
24 | public function isEnabled(): bool
25 | {
26 | return true;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/API/Trace/NoopTracer.php:
--------------------------------------------------------------------------------
1 | env[$name] ?? null;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Environment/EnvReader.php:
--------------------------------------------------------------------------------
1 | name;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Environment/EnvResourceChecker.php:
--------------------------------------------------------------------------------
1 | envReader->read($resource->name) === $resource->value;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Environment/EnvSource.php:
--------------------------------------------------------------------------------
1 | $envSources
14 | */
15 | public function __construct(
16 | private readonly iterable $envSources,
17 | ) {
18 | }
19 |
20 | public function read(string $name): ?string
21 | {
22 | foreach ($this->envSources as $envSource) {
23 | if (is_string($value = $envSource->readRaw($name)) && ($value = trim($value, " \t")) !== '') {
24 | return $value;
25 | }
26 | }
27 |
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Environment/PhpIniEnvSource.php:
--------------------------------------------------------------------------------
1 | getPath(), get_debug_type($value)));
21 | if ($hint = $this->getInfo()) {
22 | $ex->addHint($hint);
23 | }
24 | $ex->setPath($this->getPath());
25 |
26 | throw $ex;
27 | }
28 |
29 | parent::validateType($value);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/Node/VariableNode.php:
--------------------------------------------------------------------------------
1 | name, $this->parent, $this->pathSeparator);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/NodeDefinition/EnumNodeDefinition.php:
--------------------------------------------------------------------------------
1 | name, $this->parent, $node->getValues(), $this->pathSeparator);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/NodeDefinition/FloatNodeDefinition.php:
--------------------------------------------------------------------------------
1 | name, $this->parent, $this->min, $this->max, $this->pathSeparator);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/NodeDefinition/IntegerNodeDefinition.php:
--------------------------------------------------------------------------------
1 | name, $this->parent, $this->min, $this->max, $this->pathSeparator);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/NodeDefinition/NodeDefinitionTrait.php:
--------------------------------------------------------------------------------
1 | allowEmptyValue = false;
12 |
13 | return $this;
14 | }
15 |
16 | public function defaultValue(mixed $value): static
17 | {
18 | /**
19 | * If a property has a default value defined (i.e. is _not_ required) and is
20 | * missing or present but null, Create MUST ensure the SDK component is configured
21 | * with the default value.
22 | **/
23 | $this->validate()->ifNull()->then(static function () use ($value): mixed {
24 | return $value;
25 | });
26 |
27 | return parent::defaultValue($value);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/NodeDefinition/ScalarNodeDefinition.php:
--------------------------------------------------------------------------------
1 | name, $this->parent, $this->pathSeparator);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/NodeDefinition/StringNodeDefinition.php:
--------------------------------------------------------------------------------
1 | name, $this->parent, $this->pathSeparator);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/NodeDefinition/VariableNodeDefinition.php:
--------------------------------------------------------------------------------
1 | name, $this->parent, $this->pathSeparator);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Config/SDK/Configuration/Internal/Normalization.php:
--------------------------------------------------------------------------------
1 | name;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Context/ContextKeyInterface.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | public function getAll($carrier, string $key): array;
21 | }
22 |
--------------------------------------------------------------------------------
/src/Context/Propagation/PropagationGetterInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | public function keys($carrier): array;
20 |
21 | /**
22 | * Gets the value of a given key from a carrier.
23 | */
24 | public function get($carrier, string $key) : ?string;
25 | }
26 |
--------------------------------------------------------------------------------
/src/Context/Propagation/PropagationSetterInterface.php:
--------------------------------------------------------------------------------
1 | = 8.1)
9 | */
10 | interface ContentTypes
11 | {
12 | public const PROTOBUF = 'application/x-protobuf';
13 | public const JSON = 'application/json';
14 | public const NDJSON = 'application/x-ndjson';
15 | }
16 |
--------------------------------------------------------------------------------
/src/Contrib/Otlp/HttpEndpointResolverInterface.php:
--------------------------------------------------------------------------------
1 | self::TRACE_DEFAULT_PATH,
17 | Signals::METRICS => self::METRICS_DEFAULT_PATH,
18 | Signals::LOGS => self::LOGS_DEFAULT_PATH,
19 | ];
20 | public const VALID_SCHEMES = [
21 | 'http',
22 | 'https',
23 | ];
24 |
25 | public function resolve(string $endpoint, string $signal): UriInterface;
26 |
27 | public function resolveToString(string $endpoint, string $signal): string;
28 | }
29 |
--------------------------------------------------------------------------------
/src/Contrib/Otlp/StdoutLogsExporterFactory.php:
--------------------------------------------------------------------------------
1 | create('php://stdout', ContentTypes::NDJSON);
16 |
17 | return new LogsExporter($transport);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Contrib/Otlp/StdoutMetricExporterFactory.php:
--------------------------------------------------------------------------------
1 | create('php://stdout', ContentTypes::NDJSON);
16 |
17 | return new MetricExporter($transport);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Contrib/Otlp/StdoutSpanExporterFactory.php:
--------------------------------------------------------------------------------
1 | create('php://stdout', ContentTypes::NDJSON);
16 |
17 | return new SpanExporter($transport);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Contrib/Otlp/_register.php:
--------------------------------------------------------------------------------
1 | create(endpoint: $endpoint, contentType: 'application/json', timeout: $timeout);
20 |
21 | return new Exporter($transport);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Contrib/Zipkin/SpanKind.php:
--------------------------------------------------------------------------------
1 | httpAsyncClient ??= HttpAsyncClientDiscovery::find();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/SDK/Common/Adapter/HttpDiscovery/PsrClientResolver.php:
--------------------------------------------------------------------------------
1 | client ??= Psr18ClientDiscovery::find();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/SDK/Common/Attribute/AttributeValidatorInterface.php:
--------------------------------------------------------------------------------
1 | attributeCountLimit,
23 | $this->attributeValueLengthLimit,
24 | 0,
25 | $attributeValidator ?? new AttributeValidator(),
26 | );
27 | foreach ($attributes as $key => $value) {
28 | $builder[$key] = $value;
29 | }
30 |
31 | return $builder;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/SDK/Common/Attribute/AttributesFactoryInterface.php:
--------------------------------------------------------------------------------
1 | trim($value),
25 | explode(self::DEFAULT_SEPARATOR, $value)
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/SDK/Common/Configuration/Resolver/PhpIniAccessor.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | final class CompletedFuture implements FutureInterface
15 | {
16 | /**
17 | * @param T $value
18 | */
19 | public function __construct(private $value)
20 | {
21 | }
22 |
23 | public function await()
24 | {
25 | return $this->value;
26 | }
27 |
28 | public function map(Closure $closure): FutureInterface
29 | {
30 | $c = $closure;
31 | unset($closure);
32 |
33 | try {
34 | return new CompletedFuture($c($this->value));
35 | } catch (Throwable $e) {
36 | return new ErrorFuture($e);
37 | }
38 | }
39 |
40 | public function catch(Closure $closure): FutureInterface
41 | {
42 | return $this;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/SDK/Common/Future/ErrorFuture.php:
--------------------------------------------------------------------------------
1 | throwable;
22 | }
23 |
24 | public function map(Closure $closure): FutureInterface
25 | {
26 | return $this;
27 | }
28 |
29 | public function catch(Closure $closure): FutureInterface
30 | {
31 | $c = $closure;
32 | unset($closure);
33 |
34 | try {
35 | return new CompletedFuture($c($this->throwable));
36 | } catch (Throwable $e) {
37 | return new ErrorFuture($e);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/SDK/Common/Future/FutureInterface.php:
--------------------------------------------------------------------------------
1 |
23 | *
24 | * @psalm-suppress InvalidTemplateParam
25 | */
26 | public function map(Closure $closure): FutureInterface;
27 |
28 | /**
29 | * @psalm-template U
30 | * @psalm-param Closure(\Throwable): U $closure
31 | * @psalm-return FutureInterface
32 | */
33 | public function catch(Closure $closure): FutureInterface;
34 | }
35 |
--------------------------------------------------------------------------------
/src/SDK/Common/Future/NullCancellation.php:
--------------------------------------------------------------------------------
1 | attributesFactory->builder($attributes)->build(),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/SDK/Common/Instrumentation/InstrumentationScopeFactoryInterface.php:
--------------------------------------------------------------------------------
1 | disabled = $disabled;
14 | }
15 |
16 | public function isEnabled(): bool
17 | {
18 | return $this->disabled === false;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/SDK/Common/InstrumentationScope/Configurable.php:
--------------------------------------------------------------------------------
1 | loggerProvider->getLogger($name, $version, $schemaUrl, $attributes),
26 | Clock::getDefault(),
27 | );
28 | }
29 |
30 | public function forceFlush(): bool
31 | {
32 | return $this->loggerProvider->forceFlush();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/SDK/Logs/EventLoggerProviderFactory.php:
--------------------------------------------------------------------------------
1 | create('php://stdout', 'application/json');
16 |
17 | return new ConsoleExporter($transport);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/SDK/Logs/Exporter/InMemoryExporterFactory.php:
--------------------------------------------------------------------------------
1 | create();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/SDK/Logs/LogRecordExporterFactoryInterface.php:
--------------------------------------------------------------------------------
1 | $batch
14 | */
15 | public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface;
16 | public function forceFlush(?CancellationInterface $cancellation = null): bool;
17 | public function shutdown(?CancellationInterface $cancellation = null): bool;
18 | }
19 |
--------------------------------------------------------------------------------
/src/SDK/Logs/LogRecordLimits.php:
--------------------------------------------------------------------------------
1 | attributesFactory;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/SDK/Logs/LogRecordProcessorInterface.php:
--------------------------------------------------------------------------------
1 | create();
20 | $processor = (new LogRecordProcessorFactory())->create($exporter, $meterProvider);
21 | $instrumentationScopeFactory = new InstrumentationScopeFactory((new LogRecordLimitsBuilder())->build()->getAttributeFactory());
22 |
23 | return new LoggerProvider($processor, $instrumentationScopeFactory, $resource);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/SDK/Logs/LoggerProviderInterface.php:
--------------------------------------------------------------------------------
1 | attributeKeys as $key) {
25 | $filtered[$key] = $attributes->get($key);
26 | }
27 |
28 | return new Attributes($filtered, 0);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/AttributeProcessor/IdentityAttributeProcessor.php:
--------------------------------------------------------------------------------
1 | $exemplars
23 | * @return array>
24 | */
25 | public static function groupByIndex(iterable $exemplars): array
26 | {
27 | $grouped = [];
28 | foreach ($exemplars as $exemplar) {
29 | $grouped[$exemplar->index][] = $exemplar;
30 | }
31 |
32 | return $grouped;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Data/Gauge.php:
--------------------------------------------------------------------------------
1 | $dataPoints
11 | */
12 | public function __construct(
13 | public readonly iterable $dataPoints,
14 | ) {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Data/Histogram.php:
--------------------------------------------------------------------------------
1 | $dataPoints
11 | */
12 | public function __construct(
13 | public readonly iterable $dataPoints,
14 | public readonly string|Temporality $temporality,
15 | ) {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Data/HistogramDataPoint.php:
--------------------------------------------------------------------------------
1 | $explicitBounds
14 | */
15 | public function __construct(
16 | public readonly int $count,
17 | public readonly float|int $sum,
18 | public readonly float|int $min,
19 | public readonly float|int $max,
20 | public readonly array $bucketCounts,
21 | public readonly array $explicitBounds,
22 | public readonly AttributesInterface $attributes,
23 | public readonly int $startTimestamp,
24 | public readonly int $timestamp,
25 | public readonly iterable $exemplars = [],
26 | ) {
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Data/Metric.php:
--------------------------------------------------------------------------------
1 | $dataPoints
11 | */
12 | public function __construct(
13 | public readonly iterable $dataPoints,
14 | public readonly string|Temporality $temporality,
15 | public readonly bool $monotonic,
16 | ) {
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Data/Temporality.php:
--------------------------------------------------------------------------------
1 | = 8.1)
12 | */
13 | final class Temporality
14 | {
15 | public const DELTA = 'Delta';
16 | public const CUMULATIVE = 'Cumulative';
17 |
18 | private function __construct()
19 | {
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/DefaultAggregationProviderInterface.php:
--------------------------------------------------------------------------------
1 | new Aggregation\SumAggregation(true),
13 | InstrumentType::UP_DOWN_COUNTER, InstrumentType::ASYNCHRONOUS_UP_DOWN_COUNTER => new Aggregation\SumAggregation(),
14 | InstrumentType::HISTOGRAM => new Aggregation\ExplicitBucketHistogramAggregation($advisory['ExplicitBucketBoundaries'] ?? [0, 5, 10, 25, 50, 75, 100, 250, 500, 1000]),
15 | InstrumentType::GAUGE, InstrumentType::ASYNCHRONOUS_GAUGE => new Aggregation\LastValueAggregation(),
16 | default => null,
17 | };
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Exemplar/BucketEntry.php:
--------------------------------------------------------------------------------
1 | getContext()->isSampled();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Exemplar/ExemplarFilterInterface.php:
--------------------------------------------------------------------------------
1 | $dataPointAttributes
17 | * @return array
18 | */
19 | public function collect(array $dataPointAttributes): array;
20 | }
21 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/Exemplar/NoopReservoir.php:
--------------------------------------------------------------------------------
1 | >
15 | */
16 | public array $observers = [];
17 | /**
18 | * @var array>
19 | */
20 | public array $writers = [];
21 | }
22 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/MeterProviderInterface.php:
--------------------------------------------------------------------------------
1 | $batch
13 | */
14 | public function export(iterable $batch): bool;
15 |
16 | public function shutdown(): bool;
17 | }
18 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/MetricMetadataInterface.php:
--------------------------------------------------------------------------------
1 | registry->add($provider, $metadata, $this->stalenessHandler);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/SDK/Metrics/MetricRegistrationInterface.php:
--------------------------------------------------------------------------------
1 | */
16 | public array $callbackIds = [];
17 |
18 | /**
19 | * @param ArrayAccess