Download the PHP package couchbase/couchbase-opentelemetry without Composer

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

Couchbase PHP Client OpenTelemetry Integration

This package provides OpenTelemetry implementations of the Couchbase PHP SDK's observability interfaces (RequestTracer, RequestSpan, Meter, and ValueRecorder), enabling distributed tracing and metrics export via the OpenTelemetry ecosystem.

Requirements

Installation

Usage

Tracing

Metrics

Tracing and Metrics together

Classes

Class Couchbase Interface Description
OpenTelemetryRequestTracer RequestTracer Creates OTel CLIENT spans for each SDK operation
OpenTelemetryRequestSpan RequestSpan Wraps an OTel SpanInterface; maps Couchbase status codes
OpenTelemetryMeter Meter Creates and caches OTel histograms for SDK metrics
OpenTelemetryValueRecorder ValueRecorder Records values against an OTel histogram, converting units

Unit Conversion

The Couchbase SDK reports operation durations internally in microseconds. OpenTelemetryValueRecorder automatically converts values to seconds when the metric's unit tag is "s" (as used for db.client.operation.duration), matching the OpenTelemetry semantic conventions for duration metrics.

Instrumentation Scope

Both the tracer and meter register under the instrumentation scope name com.couchbase.client/php.

Development

Running Tests

This library includes integration tests that verify the OpenTelemetry instrumentation works correctly with the Couchbase PHP SDK.

Prerequisites

  1. Install dependencies:

  2. Couchbase Server: Tests require a running Couchbase Server instance. You can use:

    • Local installation
    • Docker: docker run -d --name couchbase -p 8091-8096:8091-8096 -p 11210-11211:11210-11211 couchbase:latest
    • Couchbase Cloud
  3. Environment Configuration (optional):

    Note: For multi-node clusters, the connection string can include multiple hosts (e.g., couchbase://host1,host2,host3). The tests will use the first host for administrative API calls.

Running Tests

Code Quality

This project uses automated code quality tools to maintain consistent code style and catch syntax errors. These same checks run in CI, so running them locally helps ensure your contributions pass all quality gates.

Available Commands

Code Style Configuration

The project uses PHP CS Fixer to maintain consistent code formatting. The tool will automatically format your code according to project standards.

Recommended workflow:

  1. Write your code
  2. Run composer quality to check for issues
  3. Run composer cs-fix to automatically fix style issues
  4. Commit your changes

The composer quality command runs the same checks as our CI pipeline, so passing it locally means your PR should pass the automated quality checks.

Test Structure

The integration tests verify:

Continuous Integration

Tests run automatically on GitHub Actions for:

See .github/workflows/tests.yml for the complete CI configuration.

License

Apache 2.0 — see LICENSE.

Copyright 2026-Present Couchbase, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

All versions of couchbase-opentelemetry with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
couchbase/couchbase Version ^4.5
open-telemetry/api Version ^1.0
open-telemetry/exporter-otlp Version ^1.4
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 couchbase/couchbase-opentelemetry contains the following files

Loading the files please wait ...