* 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.
* Fix typos and some redundancy
Fixed a few typos and removed mentions of "from your bash compatible
shell" (we use make so these commands are compatible with all clis)
* Make BC error level configurable
* Add information about BC errors to README
* Make CS happy
* Silence Psalm
* Add missing test
* Remove unused data annotation
this should make the build green for 8.1, finally. We can now consider 8.1 supported,
and so it moves out of experimental - future 8.1 breaks will fail the pipeline.
allow logging methods in LogsMessagesTrait to be called from within either a static or non-static method.
in passing, adding a missing coversNothing annotation on a complaining integration test
* 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
* Add test based on the spec
* Fix the other tests which appear flaky
* Clarify the randomness in these tests
* Add concrete example from Go for the trace id splitting
* Fix style
a bug when fetching settings from environment was causing the grpc exporter to always use our default
value, rather than the one provided to the exporter's constructor
* Factor a class out for handling the id conversion
* Remove remaining direct intval references
* Further isolating the soon-to-be-replaced use of intval
* Use brick\math to fix the issue and update the existing tests
* Adding brick\math to composer.json because I missed it in the previous commit?
* Adding some edge case unit tests around the id conversion
* Move explanatory comments into the data provider itself
* Add new package to phan config
* Fix style
* Try clarify comment
* Extract constant
* Remove comments
* Try quick manual merge to fix merge conflicts
* 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
phpstan has just started to fail on a couple of test assertions based on their phpdoc return type:
Call to method PHPUnit\Framework\Assert::assertNotSame() with mixed and mixed will always evaluate to false
This doesn't consider that assert<Not>Same will also check for whether two objects are the same instance, so
ignore the error.
* 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
* Scaffold the new exporter and helper class
* Make the SpanConverter compliant to the interface the others are
* Removing check already covered by SpanExporterTrait
* Adding in scaffolding for a happy path test through the new code
* Fix bugs when path is present or endpoint scheme is https
* Remove type doc to fix psalm errors
* Comment out doc type to fix phan issue
* Fix style
* Add missing type in constructor
* Shorten ternary
* Inline function calls in doExport
* Inline function calls in doExport
* Revert ternary condensation commit from earlier
* Not requiring a port be set in the endpoint URL and inferring it from the scheme when it's missing
* Try adjusting thttpclient with a subclass instead of adapter (#2)
* Setup the exporter for injecting a psr-18 client
* Switch to using a subclass of THttpCLient
* Getting the psr-18 client into the subclass
* Copy verbatim from THttpCLient the method that needs working
* Getting the request and stream factories in there too
* Migrating the headers over to use the psr18 and psr7 things
* Migrating over the body
* Commenting out some more things Otel doesn't need
* Commenting out the rest as it seems accounted for
* Removing the last of the old implementation
* Fix to undefined variable from previous commit
* Actually otel isn't using any custom headers so we don't need to handle those either
* Remove all the commented out code
* Updating fromConnectionString to use the discovery helpers to find and inject the PSR-18 and PSR-7 classes HttpCollectorExporter needs
* Reworking happy path test to use mocks of the PSR-18/PSR-7 interfaces
* Turning TODO in to comment
* Adjust line breaks
* Fix style
* Fix potential array key access error Phan noticed
* Ignore psalm false positives in the test file
* Workaround odd psalm bug/behavior of surfacing errors in THttpClient after it's been subclassed
* Switch to correct shortening of ternaries this time
* Minimal changes needed to drop dependence on THttpClient
* Moving some of the setters into the constructor now that the THttpClient superclass is gone
* Cleaning up endpointURL duplication and removing host_ member that's not really needed anymore
* Naming the copied over buf_ member a little more explicitly
* Naming the main test object in the span converter test class more clearly
* Renaming 2 of the files/classes to be more clear
* Remove inaccurate copy pasta leftover from THttpClient
* Fix style
* Factor out a helper object for parsing the endpoints to help satisfy Phan
* Have codecov pick up on the hlper class for code coverage
* Refactor the UDP exporter to also use the new ParsedEndpointUrl helper class
* Fix style
* Psalm makes a good point that the defaults for host/port in the UDP exporter can never be hit since the entry point requires them to be present in the endpoint URL
* Add support for OTLP signal specific environment overrides
Modified the OTLP gPRC and HTTP trace exporters to allow for
configuration options overrides by signal specific options to comply
with OpenTelemetry specs.
* Revert overrides for the INSECURE variable
* Add check method to EnvironmentVariableTrait
For better code readabilty, added a hasEnvironmentVariable() to
EnvironmentVariableTrait.
* Add check for empty certificate file
* Fix style and add check for endpoint variable