---
name: "mongoc_apm_command_succeeded_get_server_connection_id_int64"
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_command_succeeded_get_server_connection_id_int64"
---

# mongoc\_apm\_command\_succeeded\_get\_server\_connection\_id\_int64(3)

## SYNOPSIS

```
int64_t
mongoc_apm_command_succeeded_get_server_connection_id_int64 (
  const mongoc_apm_command_succeeded_t *event);
```

Returns the server connection ID for the command. The server connection ID is distinct from the server ID (*mongoc\_apm\_command\_succeeded\_get\_server\_id()*) and is returned by the hello or legacy hello response as "connectionId" from the server on 4.2+.

## PARAMETERS

- •

  **event**: A *mongoc\_apm\_command\_succeeded\_t*.

## RETURNS

The server connection ID as a positive integer or -1 if it is not available.

**SEE ALSO:**

```
Introduction to Application Performance Monitoring
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
