MONGOC_APM_COM..._CONNECTION_ID(3)
π MONGOC_APM_COM..._CONNECTION_ID π
okay bestie, welcome to the libmongoc corner of the manual, where we read about a lil function called mongoc_apm_command_failed_get_server_connection_id(). it's giving "old faithful but make it deprecated". let's get into it π«Ά
β οΈ WARNING, and I mean it: deprecated since version1.24.0. do not start anything new with this. usemongoc_apm_command_failed_get_server_connection_id_int64()instead. that's the glow-up, periodt. π
β¨ SYNOPSIS β¨
int32_t
mongoc_apm_command_failed_get_server_connection_id (
const mongoc_apm_command_failed_t *event);
πΈ DESCRIPTION πΈ
so this one hands you back the event's context. that's the vibe.
more specifically, it returns the server connection ID for the command. and no, bestie, don't get it twisted β the server connection ID is a whole different thing from the server ID (that one lives over at mongoc_apm_command_failed_get_server_id(), different function, different energy). the server connection ID is what the server sends back in the hello or legacy hello response as "connectionId", and only from a server on 4.2+. so if you're on something ancient, this info just isn't there. π
π PARAMETERS π
- event: a
mongoc_apm_command_failed_t. that's it, that's the whole list.
β RETURNS β
the server connection ID as a positive integer π β or -1 if it's simply not available. no cap, that's the whole return story.
SEE ALSO: Introduction to Application Performance Monitoring
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's a wrap, my love π this page was living in version 1.30.13, dated Oct 09, and it ate. now go use the int64 version, i'm literally begging. π¦β¨
π¦ where this page comes from
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms