We use cookies or similar technologies to personalize your online experience & tailor marketing to you. Many of our product features require cookies to function properly.

Read our privacy policy I accept cookies from this site

Instrument PHP applications

Honeycomb does not provide a direct SDK for PHP or Laravel applications. You can, however, use the OpenCensus bindings for PHP along with the OpenCensus Collector to send detailed traces from PHP to Honeycomb.

Note: The OpenCensus project recently merged with OpenTracing to form the OpenTelemetry project. Instructions provided here are for OpenCensus – when OpenTelemetry has a stable release, OpenTelemetry will become the recommended method and will have a very simliar architecture to what is outlined here. The OpenTelemetry project has committed to maintaining backwards compatible bridges with OpenCensus to make migration smooth for you.

Using OpenCensus to Integrate PHP  🔗

The architecture for using OpenCensus’s PHP bindings with Honeycomb is as follows:

  1. PHP bindings for OpenCensus installed as a library in your PHP app
  2. The OpenCensus Agent running as a sidecar to each PHP instance, receiving telemetry data from the code bindings
  3. The OpenCensus Collector running as a solo service, which receives the spans from the Agent and forwards them to Honeycomb

A diagram of only these components is shown below. The referenced OpenCensus documentation explains how to install and connect these components. You will need to add the following YAML configuration to the config for the OpenCensus Collector.

exporters:
  honeycomb:
    write_key: "YOUR_WRITEKEY"
    dataset_name: "prod-traces"