[CDRIVER-4085] Add server connectionId to command monitoring events Created: 15/Jul/21  Updated: 28/Oct/23  Resolved: 28/Apr/22

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.22.0, 1.22.0-beta0

Type: Improvement Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Roberto Sanchez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPC-1899 getServerConnectionId for command mon... Closed
is depended on by PHPLIB-718 Sync APM spec tests for serverConnect... Closed
Issue split
Related
related to CDRIVER-4502 libmongoc expects connectionId in hel... Closed
related to CDRIVER-4176 Make MONGOC_RTT_UNSET and MONGOC_NO_S... Backlog
Quarter: FY22Q3
Upstream Changes Summary:

DRIVERS-1141:
NA


 Description   

In scope of SERVER-10637, MongoDB 4.2 will return a connectionId in the hello response. This is a number that can be correlated against server log messages, e.g. for this server message:

2018-06-05T13:50:11.978-0400 I NETWORK  [conn2] received client metadata from 127.0.0.1:50254 conn2: { driver: { name: "PyMongo", version: "3.5.1" }, os: { type: "Darwin", name: "Darwin", architecture: "x86_64", version: "10.13.5" }, platform: "CPython 2.7.10.final.0" }

The connectionid reported in the hello response will be 2.

Drivers should sync their command monitoring tests with this commit, update their APM logic to append a new serverConnectionId field to commandStartedEvent, commandSucceededEvent and commandFailedEvent when it is available, and update their test runners to handle UTF schema version 1.6 (featuring the new hasServerConnectionId assertion).

 



 Comments   
Comment by Githook User [ 28/Apr/22 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-4085 fix docs for server_connection_id getters (#976)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0c45daf35b0e3892e68349a42e769ce7ddfbf9c6

Comment by Jeremy Mikola [ 27/Apr/22 ]

https://github.com/mongodb/mongo-c-driver/pull/976

Comment by Githook User [ 26/Apr/22 ]

Author:

{'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}

Message: CDRIVER-4085 add server connectionId to command monitoring events (#972)

  • CDRIVER-4085 add server connectionId to command monitoring events
  • more concise/robust variable declaration/assignment

Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>

Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ba73833f18191b34acc990bdca91bb9e68c90dfb

Comment by Jeremy Mikola [ 31/Mar/22 ]

kevin.albertson: I propose we schedule this sooner than later, as it is tied to unified test runner schema version 1.6, which may be a prerequisite for the change stream spec work relying upon version 1.7 (DRIVERS-1713). I will revert this to "Needs Triage" for consideration.

Generated at Wed Feb 07 21:19:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.