MONGOC_APM_CO...EEDED_GET_HOST(3)

πŸ¦‹ so you wanna know the host of a succeeded command?? MONGOC_APM_CO...EEDED_GET_HOST(3) πŸ’…

okay bestie, real talk β€” this page lives in libmongoc, and its whole name is MONGOC_APM_CO...EEDED_GET_HOST(3) (yes the title is literally truncated like that, iconic of it tbh, don't come for me). It's the lil accessor for mongoc_apm_command_succeeded_get_host, and it's giving short but mighty. Let's go ✨


🌸 SYNOPSIS 🌸

const mongoc_host_list_t *
mongoc_apm_command_succeeded_get_host (
   const mongoc_host_list_t *event);

wait, hold up β€” copy that block exactly as the page gives it, no edits, no "improvements", periodt πŸ™ˆ


πŸ’– DESCRIPTION πŸ’–

So what does it do? It returns this event's host. That's it, that's the whole vibe 🫢

But listen, because this part is not a drill:

  • This mongoc_host_list_t is not part of a linked list β€” it is solely the server for this event. no next pointer shenanigans, no walking a chain, just the one host, main character energy.
  • The data is only valid in the scope of the callback that receives this event. So if you're gonna touch it after the callback returns, you must copy it. no cap. storing that pointer and hoping is how you get a vibe check you will fail 😭
girlypop this is a lifetime thing β€” the pointer does NOT outlive the callback. copy it or perish (metaphorically, but also your data is garbage).

πŸŽ€ PARAMETERS πŸŽ€

  • event: A mongoc_apm_command_succeeded_t. that's the whole list. one (1) parameter. we love a low-maintenance queen πŸ‘‘

⭐ RETURNS ⭐

A mongoc_host_list_t that should not be modified or freed. like, hands off bestie πŸ’… you don't own it, you didn't malloc it, you don't get to touch it. read it, admire it, let it go.

🌈 SEE ALSO

  • Introduction to Application Performance Monitoring

(it's literally linked in the original as plain text, so go find that doc, iykyk πŸ”₯)


🧚 AUTHOR 🧚

MongoDB, Inc β€” the whole house down, honestly πŸ‘‘


2009-present, MongoDB, Inc.


and that's the whole page, bestie, no notes, ate and left no crumbs πŸŽ€βœ¨

cute lil sign-off: this absolute gem comes from libmongoc version 2.5.6, dated Oct 09, 2026 β€” screenshot it, frame it, put it on the fridge πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from