Download the PHP package laraotel/opentelemetry-laravel without Composer

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

LaraOTel OpenTelemetry Laravel Package

Total Downloads License

This package provides a simple way to use Telemetry From OpenTelemetry OTel into your Laravel application to Measure performance across jobs and services, database queries, events etc..

Introduction

OpenTelemetry, or OTel for short, is an Observability tools designed to create and manage telemetry data such as traces, metrics and logs, to collect information on how your entire system is behaving.

You can easily measure performance of a Laravel powered system. It can transmit the results to a tracing tool like Jaeger, Zikpin Or you can export data into Console, Json, text etc..

Bundle Zikpin and Jaeger into your Application

To visualize traces exported from our application, we need to integrate open source tracing tools Zipkin and Jaeger into our setup using docker.

First, we create a docker-compose.yaml file in the root of our project, with content as follows:

Next, we pull in Zipkin and Jaeger by running docker-compose up -d.

We can confirm that Zipkin is up by navigating to http://localhost:9411/ on our browser. For Jaeger, navigating to http://localhost:16686/ on our browser should display the Jaeger home page.

Installation

You can install the package via composer:

Important Note: The opentelemetry extension must be enabled on your machine.

Usage

Configuration

Publish the configuration file:

Update the environment variables

You can find them in configuration file: config/otel.php.

Register the middleware

you can register the middleware in the app/Http/Kernel.php:

In laravel 11 you can not register in the kernel.php the middlewares anymore. You can register your global middleware in bootstrap/app.php

or you can set the env variable OTEL_AUTO_TRACE_REQUESTS to true to enable it automatically.

Watchers

This package provides some watchers to help you trace your application:

You can enable or disable them in the configuration file: config/otel.php.

Custom span

You can create a custom span by using the LaraOTel\OpenTelemetryLaravel\Facades\Measure facade:

or manually start and end a span:

and you can modify the span attributes by using a closure:

of course, you can get the span instance by using the Measure::span() method:

Available Drivers

Available Logs Level

UML Diagram of the package design

Testing

License

The MIT License (MIT). Please see License File for more information.


All versions of opentelemetry-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
open-telemetry/sdk Version *
open-telemetry/exporter-otlp Version *
ext-opentelemetry Version *
open-telemetry/opentelemetry-auto-laravel Version ^0.0.25
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 laraotel/opentelemetry-laravel contains the following files

Loading the files please wait ....