---
name: "mongoc_apm_set_server_opening_cb"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_apm_set_server_opening_cb"
---

# mongoc\_apm\_set\_server\_opening\_cb(3)

## SYNOPSIS

```
typedef void (*mongoc_apm_server_opening_cb_t) (
   const mongoc_apm_server_opening_t *event);
void
mongoc_apm_set_server_opening_cb (mongoc_apm_callbacks_t *callbacks,
                                  mongoc_apm_server_opening_cb_t cb);
```

Receive an event notification whenever the driver adds a *mongoc\_server\_description\_t* for a new server it was not monitoring before.

## PARAMETERS

- •

  **callbacks**: A *mongoc\_apm\_callbacks\_t*.

- •

  **cb**: A function to call with a *mongoc\_apm\_server\_opening\_t* whenever the driver adds a *mongoc\_server\_description\_t* for a new server it was not monitoring before.

**SEE ALSO:**

```
Introduction to Application Performance Monitoring
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
