open-telemetry / open-telemetry/opentelemetry-php

[opentelemetry-php-contrib] Add auto-instrumentation for the Phalcon PHP framework

Open
#2,053 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

instrumentation
Dominant language
PHP
Stars
912
Forks
232
Avg merge
7d 16h
Merged PRs (30d)
4

Description

Proposal

Add an auto-instrumentation package for apps built on the Phalcon PHP framework to open-telemetry/opentelemetry-php-contrib. No Phalcon package exists there today — the existing src/Instrumentation/ packages cover Symfony, Laravel, Slim, CakePHP, CodeIgniter, Yii, and others, but not Phalcon.

PR already open with a working implementation: https://github.com/open-telemetry/opentelemetry-php-contrib/pull/729 (currently draft).

Summary of the approach

  • Hooks Phalcon\Mvc\Application::handle(), Phalcon\Mvc\Micro::handle(), Phalcon\Cli\Console::handle(), and Phalcon\Dispatcher\AbstractDispatcher::dispatch() (as a fallback root, only when none of the other three already started one) so a root span is created regardless of whether the app uses a full MVC Application, a Micro app, a CLI task, or calls the dispatcher directly (e.g. an API-only front controller).
  • AbstractDispatcher::callActionMethod() produces one child span per controller action invoked, correctly deduplicated against Dispatcher subclasses that override it and call parent:: internally.
  • Requires PHP >= 8.2 (Zend Observer API support for internal/extension-class methods) and Phalcon 5.x.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing packages under src/Instrumentation/ and the draft PR #729, then compare its Phalcon integration with the stated Application, Micro, Console, and Dispatcher entry points. Done means a reviewed auto-instrumentation package covering Phalcon 5.x on PHP >=8.2, with the proposed root and controller-action spans behaving as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.