[JAVA-4238] Add server connectionId to command monitoring events Created: 15/Jul/21  Updated: 28/Oct/23  Resolved: 03/Dec/21

Status: Closed
Project: Java Driver
Component/s: Monitoring
Affects Version/s: None
Fix Version/s: 4.5.0

Type: Improvement Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: spec-compliance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
Quarter: FY22Q3
Upstream Changes Summary:

DRIVERS-1141:
NA

Documentation Changes: Not Needed

 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 [ 03/Dec/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Add command monitoring unified tests for serverConnectionId (#833)

The driver already supports the feature, so this is just test changes.
It includes support for version 1.6 of the unified test format.

JAVA-4238
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/39525361ca3e23f34832c64debc1e9e5dec3c6ef

Generated at Thu Feb 08 09:01:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.