Skip to content

feat(agent): update instrumentation to be compatible with MongoDB 2.x#1154

Merged
hahuja2 merged 3 commits into
devfrom
add-mongodb-2.x-support
Feb 3, 2026
Merged

feat(agent): update instrumentation to be compatible with MongoDB 2.x#1154
hahuja2 merged 3 commits into
devfrom
add-mongodb-2.x-support

Conversation

@hahuja2

@hahuja2 hahuja2 commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

This PR removes redundant Executable interface check which caused instrumentation to break for MongoDB 2.x because the Executable interface has been removed. This check is not needed because for all operations we implement, they will only be instrumented if execute method is called, so this makes current check for Executable interface redundant as this interface only defined execute method.

closes #1147

@newrelic-php-agent-bot

newrelic-php-agent-bot commented Jan 9, 2026

Copy link
Copy Markdown
Test Suite Status Result
Multiverse 18/18 passing
SOAK 141/142 passing

@hahuja2 hahuja2 force-pushed the add-mongodb-2.x-support branch from 6f1a964 to 59dc8f5 Compare January 9, 2026 21:39
@codecov-commenter

codecov-commenter commented Jan 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.35%. Comparing base (010ff93) to head (7f2f608).

Files with missing lines Patch % Lines
agent/lib_mongodb.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1154      +/-   ##
==========================================
+ Coverage   78.33%   78.35%   +0.02%     
==========================================
  Files         193      193              
  Lines       28238    28229       -9     
==========================================
  Hits        22120    22120              
+ Misses       6118     6109       -9     
Flag Coverage Δ
agent-for-php-7.2 78.34% <ø> (ø)
agent-for-php-7.3 78.36% <ø> (ø)
agent-for-php-7.4 78.22% <ø> (ø)
agent-for-php-8.0 77.74% <0.00%> (+0.02%) ⬆️
agent-for-php-8.1 77.97% <0.00%> (+0.02%) ⬆️
agent-for-php-8.2 77.59% <0.00%> (+0.02%) ⬆️
agent-for-php-8.3 77.59% <0.00%> (+0.02%) ⬆️
agent-for-php-8.4 77.60% <0.00%> (?)
agent-for-php-8.5 76.93% <0.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hahuja2 hahuja2 force-pushed the add-mongodb-2.x-support branch from 59dc8f5 to f59774c Compare January 15, 2026 19:33
@hahuja2 hahuja2 marked this pull request as ready for review January 15, 2026 20:01
@hahuja2 hahuja2 requested a review from lavarou January 15, 2026 21:19
Comment thread agent/lib_mongodb.c Outdated
Comment thread agent/lib_mongodb.c Outdated
@lavarou lavarou modified the milestones: next-release, 12.4.0 Jan 26, 2026
@hahuja2 hahuja2 requested a review from zsistla January 26, 2026 19:22
@hahuja2 hahuja2 force-pushed the add-mongodb-2.x-support branch from d10c46f to 7f2f608 Compare January 29, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lost APM instrumentation of mongodb with mongo driver 2.x (works with 1.21.x)

5 participants