MONGOC_CLIENT_..._APM_CALLBACKS(3)

πŸ’… MONGOC_CLIENT_..._APM_CALLBACKS(3) πŸ’…

welcome to the libmongoc manual, bestie 🫢 β€” this page is all about mongoc_client_pool_set_apm_callbacks, and if you’re into APM events it’s kind of a big deal ✨

✨ SYNOPSIS ✨

bool
mongoc_client_pool_set_apm_callbacks (mongoc_client_pool_t *pool,
                                      mongoc_apm_callbacks_t *callbacks,
                                      void *context);

okay so this function registers a set of callbacks so you can receive Application Performance Monitoring events. the callbacks are copied by the pool, so the caller can safely destroy them after this API call completes. if a context is passed, it’s the application’s responsibility to ensure that context remains valid for the lifetime of the pool. πŸ’–

πŸŽ€ PARAMETERS πŸŽ€

  • pool β€” A mongoc_client_pool_t.
  • callbacks β€” A mongoc_apm_callbacks_t.
  • context β€” Optional pointer to include with each event notification.

πŸ’– RETURNS πŸ’–

Returns true on success, slay. If any arguments are invalid, it returns false and logs an error. 😭

🧡 THREAD SAFETY 🧡

bestie, this is a one-shot situation: this function can only be called once on a pool, and it must be called before the first call to mongoc_client_pool_pop(). no cap, do not skip that.

πŸ‘€ SEE ALSO πŸ‘€

  • Introduction to Application Performance Monitoring

🫢 AUTHOR 🫢

MongoDB, Inc

2009-present, MongoDB, Inc.


okay bye bestie πŸ‘‹ this page is from libmongoc version 2.5.6, dated Oct 09, 202 in the footer (yes the year is giving clipped, the terminal ate it 😭), and that’s the whole vibe. πŸ’…

πŸ“¦ where this page comes from