Repository navigation
feat(profiler): take the profiles of the Blackfire probe in place of its agent - #390
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #390 +/- ##
==========================================
+ Coverage 81.88% 81.99% +0.11%
==========================================
Files 466 468 +2
Lines 19719 19881 +162
==========================================
+ Hits 16146 16301 +155
- Misses 3573 3580 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
roxblnfk
force-pushed
the
feat/blackfire-probe
branch
from
November 24, 2026 20:42
023d10b to
ad64e70
Compare
…of Trap, in place of its agent feat(profiler): skip `trap()::profile()` while the Blackfire probe profiles the request The protocol is described from the traffic between the probe and its agent only. The probe checks the query signature with keys the agent hands it, so with Trap in place of the agent any query with a future `expires` and a `signature` after it works, and no Blackfire account is needed. Two instrumenting profilers count each other's overhead, hence the skip, detected by `BlackfireProbe::isEnabled()`. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
roxblnfk
force-pushed
the
feat/blackfire-probe
branch
from
November 25, 2026 04:43
ad64e70 to
6767da2
Compare
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 What was changed
ext-blackfire) on any of its ports, in place of the agent the probe sends them to: no Blackfire account, agent or upload. Pointblackfire.agent_socketat Trap, e.g.tcp://127.0.0.1:9912.name(fromprofile_title) andrequestorcommand. The format isBlackfirein the UI and the MCP tools.trap()::profile()skips its own profile, and logs the skip totrap.profiler, while the probe profiles the request: two instrumenting profilers count each other's overhead.How it works
Blackfire-Query: …and header lines; Trap answersBlackfire-Response: continue=true, the probe sends the profile and closes the connection.expiresis in the future andsignatureis not its first parameter:expires=4102444800&signature=trap.file-format: BlackfireApm); Trap closes it unanswered and the probe stops asking for 300 s.blackfire.apm_enabled=0turns these connections off.Review notes
BlackfireProbe::isEnabled()is true only while a query is served, false with the probe merely loaded.Checklist
/api/events; the skip oftrap()::profile()andblackfire.apm_enabled=0checked on the probeProtobufCasterTesttests of the protobuf caster, untouched hereDocumentation
docs/blackfire.md, plusdocs/profiles.md,docs/profiling.md,docs/mcp.mdand the README; thetrapskill's profiling reference anddetect.php.