OpenTelemetry SDK
This module integrates the OpenTelemetry SDK into Drupal, allowing for the collection and export of telemetry data such as traces, metrics, and logs. This integration helps developers monitor and understand the performance and behavior of their Drupal applications.
Integrates the OpenTelemetry SDK.
For a full description of the module, visit the project page.
Submit bug reports and feature suggestions, or track changes in the issue queue.
Requirements
This module requires the OpenTelemetry SDK library:
Recommended libraries
One of the exporter libraries is required in order to ship instrumentation results to an OpenTelemetry endpoint.
Installation
Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.
Add one or more of the recommended libraries using composer.
Configuration
- Enable the module at Administration > Extend.
- Supply OpenTelemetry SDK configuration via settings.php.
Example:
$settings['otsdk'] = [ Variables::OTEL_PHP_AUTOLOAD_ENABLED => TRUE, Variables::OTEL_METRICS_EXPORTER => 'console', Variables::OTEL_TRACES_EXPORTER => 'console', Variables::OTEL_LOGS_EXPORTER => 'console', ];
See the OpenTelemetry docs for a full list of supported settings.