Commit Graph

11 Commits

Author SHA1 Message Date
Brett McBride 5a395e09da
enable timeout for http transports (#1275)
* enable timeout for http transports
Attempt to do our own discovery for some well-known PSR-18 clients, which allows
for configuring timeout (and in future certificates, keys etc).
This is not complete and a prototype for feedback, but I've updated an example to
show that it works for Guzzle and Symfony http clients

* improve client discovery

* refactor, test, add more implementations

* add timeout for logs and metrics
2024-04-25 16:21:00 +10:00
Brett McBride 73ff5adcb8
refactor sdk/api logging (#1105)
send errors/warnings/etc by default through PHP's error_log. This gives more control to administrators, since error_log can
be configured to write to any stream (file, stderr, etc). I think it's also less surprising for people trying out otel (particularly
with development PHP settings, where trigger_error often breaks an application).
Adding a configuration value to control where logs go: OTEL_PHP_LOG_DESTINATION.
2023-08-31 09:39:33 +10:00
Brett McBride a60d0ad80c
rename log record processors (#1073)
per TC review, align log record processor names with those used in the spec
2023-07-11 09:37:28 +10:00
Brett McBride 8fe898bdb4
adding batch span processor builder (#1046) 2023-06-23 10:22:49 +10:00
Brett McBride 1aea1f23b9
moving api/common classes up to api (#1033)
- apply TC review feedback to move Globals to top-level.
it was suggested to move Instrumentation into its own package, but I chose instead to just move that dir
up to the top level of API
- added a BC layer to alias the moved classes
- added some more examples
2023-06-16 08:51:03 +10:00
Brett McBride 23cc194da1
psalm check examples (#1006)
Configure psalm to run over all examples, and fixing the issues it identified.
2023-05-31 08:13:35 +02:00
Brett McBride a06e5e4e45
Multiple log processors (#967)
adding support for multiple log processors
2023-04-15 09:27:50 +10:00
Brett McBride e22007a98e
documenting logs bridge api, adding memory exporter (#959)
* implement bridge api

* adding logs memory exporter

* clarify bridge api not for developers

* adding logger provider builder

* review feedback

* removing Bridge and documenting what a bridge is
2023-04-12 08:06:41 -04:00
Brett McBride 602ea8539f
move LoggerHolder to API (#893)
there is a requirement (and some outstanding todo's) to log errors and warnings from the API, so move
logger setup into API to facilitate this.
2022-12-12 09:01:17 +11:00
Brett McBride 904da75ee6
adding exporter + transport registry (#862)
* 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
2022-11-23 14:39:24 -05:00
Brett McBride ba9899278f
Sdk builder (#845)
Adding an SDK builder and example usage.
2022-10-31 08:09:01 +11:00