alexbevi opened a new pull request, #39504:
URL: https://github.com/apache/beam/pull/39504

   Passes `MongoDriverInformation` to `MongoClients.create()` in 
`MongoDBResourceManager` so that MongoDB server-side telemetry can identify 
traffic originating from Apache Beam.
   
   ## What changes
   
   **`it/mongodb/src/main/java/.../MongoDBResourceManager.java`**
   
   - Adds a package-visible `DRIVER_INFO` constant (`@VisibleForTesting`) built 
with `MongoDriverInformation.builder().driverName("Apache Beam").build()`.
   - Passes it as the second argument to `MongoClients.create(connectionString, 
DRIVER_INFO)` when no external `MongoClient` is provided. When a client is 
injected via the `@VisibleForTesting` constructor (e.g. in unit tests), the 
external client is used unchanged.
   
   This will appear in mongos/d logs similar to:
   >`
   
{"t":{"$date":"..."},"s":"I","c":"NETWORK","id":51800,"ctx":"conn1","msg":"client
 metadata","attr":{"doc":{"driver":{"name":"mongo-java-driver|Apache 
Beam","version":"5.5.0"},"os":{"type":"Linux"},"platform":"Java/..."}}}`
   
   See the [MongoDB handshake 
specification](https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.md)
 for more info.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to