* initial work on logs signal
* supressing psalm error
* "fixing" 7.4 segfault
through trial and error, I found that it was consistently segfaulting in the sdk autoloader
tests, but by running them in a different order, the failures went away.
* adding logs tests
* rename example per feedback
* move log context injection into processors, per spec
* correctly set context on logs
* update logger name per feedback
* adding variables, map psr3 to otel severity, fix timestamp
* psr-3 loggers
* tests, psr3 v3 fix
* remove LogRecordDate and refactor SDK log record classes
* tests, tidy, improvements
* remove todos
* documentation
* check for valid span context
* removing psr-3 compatibility, per spec and feedback
* use InstrumentationScopeFactoryInterface
* apply attribute limits on readablelogrecord creation
per feedback, this should be more memory efficient for the processors
* group log record by resource/scope
* remove psr3 references from readme
* ignoring psalm error
* add trace context in Logger rather than processors
per feedback, and following the example in java and python SIGs, we
can add trace context to logs once, in the logger, rather than having
processors do it. The Context passed to processors is no longer used,
but retained for spec compliance.
if an empty tracestate header was passed, we were emitting a warning (discovered in the demo app after enabling logging).
to fix this, check for empty string as well as null.
a script to identify which of our git-split repos have changes which are not in a release.
also creates release notes for the release, which can be dropped into the github UI
* print new release url
* relax symfony/yaml requirement
* warn about rate limiting if no token provided
using self.version does not work when we have different components being released individually. ^1.0 seems like a sensible initial setting now that we have reached beta.
* adding a configuration for disabling auto-instrumentations
addressing review feedback from pdelewski, provide a mechanism that can be used to disable auto-instrumentation packages
without actually uninstalling them.
A new variable, OTEL_PHP_DISABLED_INSTRUMENTATIONS, has been added which accepts a list of instrumentation names to be disabled.
Each instrumentation can call Instrumentation::isDisabled to determine if they should bail without registering hooks.
* moving instrumentation disabled into Sdk class
* allow OTEL_SDK_DISABLED to disable sdk autoloading
* review feedback
- test for sdk disabled in initializer
- sdk disabled does not disable propagator, per spec
Rather than log nothing by default, log warnings and greater to console.
By providing a psr-3 logger, users can gain greater control over logging, including disabling it (via NullLogger)
- remove baggage TODOs which have since been done.
- implement TODOs from tracestate to log warnings.
- tidy up tracestate code, simplify some const names.
* create text map propagators from registry
removing undocumented dependency between sdk and extension by adding text map propagators to a registry
as part of composer autoloading, similar to how exporters, transports etc are treated.
* remove TextMapPropagatorFactory instances and register the singletons directly
* rename FactoryRegistry to just Registry
* fixing some sdk/default resource values
- default service name should contain runtime name if available; java just appends ":java" so I did the same
Co-authored-by: Tobias Bachert <git@b-privat.de>
moving exporter examples up one directory, where I think they are more obvious to find.
remove some old and broken grpc examples.
remove unused interface.
when creating a stream from an endpoint string, the factory wasn't returning the stream. fix and add tests.
Co-authored-by: Tobias Bachert <git@b-privat.de>
* update grpc gitsplit destination
match the gitsplit destination repo to match package name: 'transport-grpc'
* adding missing autoload files for exporters
- remove Mocker mocks, which were contributing extra time, and replace with no-op implementations
- adding extra benchmarks (batch vs simple, protobuf vs json)
* 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
refactoring Environment access to allow configuration from multiple sources. Initially, the sources are env ($_SERVER) and php.ini, but this should allow us to add more sources in future without changing the API.
do not modify OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
allow resolvers to return mixed
* 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>