Download the PHP package opencensus/opencensus without Composer

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

Warning

OpenCensus and OpenTracing have merged to form OpenTelemetry, which serves as the next major version of OpenCensus and OpenTracing.

OpenTelemetry has now reached feature parity with OpenCensus, with tracing and metrics SDKs available in .NET, Golang, Java, NodeJS, and Python. All OpenCensus Github repositories, except census-instrumentation/opencensus-python, will be archived on July 31st, 2023. We encourage users to migrate to OpenTelemetry by this date.

To help you gradually migrate your instrumentation to OpenTelemetry, bridges are available in Java, Go, Python, and JS. Read the full blog post to learn more.

OpenCensus for PHP - A stats collection and distributed tracing framework

Census for PHP. Census provides a framework to measure a server's resource usage and collect performance stats. This repository contains PHP related utilities and supporting software needed by Census.

CircleCI Packagist PHP-Version

Installation & basic usage

  1. Install the opencensus/opencensus package using composer:

    IMPORTANT: Please ensure your version is >= 0.2.0. There is a potential security vulnerability in < 0.2.0.

  2. [Optional]: Install the opencensus extension from PECL:

    Enable the extension in your php.ini:

  3. Initialize a tracer for your application:

Usage

To add tracing to a block of code, you can use the closure/callable form or explicitly open and close spans yourself.

Closure/Callable (preferred)

Explicit Span Management

Customization

Samplers

You can specify different samplers when initializing a tracer. The default sampler is the AlwaysSampleSampler which will attempt to trace all requests.

The provided samplers are:

Class Description
NeverSampleSampler Never trace any requests
AlwaysSampleSampler Trace all requests
MultiSampler Check multiple samplers
QpsSampler Trace X requests per second. Requires a PSR-6 cache implementation
ProbabilitySampler Trace X percent of requests.

If you would like to provide your own sampler, create a class that implements SamplerInterface.

Exporters

You can choose different exporters to send the collected traces to.

The provided exporters are:

Class Description Dependency
EchoExporter Output the collected spans to stdout
FileExporter Output JSON encoded spans to a file
JaegerExporter Report traces to Jaeger server via Thrift over UDP opencensus/opencensus-exporter-jaeger
LoggerExporter Exporter JSON encoded spans to a PSR-3 logger
NullExporter No-op
OneLineEchoExporter Output the collected spans to stdout with one-line
StackdriverExporter Report traces to Google Cloud Stackdriver Trace opencensus/opencensus-exporter-stackdriver
ZipkinExporter Report collected spans to a Zipkin server opencensus/opencensus-exporter-zipkin

If you would like to provide your own reporter, create a class that implements ExporterInterface.

Versioning

Packagist

This library follows Semantic Versioning.

Please note it is currently under active development. Any release versioned 0.x.y is subject to backwards incompatible changes at any time.

GA: Libraries defined at a GA quality level are stable, and will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.

Beta: Libraries defined at a Beta quality level are expected to be mostly stable and we're working towards their release candidate. We will address issues and requests with a higher priority.

Alpha: Libraries defined at an Alpha quality level are still a work-in-progress and are more likely to get backwards-incompatible updates.

Current Status: Alpha

Contributing

Contributions to this library are always welcome and highly encouraged.

See CONTRIBUTING for more information on how to get started.

Releasing

See RELEASING for more information on releasing new versions.

License

Apache 2.0 - See LICENSE for more information.

Disclaimer

This is not an official Google product.


All versions of opencensus with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ramsey/uuid Version ^3.0 || ^4.0
psr/log Version ^1.0
psr/cache Version ^1.0 || ^2.0 || ^3.0
cache/adapter-common Version ^1.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 opencensus/opencensus contains the following files

Loading the files please wait ....