Download the PHP package auxmoney/opentracing-bundle-core without Composer

On this page you can find all versions of the php package auxmoney/opentracing-bundle-core. 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 opentracing-bundle-core

auxmoney OpentracingBundle

test GitHub release (latest SemVer) Codacy Badge Code Climate maintainability Scrutinizer code quality (GitHub/Bitbucket) GitHub

This collection of symfony bundles provides everything needed for a symfony application to enable distributed tracing.

It utilizes the PHP implementation of the opentracing specification and wraps it in an opinionated fashion. It also aims to never disrupt your application, by not throwing exceptions and sending tracing data to the agent as late as possible in the Symfony lifecycle.

The core contains:

Additional bundles contain:

Installation

Choose tracer implementation

The core itself is only a library and should not be installed directly. You need to choose from different tracer implementation bundles, which will then use this library.

Jaeger

Note: when setting up a reliable production environment, keep in mind using the agent approach, that Jaeger proposes. Especially having the jaeger agent ideally available on localhost will prevent you from experiencing trace or span loss due to UDP packet size limitations by the involved networks.

Zipkin

Enable the bundle

If you are using Symfony Flex, you are all set!

If you are not using it, you need to manually enable the bundle:

Configuration

You can optionally configure environment variables, however, the default configuration will run fine out of the box for a tracing agent on localhost. If you cannot change environment variables in your project, you can alternatively overwrite the container parameters directly.

environment variable container parameter type default description
AUXMONEY_OPENTRACING_AGENT_HOST auxmoney_opentracing.agent.host string localhost hostname or IP of the agent
AUXMONEY_OPENTRACING_AGENT_PORT auxmoney_opentracing.agent.port string (depends on the chosen tracer) port of the agent
AUXMONEY_OPENTRACING_PROJECT_NAME auxmoney_opentracing.project.name string basename(kernel.project_dir) passed to the tracer as tracer name / service name
AUXMONEY_OPENTRACING_SAMPLER_CLASS auxmoney_opentracing.sampler.class string (depends on the chosen tracer) class of the using sampler
AUXMONEY_OPENTRACING_SAMPLER_VALUE auxmoney_opentracing.sampler.value string (depends on the chosen tracer and sampler) must be a JSON decodable string, for the configuration of the chosen sampler
AUXMONEY_OPENTRACING_RESPONSE_HEADER auxmoney_opentracing.response.header string true if HTTP responses should ship the trace id as header; set to false (as string) to deactivate

Usage

Propagation of tracing headers

For PSR-18 compatible clients, this bundle provides automatic tracing header propagation.

For Guzzle clients, the Guzzle bundle provides automatic tracing header propagation.

Manual propagation of tracing headers

If you use neither PSR-18 nor Guzzle, you need to inject the trace headers into every outgoing PSR-7 compatible request. To do so, simply use

on the request and use the resulting request with your favorite request client.

If you are using a request that is not PSR-7 compatible, you can inject the headers directly into an array using

passing the array representing the headers of your request and use the resulting array with your favorite request client.

Automatic tracing

Out of the box, the bundle will trace some spans automatically:

In case of exceptions thrown, it will additionally log exception types and messages to a controller/command span.

Manual tracing

You can inject the tracing service automatically (via autowiring) or use the provided service alias @auxmoney_opentracing.

Manual spanning

You can define spans manually, by using

and

respectively.

$operationName is the displayed name of the trace operation, $options is an associative array of tracing options; the main usage is $options['tags'], which is an associative array of user defined tags (key value pairs). See the documentation for starting spans for more information.

Tagging spans

You can set tags (key value pairs) to the currently active span with

You should respect the span conventions of the opentracing project when setting tags to spans.

Logging in spans

You can always attach logs (key value pairs) to the currently active span with

You should respect the log conventions of the opentracing project when logging fields.

Baggage items

You can propagate baggage items (key value pairs) in-band across process boundaries with

and retrieve them with

You should use this feature thoughtfully and with care. Every key and value is copied into every local and remote child of the associated Span, and that can add up to a lot of network and cpu overhead.

Development

Be sure to run

every time before you push code changes. The tools run by this script are also run in the CI pipeline.

Doc

Various informations regarding the bundle and its usage is available in the doc section.


All versions of opentracing-bundle-core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
psr/log Version ^1.1|^2.0|^3.0
psr/http-message Version ^1.0
psr/http-client Version ^1.0
opentracing/opentracing Version ^1.0.1
composer/package-versions-deprecated Version ^1.11.99
symfony/http-kernel Version ^4.4|^5.4|^6.2
symfony/dependency-injection Version ^4.4|^5.4|^6.2
symfony/config Version ^4.4|^5.4|^6.2
symfony/console Version ^4.4|^5.4|^6.2
symfony/yaml Version ^4.4|^5.4|^6.2
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 auxmoney/opentracing-bundle-core contains the following files

Loading the files please wait ....