MONGOC_APM_SE...AILED_GET_HOST(3)

🌸 MONGOC_APM_SE...AILED_GET_HOST 🌸

okay bestie, this is a page from libmongoc (the MongoDB C driver manual, mwah) and it's about exactly one tiny little function that's way more niche than it sounds. buckle up πŸŽ€


✨ SYNOPSIS ✨

const mongoc_host_list_t *
mongoc_apm_server_heartbeat_failed_get_host (
   const mongoc_apm_server_heartbeat_failed_t *event);

πŸ’… DESCRIPTION πŸ’…

okay so this function literally just hands you the host for this event. that's it. that's the whole job. πŸ‘‘

the mongoc_host_list_t you get back is not part of a linked list β€” it is solely the server for this event, no squad, no neighbors, just vibes and one host. πŸ¦‹

⚠️ and here's the part where you need to listen, bestie: the data is only valid in the scope of the callback that receives this event. if you're gonna touch it after the callback returns, you gotta copy it first. no cap. otherwise you're out here reading freed memory and that's not the main character energy we want. πŸ˜­πŸ’€

🫢 PARAMETERS 🫢

  • event: a mongoc_apm_server_heartbeat_failed_t. that's the whole parameter list. one (1) thing. iconic.

⭐ RETURNS ⭐

a mongoc_host_list_t that you should not modify or free. it's not yours, you're just borrowing it, respectfully. πŸ™ˆ

SEE ALSO:

Introduction to Application Performance Monitoring


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


okay that's the whole page, you ate that πŸ’– stay hydrated, copy your host lists, and remember: callback scope only, bestie 🧚

version 2.5.6, dated Oct 09, 2026, brought to you by libmongoc β€” see you in the next manpage, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from