* 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
* Refactor stacktrace formatter
- fixes "... n more" to fold only identical frames
- fixes exception class names not being converted to dotted format
- fixes functions being shown as `main`
- fixes out-of-memory on circular exception
* Rename stacktrace formatter
* 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
* Add integration tests for span builder
* Space fixed
* Add more descriptive names and @group annotation
Modified the names of the tests to be more descriptive and added the
`@group compliance` notation.
Additionally, I commented out one of the tests that I was not totally
sure of. (unsure if `setAttribute()` should work with empty string `''`
values.
* Fixed test name
* Check for specific attributes and not just count
Removed `$span->end()` calls as they shouldn't be necessary
* Remove redundant `end()` calls
* Add test for getting default tracer
Test to get default tracer. Also, added `@group` php unit annotation for
tests to check specification compliance
* Fixed warning
* Fixed style warning
* Extract InstrumentationLibrary key generation logic
Factors key generation logic for InstrumentationLibrary instances
out to a helper method in a utils class.
* Remove @see PHP annotation
Phan doesn't like it, couldn't see an acceptable workaround.
* Change key generator namespace and class
Changes the key generator's namespace to Util\Instrumentation and classname to
KeyGenerator, refactoring usages.
* Add unit tests for Instrumentation key generator
* Add test case for non-null version and null schema
Also renames the other 2 tests for descriptiveness.
* Make BC error level configurable
* Add information about BC errors to README
* Make CS happy
* Silence Psalm
* Add missing test
* Remove unused data annotation
* Add @group annotation to compliance tests
Marked tests for environment variables with phpunit @group annotations to identify
compliance tests. This enables for a way to run just those specific
test and will serve as a useful form of documentation.
* Add trace signal specific notation
* Commit in progress work because Gitpod is weird
* Finish initial stab at the changes
* Forgot to update the exporter
* Add in proper handling of serialization of ResourceInfo
* ksort doesn't return the array...
* Only PHP 8.1 supports key-ed array destructuring
* Creating some adapters to break the hard dependency on Batch to make testing easier
* Refactoring to break the hard dependency on Batch
* Add initial unit tests around the new logic in HttpSender
* Some refactoring of the test's helpers
* Another small refactor
* Some more refactoring
* Rename ResourceInfo's test file to match it's file name
* Move a test our of REsourceInfoTest into a more appropriate file
* Add some basic conformance tests around the new ResourceInfo::serialize method
* Add a test to try and catch future properties that aren't added to ResourceInfo::serialize
* CLean up comments
* Replace string with constant
* Improve variable names
* Cleaning up comment
* Split out tag creation into a helper class
* Phan didn't like the type docs
* Fix style
* Fix tests after merge from main
* Fix coverage reporting issues on 2 of the new files
* Fix style
* Rename vals to values
* Shortening the batch adapter factory method name to create
* Inline a method call
* Inline some method calls
* Shorten factory method to just "create"
* Inline some code
* Split assertions into 3 tests
* Rename parameter in interface implementation for psalm + update the rest of the file to match
Co-authored-by: Timo Michna <timomichna@yahoo.de>
* 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
* Added OTEL_PHP_DETECTORS environment variable to configure detectors from environment
* Added unit tests for defaultResource
* Review comment: Added exapmle
* Refactoring to keep the syntax same across examples
* Review comment: Using static method instead creating instance and using constants
* fixing otlp span converter with ext-protobuf
There looks to be a bug in ext-protobuf, where an array with any empty string top-level values cause an error. A workaround for this is to strip out entries with empty values.
Adding ext-protobuf to the test matrix, and in passing fixing a mis-named test class
* document and suggest protobuf extension
* 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