Download the PHP package maltertech/betterstack-telemetry without Composer

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

BetterStack Telemetry for AWS CloudWatch

A lightweight, zero-dependency PHP library designed to forward AWS CloudWatch Logs directly to BetterStack Telemetry (Logtail).

This package handles the specific format of AWS Lambda log subscription filters:

  1. Decodes Base64 payload.
  2. Decompresses Gzip data.
  3. Parses JSON log events.
  4. Filters standard Lambda noise (start/end requests).
  5. Ships structured logs to BetterStack.

Requirements

Installation

Install the package via Composer:

Usage

This library is designed to be used inside an AWS Lambda function (or any PHP application receiving raw CloudWatch log streams).

1. Initialization

Initialize the forwarder with your BetterStack credentials. Ideally, do this in your application's Service Provider or Dependency Injection container.

2. Processing Events

Pass the raw AWS event payload to the push method. The library will automatically detect if the payload contains compressed awslogs data and process it.

How it Works

When AWS CloudWatch streams logs to a Lambda function, it sends them in a compressed format: { "awslogs": { "data": "H4sIAAAAAAAA/..." } }

The CloudWatchForwarder performs the following steps:

  1. Extraction: target the ['awslogs']['data'] key.
  2. Decompression: base64_decode -> gzdecode.
  3. Parsing: Iterates through logEvents.
  4. Cleaning: Skips strictly internal Lambda messages (like RequestId: ...) to save quota.
  5. Formatting: Checks if the log message itself is JSON (e.g., from API Gateway) and parses it into a structured object; otherwise, treats it as a string.

License

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


All versions of betterstack-telemetry with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-json Version *
ext-zlib Version *
php-curl-class/php-curl-class Version >=9
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 maltertech/betterstack-telemetry contains the following files

Loading the files please wait ...