Skip to content

opentelemetry-php/contrib-auto-wordpress

Repository files navigation

Releases Issues Source Mirror Latest Version Stable

This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.

OpenTelemetry Wordpress auto-instrumentation

Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to install and configure the extension and SDK.

Requirements

  • OpenTelemetry extension
  • OpenTelemetry SDK + exporter (required to actually export traces)
  • WordPress installation
  • OpenTelemetry SDK Autoloading configured

Overview

OpenTelemetry depends on composer, unlike Wordpress. This extension was developed against johnpbloch/wordpress-core, but it should also work with other installation methods.

An example in Docker of extending the official Wordpress image to enable auto-instrumentation: https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/examples/instrumentation/Wordpress

apache

Configure (eg via .htaccess) a PHP prepend file to initialize composer:

php_value auto_prepend_file /var/www/vendor/autoload.php

This will install the composer autoloader before running Wordpress. As part of composer autoloading, scripts are executed for installed modules, importantly:

  • OpenTelemetry SDK Autoloader
  • this library's _register.php file

Installation via composer

$ composer require open-telemetry/opentelemetry-auto-wordpress

Configuration

The extension can be disabled via runtime configuration:

OTEL_PHP_DISABLED_INSTRUMENTATIONS=wordpress

About

[READONLY] OpenTelemetry Wordpress auto-instrumentation

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 11

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy