The SDK should log a warning once if there are any dropped span attributes, links, link attributes, events or event attributes.
The SDK should log a warning once if there are any dropped LogRecord attributes.
* 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
* adding exporter + transport registry
to remove the hidden dependency between SDK and contrib, move all of the exporter knowledge out of
exporter factory, and invent a registry to hold those values. The registry can be added to by contrib
modules as part of composer autoloading.
This also allows users to override things like transports (eg, provide their own grpc transport).
Remove exporter's fromConnectionString as it's not in spec, and I couldn't get it to work nicely with the
registry idea.
* fixing up examples
* allow callables to be registered as factories
adding an example of replacing a registered transport factory with another implementation
* Registry to FactoryRegistry
* new relic exporter factory, tests
* review suggestions
* tidy
* change fromEnvironment() to create() in factories
* return no-op span builder after shutdown
this completes a todo in code comments: when tracer shared state has shutdown, getting a span builder should return a no-op implementation
* adding unit test for post-shared-state-shutdown
* 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
* Remove `Context::withValue()`
Creates a hidden `Scope` when called without `$parent`.
* Remove `Context::detach(Scope)`
* Remove static `Context::attach()`
* Add missing typehints
* Use loop instead of recursion
* Fix `MultiTextMapPropagator::extract()` clearing context
* Fix `TextMapPropagator::composite()` for named arguments
* Make `Context` constructor non-public
* Make `Context` and `ContextKey` final
* Fix `ArrayAccessGetterSetter`
Resolves inconsistencies in case-insensitive handling.
* Fix psalm
* Fix cannot mock final class `Context`
Revert after introducing ContextInterface?
* Apply feedback and remove obsolete parentheses
* Use psalm-suppress instead of assert
* updating proto generation
switching over to using opentelemetry-proto's own mechanism for generating protobuf interfaces, and
updating interfaces to latest version
* downgrade protobuf interfaces to 0.14.0
this is the latest version that seems to work with out grpc exporter, further
investigation required for 0.15.0+
* tidy up script
* renaming InstrumentationLibrary to InstrumentationScope and bumping protobuf
InstrumentationLibrary is now deprecated in favour of InstrumentationScope. Making this change
resolves issues with grpc+protobuf exports being ignored by the otel collector, so we now
can update the proto interfaces to latest.
* rename collector docker-compose file
* adding covers annotations to all tests
* clock tests
* adding unit tests
* feedback
- cleaning up ValueRecorder tests
- ints are floats, so type-hint ValueRecorder::record and remove some checks
* reorganise tests
moving tests under tests/Unit and tests/Integration, and updating namespaces
changing 'make test' to just run unit tests, and generate coverage off that
adding a 'make test-integration' to run integration tests (without coverage)
adding test-integration to 'make all'
adding a separate github action to run integration tests
* tidy 'make test'
make test is now a combination of test-unit and test-integration
* fixing 'make all'
* adding unit tests for TraceIdRatioBasedSampler
I grabbed a couple of the more unit-tests tests from the integration tests. Also starting to add some @covers
annotations to start to remove false coverage