Download the PHP package motadata-apm/custom-instrumentation without Composer

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

Motadata APM Custom Instrumentation for PHP

PHP Version

Lightweight utilities for adding validated, namespaced custom attributes to Motadata Instrumentation spans in PHP. Designed to keep instrumentation safe, consistent, and easy to adopt.


Table of Contents


Overview

Motadata APM Custom Instrumentation helps you attach business context to traces without risking invalid attributes or inconsistent naming. Keys are automatically namespaced, inputs are validated, and the API is safe to use across concurrent requests.

Prerequisite: Instrument your app first with Motadata Auto Instrumentation so the span context is available.


Requirements


Installation

There are several ways to add this package to your project. Note that if this package is not yet published on Packagist, you must use the Local Path methods.

1. Via Composer CLI

If the package is published on Packagist:

2. Manual Installation (composer.json)

Add the package to your require block:

Then run:

3. Via VCS Repository (GitHub/Private Git)

Use this method to pull directly from the Git repository (e.g., for private use or internal testing).

  1. Add the repository to your composer.json:

  2. Run composer update.

Authentication for Private Repositories

When using the VCS method with a private repository, you must provide credentials.

Recommended: Using the CLI

Run this command to store your GitHub Personal Access Token (PAT) securely:

Manual: auth.json

Alternatively, create an auth.json file in your project root or in ~/.composer/:

Warning: Never commit auth.json to version control. Add it to your .gitignore.


Note for Auto-Instrumentation Users: If you are using the Motadata PHP Auto-Instrumentation script, it may occasionally revert composer.json or remove this package during dependency synchronization. If the package is missing from your composer.json after instrumentation, simply re-add the package details as shown in the installation steps above and run composer update.


Quick Start

Keys are automatically prefixed with apm. when missing, but prefer providing the prefix yourself for consistency. All setters throw Exception on invalid input or missing span context, so keep calls wrapped in try/catch.


API at a Glance

Scalar

Method Parameter
set(string $key, bool $value) bool
setInt(string $key, int $value) int
setFloat(string $key, float $value) float (finite)
setString(string $key, string $value) string

Arrays

Method Parameter
setBoolArray(string $key, array $values) bool[]
setIntArray(string $key, array $values) int[]
setFloatArray(string $key, array $values) float[] (finite)
setStringArray(string $key, array $values) string[]

Behavior & Validation


Best Practices


Support


License

Copyright (c) Motadata 2026. All rights reserved.

Proprietary software; see LICENSE for full terms.


All versions of custom-instrumentation with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1 <=8.4
open-telemetry/api Version ^1.3
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 motadata-apm/custom-instrumentation contains the following files

Loading the files please wait ...