MONGOC_APM_CO...GET_SERVICE_ID(3)

✨ SYNOPSIS ✨

okay bestie, this one lives in libmongoc (that's the C driver for MongoDB, mwah πŸ’…) and here's the whole vibe:

const bson_oid_t *
mongoc_apm_command_started_get_service_id (
   const mongoc_apm_command_started_t *event);

so like, this function hands you back the service ID of this event πŸ”₯ β€” and that ID is the thing that identifies the MongoDB service behind a load balancer. basically it's the little name tag the service wears so you know which one you're talking to πŸŽ€

and if you're not connected to a load balanced cluster? it just gives you NULL. no drama, no cap. ✨


🌸 PARAMETERS 🌸

  • event β€” a mongoc_apm_command_started_t. that's it, that's the whole parameter list, she's low maintenance 🫢

πŸ¦‹ RETURNS πŸ¦‹

you get back a bson_oid_t. and listen to me carefully bestie, because this is the important bit: do not modify it and do not free it πŸ™ˆ it's not yours to touch. alternatively you get NULL. that's the whole returns situation πŸ’œ

like literally do not free it. do not. i'm serious. iykyk 😭

πŸ’– AUTHOR πŸ’–

MongoDB, Inc β€” the iconique creatives behind all this πŸ‘‘


2009-present, MongoDB, Inc. β€” yeah, they've been at it a minute, main character energy fr fr 🌈


and that's the tea, bestie πŸ“ this page came to you courtesy of libmongoc version 2.5.6, dated Oct 09, 2026 β€” go forth and read service IDs responsibly, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from