MONGOC_APM_SE...LOSED_GET_HOST(3)

πŸ¦‹ so like, mongoc_apm_server_closed_get_host πŸ¦‹

okay bestie, real talk β€” this is a page from the libmongoc manual (you know, the MongoDB C driver, our beloved) and it's about one tiny little function called mongoc_apm_server_closed_get_host. it does exactly one thing and it does it slayfully. no cap. let's get into it ✨


🌸 SYNOPSIS 🌸

const mongoc_host_list_t *
mongoc_apm_server_closed_get_host (const mongoc_apm_server_closed_t *event);

so what it does: it returns this event's host πŸ’… that's it, that's the whole vibe.

the mongoc_host_list_t you get back is not part of a linked list β€” it is solely the server for this event, like main character energy but make it a single node. πŸŽ€

⚠️ ok this part matters, don't skip it: the data is only valid in the scope of the callback that receives this event. copy it if it will be accessed after the callback returns. literally. copy it. if you don't and you use it later, that's on you and it's giving undefined behaviour 😭

🫢 PARAMETERS 🫢

  • event β€” A mongoc_apm_server_closed_t. that's the whole param. one (1) event. she's low maintenance πŸ’–

⭐ RETURNS ⭐

A mongoc_host_list_t that should not be modified or freed. 🚫

like, look respectfully, don't touch. it's not yours to keep, bestie β€” no free(), no edits, just vibes and reading. πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

  • Introduction to Application Performance Monitoring

(go read it, iykyk 🌈)


🧚 AUTHOR 🧚

MongoDB, Inc β€” iconic, honestly πŸ’œ

2009-present, MongoDB, Inc.


and that's the whole page, diva πŸ’… go forth and get those hosts ✨

β€” signed, sealed, delivered: libmongoc, version 2.5.6, dated Oct 09, 2026 πŸŽ€

πŸ“¦ where this page comes from