Download the PHP package changole/otel-logging without Composer

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

Laravel OpenTelemetry Logging

Latest Version on Packagist Total Downloads License

A Laravel package that seamlessly integrates with OpenTelemetry by sending your application logs to OpenTelemetry collectors using the OTLP protocol.

Features

Installation

You can install the package via composer:

Configuration

Publishing the Configuration

Publish the configuration file:

This will create a config/otel-logging.php file where you can configure the package.

Environment Variables

Configure the package using environment variables in your .env file:

Usage

Configure the Logging Channel

Add the OpenTelemetry channel to your logging configuration in config/logging.php:

Basic Usage

Once configured, the handler will automatically send logs to your OpenTelemetry collector:

Logging Exceptions

Exception details are automatically formatted according to OpenTelemetry conventions:

Distributed Tracing

Add trace and span IDs to correlate logs with traces:

Configuration Options

Environment Variable Description Default
OTEL_ENABLED Enable or disable OpenTelemetry logging false
OTEL_EXPORTER_ENDPOINT The URL of the OpenTelemetry collector https://collector.example.com/v1/logs
OTEL_SERVICE_NAME The name of your service laravel-app
OTEL_HTTP_TIMEOUT Timeout for HTTP requests in seconds 5

Troubleshooting

Logs aren't being sent to the collector

  1. Check that OTEL_ENABLED is set to true in your .env file
  2. Verify your collector endpoint is correct and accessible
  3. Check your Laravel logs for any error messages related to sending logs

Performance considerations

The package is designed to have minimal impact on performance, but if you're concerned about performance in high-volume environments:

  1. Consider using a batched collector endpoint
  2. Set an appropriate log level to reduce the volume of logs

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Credits

About OpenTelemetry

OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument, generate, collect, and export telemetry data (logs) for analysis in order to understand what is happening on your software's.


All versions of otel-logging with dependencies

PHP Build Version
Package Version
Requires monolog/monolog Version ^2.0|^3.0
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/log Version ^8.0|^9.0|^10.0|^11.0|^12.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 changole/otel-logging contains the following files

Loading the files please wait ....