Thanks to visit codestin.com
Credit goes to github.com

Skip to content

opentelemetry-php/contrib-auto-reactphp

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 ReactPHP HTTP Browser auto-instrumentation

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

Overview

Auto-instrumentation hooks are registered via composer, which will:

  • create spans automatically for each ReactPHP HTTP Browser request that is sent
  • add a traceparent header to the request to facilitate distributed tracing

Note that span lifetime behavior differs based on how ReactPHP is utilized; see examples/README.md for more information.

Configuration

The extension can be disabled via runtime configuration:

OTEL_PHP_DISABLED_INSTRUMENTATIONS=reactphp

Custom HTTP methods can replace the known methods via environment variables, e.g.:

OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS="GET,HEAD,POST,PUT,DELETE,CONNECT,OPTIONS,TRACE,PATCH,MyCustomMethod"

Request and/or response headers can be added as span attributes via environment variables, e.g.:

OTEL_PHP_INSTRUMENTATION_HTTP_REQUEST_HEADERS=Accept
OTEL_PHP_INSTRUMENTATION_HTTP_RESPONSE_HEADERS="Content-Length,Content-Type"

About

[READONLY] ReactPHP auto-instrumentation

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages