MONGOC_APM_CO..._CONNECTION_ID(3)

πŸ’… MONGOC_APM_CO..._CONNECTION_ID(3) β€” libmongoc

okay bestie, welcome to the girlies' guide to mongoc_apm_command_started_get_server_connection_id(), brought to you by libmongoc. it's giving ✨niche✨ but you're gonna eat this up, i promise. 🫢


⚠️ WARNING ⚠️

Deprecated since version 1.24.0: Use mongoc_apm_command_started_get_server_connection_id_int64() instead.

fr fr, this one is old news. she served her time, but the glow-up version is the _int64 one. use that instead, no cap. πŸ’€


✨ SYNOPSIS ✨

int32_t
mongoc_apm_command_started_get_server_connection_id (
  const mongoc_apm_command_started_t *event);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this function hands you the server connection ID for the command. πŸŽ€

and no, bestie, don't get it twisted β€” the server connection ID is NOT the same thing as the server ID (that's mongoc_apm_command_started_get_server_id(), a whole different queen πŸ‘‘). the server connection ID is what the server spits back in the hello or legacy hello response as "connectionId", and that's a server on 4.2+ thing. periodt. πŸ’…


🌸 PARAMETERS 🌸

  • event: A mongoc_apm_command_started_t.

⭐ RETURNS ⭐

the server connection ID, as a positive integer β€” or -1 if it's just not available. 😭 (we've all been there.)

SEE ALSO: Introduction to Application Performance Monitoring

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


okay that's the whole vibe, bestie β€” go forth and monitor those connections. πŸŒˆπŸ’– slay responsibly.

signing off from libmongoc 1.30.13, dated Oct 09, 2026 β€” mwah, love u, bye! πŸ’‹

πŸ“¦ where this page comes from