MONGOC_APM_SET...MAND_FAILED_CB(3)

🫢 MONGOC_APM_SET_COMMAND_FAILED_CB(3) πŸ’…

okay so bestie, this one lives in the libmongoc manual, section 3, and it's all about getting pinged when a MongoDB operation goes sideways 😭 no cap. Let's get into it.


✨ SYNOPSIS ✨

typedef void (*mongoc_apm_command_failed_cb_t) (
   const mongoc_apm_command_failed_t *event);

void
mongoc_apm_set_command_failed_cb (mongoc_apm_callbacks_t *callbacks,
                                  mongoc_apm_command_failed_cb_t cb);

πŸ’¬ DESCRIPTION πŸ’¬

So basically πŸ’– β€” this sets you up to receive an event notification whenever the driver fails to execute a MongoDB operation. Like, the operation flopped, the driver knows it flopped, and now it's gonna tell you about it. It's giving "I've got you, bestie" energy fr fr πŸ’€βœ¨


πŸŽ€ PARAMETERS πŸŽ€

  • callbacks β€” a mongoc_apm_callbacks_t. That's the callback bag you're dropping your function into 🫢
  • cb β€” the function to call with a mongoc_apm_command_failed_t whenever a MongoDB operation fails. That's the lil notification payload you get handed πŸ’…

🌈 SEE ALSO 🌈

  • Introduction to Application Performance Monitoring β€” go read it, iykyk πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” icons only, periodt πŸ’œ


2009-present, MongoDB, Inc. β€” yeah, they've been at this a minute ⭐


okay that's the whole page!! mwah πŸŽ€ this one came from libmongoc version 2.5.6, dated Oct 09 (the year got absolutely sniped off the end in the source footer, so we're just gonna pretend we didn't see it πŸ™ˆπŸ’€). go forth and catch those failures bestie πŸ¦‹πŸ’–

πŸ“¦ where this page comes from