MONGOC_APM_CO...CTION_ID_INT64(3)

✨ MONGOC_APM_CO...CTION_ID_INT64 ✨

okay bestie, so this one lives in libmongoc (the C driver for MongoDB, iykyk) and it's a little getter that hands you a server connection ID as an int64_t. it's giving "small function, big main character energy" πŸ’…


🌸 SYNOPSIS 🌸

int64_t
mongoc_apm_command_succeeded_get_server_connection_id_int64 (
  const mongoc_apm_command_succeeded_t *event);

so here's the tea πŸ«– β€” this call returns the server connection ID for the command. and no, don't get it twisted: the server connection ID is distinct from the server ID (mongoc_apm_command_succeeded_get_server_id()), they're different things fr fr. the connection ID comes back from the server in the hello or legacy hello response as "connectionId", and it's a thing on servers 4.2+. slay. πŸ’–


πŸŽ€ PARAMETERS πŸŽ€

  • event β€” a mongoc_apm_command_succeeded_t. that's the vibe you're passing in, bestie.

πŸ¦‹ RETURNS πŸ¦‹

the server connection ID as a positive integer πŸ’― β€” or -1 if it's just not available. no cap, that's the whole deal.

πŸ‘€ SEE ALSO:

  • Introduction to Application Performance Monitoring

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” iconic behavior honestly 🌈


2009-present, MongoDB, Inc. β€” they've been at this a minute, and we respect it.


and that's a wrap, bestie ✨ this page was brought to you by libmongoc version 2.5.6, dated Oct 09, 2026 β€” go forth and fetch those connection IDs, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from