* Cleanup `AttributesInterface`
- remove not required methods
- rename `::hasAttribute()` to `::has()` for consistency with `::get()`
* Remove public usage of `new Attributes()`
* Split `Attributes` into immutable attributes and mutable builder
* Remove `AttributesLimits`
* Remove `::incrementDroppedAttributesCount()` for now
Mainly useful for metrics sdk that has to rebuild filtered attributes.
* Remove obsolete cloning of attributes
* Update covers annotation
* Revert optional changes that might be controversial
* Move Clock classes to SDK\Common\Time namespace
* Move conversion methods to Util class
* Implement StopWatch
* Implement ClockFactory
* Fix StopwatchInterface
* Finalize ClockFactory
* Implement StopWatchFactory
* Deprecate AbstractClock
* Add BC alias
* Add initial start time to StopWatch
* Unify and optimize SystemClock methods
* Use ClockFactory in Span
* Use ClockFactory in BatchSpanProcessor
* Use ClockInterface in BatchSpanProcessorTest
* Use ClockFactory in SpanData
* Use ClockFactory in examples
* Add millisToNanos Util method
* Use StopWatch in BatchSpanProcessor
* Make Phan happy
* Make Psalm happy
* Make PHPUnit happy
* Remove sllh/composer-versions-check from allowed composer plugins
* Use correct assertion
* Use correct assertion
* Assert difference
* Move Attribute classes to Common namespace
* refactor AttributesTest
* Move Attribute classes to Common namespace in examples
* Introduce AttributeLimitsInterface
* Fix bug in total added values calculation
* Move compare test to correct test-class
* Apply CS
* Refactor Attributes
* Fix attributes in Benchmark
* Move AttributeLimits defaults to interface
* Move Attributes and Clock out of /Trace namespace
Also needed for other components (metrics).
* Move Event and Link to SDK
* Move NoopTracer to API
* Remove `Attribute` abstraction
* Move `Attributes` to SDK by widening API attributes types to `iterable`
* Move `Clockinterface` to SDK
* Fix fqcn usage
* Readd `AttributesInterface` mock
* Move `TraceState` and W3C `TraceContextPropagator` to API
* Create and move namespaces into `src/` directory
* Update `composer.json`
Move test helpers outside of `SDK` namespace into `Tests`
* Follow PSR naming conventions for interfaces
* Follow PSR naming conventions for abstract classes and traits
* Do a pass on CI configs
* Add examples directory to cs-fixer config
* Fix some erroneously renamed type names
* First pass at updating Span API
* First pass at updated Span implementation
* Update SDK Span return types to `ReadWriteSpan`
Drop support for PHP 7.3
* Finish initial implementation
* Implement `SpanData`
* Implement `StatusData`
* Re-implement and rename `NoopSpan` to `NonRecordingSpan`
* Updates to support `SpanData` in exporters/span processors
* Add timestamp conversion helper methods
Update Exporters to use `SpanData`
Start updating Exporter tests
Implement non immutable `SpanData` test helper class
* Finish updating exporters/converters
* Fix next batch of tests
* First pass at `Tracer` refactor
Leverage a `SpanBuilder` to create the span
Use a dedicated object to share state
* Just use `NonRecordingSpan` constructor versus `create`
Start of adding tests for new Tracer implementation
* Remove some unneeded `max`
Make `Sampler` the 2nd arg to `TraceProvider`
Fix Integration tests
* Add `NoopSpanProcessor`
Continue updating/adding tests
* Install mockery
Ensure span processor is called with expected contexts/spans
* Update `SpanData` to directly return dropped amounts
Make `SpanProcessor#onStart` take a `ReadWriteSpan`
Update empty span fallback name
* Revamp `Clock` interface/implementation
* Add some additional doc comments
Continued work on updating test coverage
* Add more `Span` tests
* Get tests to a passing state
* Fix type errors
* Make CI happy
* Apply limits within `Span` constructor and `SpanBuilder` logic
Add test coverage for these cases
* Update sampling behavior
* Change shouldSample() method signature to accept the Context
* Default sampler is ParentBased(root=AlwaysOn)
* Avoid to start sampled and non-recording span, return NooSpan
* Change names of SamplingResult constants: DROP, RECORD_ONLY, RECORD_AND_SAMPLE
* Return an updated TraceState in SamplingResult (parent TraceState by default)
* Merge Attributes from the SamplingResult with the Attributes provided in the startSpan method
* Add an integration test case for an overridden TraceState by the Sampler
move all tests in the same root directory - will be easy to follow
remove errant test and whitelist the library code for coverage instead of tests
inherit JaegerExporter from Zipkin since we are using the zipkin protocol to export to Jaeger
* Migrate src/ to sdk/ and api/
Co-authored-by: Bob Strecansky <bob.strecansky@gmail.com>
* Rename TracerFactory to TracerProvider
This follows opentelemetry/oteps#76.
Also start moving sdk tests into the sdk/Tests folder
* Touch up SpanStatus and ending spans
* Remove getTracerVersion and getTracerName
These aren't described in the spec -- we can add them back later
if we need to, but I suspect they belong only in the SDK, if anywhere.
* Update phan config and fix some warnings
* Start writing SpanOptions
Also start fixing examples, currently broken
* Fix PhpUnit 9 incompatibilities
Co-authored-by: Bob Strecansky <bob.strecansky@gmail.com>
* implement TracerFactory, begin migration to recommended library layout, use docker-compose and make to simplify development
* add tests for all TracerFactory method, move TraceFactory configuration in constructor
* run phan in travis-ci build
* rename namespace Tracing into Trace
* Performing Always and Never Sample Steps
* Updating examples to remove builder
* Updating examples to remove builder
* Removing builder from always off trace example