Download the PHP package jcleng/hyperf-opentelemetry-zincsearch without Composer

On this page you can find all versions of the php package jcleng/hyperf-opentelemetry-zincsearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyperf-opentelemetry-zincsearch

hyperf-opentelemetry-zincsearch

Hyperf tracer driver for OpenTelemetry with ZincSearch exporter.

This package provides a Hyperf tracer driver that uses the OpenTelemetry SDK with a ZincSearch exporter, bridged to Hyperf's OpenTracing abstraction via the opentracing-shim.

Architecture

Installation

The dependency jcleng/opentelemetry-exporter-zincsearch will be resolved automatically from Packagist.

Configuration

Publish the config file (or create config/autoload/opentracing.php manually):

Set the default driver and ZincSearch connection in .env:

Config Reference

The opentracing.tracer.zincsearch config block:

Key Type Required Default Description
driver string Yes - Must be ZincSearchTracerFactory::class
app.name string No skeleton Service name used in trace resource attributes
zinc_url string Yes http://127.0.0.1:4080 ZincSearch base URL
zinc_password string Yes - Base64-encoded Basic auth credential
index_name string No exporter_zincsearch Target ZincSearch index name
timeout float No 5.0 HTTP request timeout in seconds

Usage

Once configured, Hyperf's built-in tracer aspects (Guzzle, Redis, DB, RPC, etc.) will automatically create spans and export them to ZincSearch.

Enable specific tracers in .env:

Swoole Coroutine Compatibility

This package uses a custom CoroutineSafeSpanProcessor instead of the OpenTelemetry SDK's SimpleSpanProcessor. The official SimpleSpanProcessor activates/detaches an OpenTelemetry context scope around every export call. In a Swoole coroutine environment, Fiber::getCurrent() returns null inside coroutines, so all coroutines share the same context scope stack. When the export HTTP request yields the coroutine, another coroutine's scope activation corrupts the shared stack, causing Scope: unexpected call to Scope::detach() errors.

CoroutineSafeSpanProcessor eliminates this by not activating any context scope during export — the ZincSearch exporter only makes an HTTP POST and does not depend on the OpenTelemetry context.

If you use other OpenTelemetry components that also activate scopes, you can additionally suppress debug scope warnings via environment variable:

Trace Export Recursion Prevention

When TRACER_ENABLE_GUZZLE=true, Hyperf's HttpClientAspect intercepts all GuzzleHttp\Client requests via AOP and creates trace spans. Without protection, the Transport's own Guzzle request to ZincSearch would be intercepted, creating a new span that triggers another export, forming an infinite recursion:

This package prevents the loop by passing 'no_aspect' => true in the Guzzle request options via the guzzle_options config key. HttpClientAspect checks this option and skips tracing when set. In non-Hyperf environments, Guzzle silently ignores unknown options, so the exporter package remains framework-agnostic.

You can customize guzzle_options in config/autoload/opentracing.php:

License

Apache-2.0


All versions of hyperf-opentelemetry-zincsearch with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
hyperf/contract Version ~3.1.0
hyperf/tracer Version ~3.1.0
jcleng/opentelemetry-exporter-zincsearch Version ^1.0
open-telemetry/opentracing-shim Version ^0.0.3
open-telemetry/sdk Version ^1.9
open-telemetry/sem-conv Version ^1.0
opentracing/opentracing Version ^1.0
psr/log Version ^1.1 || ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jcleng/hyperf-opentelemetry-zincsearch contains the following files

Loading the files please wait ...