* run unit tests in random order
running in random order highlights some interference between tests (mostly logging being enabled), and is a requirement for
mutation testing (ie, all tests must pass when executed in a random order).
* adding infection mutation testing
this adds the ability to run infection. It generates a lot of output, which is an exercise for another PR...
* replace assertwell/phpunit-global-state
the package was not compatible with phpunit 11. create out own test Trait, which handles
env vars, as well as general cleanup of the usual suspects of state that our tests mess up
* remove redundant tearDown functions
there's an after annotation on the trait to handle this
* use rector to upgrade tests for phpunit 11
* fixing CoversFunction for namespaced functions
* use FQNs in test attributes
* migrate Clock classes to API
- move Clock* + Util into API
- add a deprecated wrapper for ClockFactory and Util
- remove unused StopWatch* classes
* review feedback
* replace ClockFactory with Clock
It's not really a factory, and really only provides access to a system clock. Create a
Clock class which is more clear in its purpose.
* remove time Util class
per review feedback, it's only used in Zipkin. Removed some unused consts from ClockInterface
* Apply suggestions from code review
Co-authored-by: Tobias Bachert <git@b-privat.de>
---------
Co-authored-by: Tobias Bachert <git@b-privat.de>
- remove Mocker mocks, which were contributing extra time, and replace with no-op implementations
- adding extra benchmarks (batch vs simple, protobuf vs json)
* merge otlp exporters
continuing on from Nevay's work, this removes the individual OtlpHttp and OtlpGrpc exporters, and replaces with
Otlp\Exporter using a transport to manage grpc and http/protobuf complexity.
* tidy
* use mockery overload instead of prototype clone
* making all smoke-test examples work
* removing startBatch
verified that the call attributes have the same values when using TraceServiceClient
* tidy
* tidy
* Revert "use mockery overload instead of prototype clone"
This reverts commit bbb685b4d1.
Mocking proto-generated files segfaults with ext-protobuf (which is harder to diagnose when running in a child process, which
was required for fancy mockery mocking of "new". So, back to the prototype approach, and skip the tests if ext-protobuf enabled.
* tests without mocking protobuf
* test
* typo
* reverting FromConnectionStringInterface
* grpc headers
* revert to dumb transports, handle multiple protocols
* tidy, adding initial otlp json support
* self-review
* linting
* remove redundant interface
* Revert "remove redundant interface"
This reverts commit 350d40cdfe.
* fix getFloat
Co-authored-by: Tobias Bachert <git@b-privat.de>
* move withSignal into otlp-specific interface
* moving exporter/transport env handling into a new factory
* linting
* remove unused code
* tidy
* moving OtlpHttp into Otlp
* removing OtlpTransportFactoryInterface
* fix style
* fixing psalm error
* addressing review feedback
* replacing removed code
* fixing example
Co-authored-by: Tobias Bachert <git@b-privat.de>
* Add attributes to instrumentation scope
* Remove `::getDefaultTracer()`
Instrumentation should use dedicated tracers.
* Remove SDK `::getTracer()` default name
Instrumentation should use API `TracerProvider` which requires providing a name.
* 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 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
* span converter rework
- combine otlp's grpc and http span converters into one
- adjust UsesSpanConverterTrait to always deal with arrays of spans, since span processors only accept arrays
Still to do:
- combine duplicated grpc/http span converter tests
* tidy
* make internal otlp span converted methods private
* WIP
* Return Opts object so chain config
* More WIP
* combining otlp and grpc config
based on SeanHood's initial work for #383, I've fleshed out ConfigOpts, and used it to
simplify the configuration of the http and grpc exporters
* tidy
* changing compression to string, per spec
* update example - insecure defaults to false per spec
* moving more config into ConfigOpts
now both http and grpc exporters have almost the same constructor (todo Grpc accepts a SpanConverter
but http does not)
* removing unused SpanConverter param
* remove unused function
* test coverage for grpc exporter
Co-authored-by: Sean Hood <me@seanhood.co.uk>
* benchmark setup
some initial benchmarking tests, based loosely on the spec and with some inspiration from the python-otlp tests
* link to extensive go benchmarks for inspiration
* style
* psalm + phpstan
* remove accidental commit
* style fix
* more benchmarks
* undo accidental commit