open-telemetry/opentelemetry-instrumentation-installer

OpenTelemetry auto-instrumentation installer

Maintainers

Package info

github.com/opentelemetry-php/contrib-instrumentation-installer

Homepage

pkg:composer/open-telemetry/opentelemetry-instrumentation-installer

Statistics

Installs: 123 952

Dependents: 1

Suggesters: 0

Stars: 2

0.0.6 2023-08-23 22:02 UTC

This package is auto-updated.

Last update: 2026-03-11 13:27:29 UTC


README

This directory contains two scripts that helps install auto-instrumentation support and run application.

First script install-otel-instrumentation will install all needed dependencies for auto-instrumentation. Second run-with-otel-instrumentation is responsible for setting few environment variables (that are needed to export traces into backend) and running application.

Install script works in two modes:

  • basic (will install defaults)
  • advanced (interactive mode, you will control whole process)

Example workflow

This section shows how to install and run auto-instrumented application which uses Slim framework. To generate application, we follow steps described here: https://www.slimframework.com/.

    composer create-project slim/slim-skeleton:dev-master slimauto
    cd slimauto
    composer require open-telemetry/opentelemetry-instrumentation-installer
    ./vendor/bin/install-otel-instrumentation basic beta
    ./vendor/bin/run-with-otel-instrumentation php -S localhost:8080 -t public public/index.php