Skip to content

Commit 0c45daf

Browse files
authored
CDRIVER-4085 fix docs for server_connection_id getters (#976)
1 parent d9fa2a3 commit 0c45daf

3 files changed

+19
-8
lines changed

src/libmongoc/doc/mongoc_apm_command_failed_get_server_connection_id.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ Synopsis
88

99
.. code-block:: c
1010
11-
void *
11+
int32_t
1212
mongoc_apm_command_failed_get_server_connection_id (
1313
const mongoc_apm_command_failed_t *event);
1414
1515
Returns this event's context.
1616

17+
Returns the server connection ID for the command. The server connection ID is
18+
distinct from the server ID (:symbol:`mongoc_apm_command_failed_get_server_id`)
19+
and is returned by the hello or legacy hello response as "connectionId" from the
20+
server on 4.2+.
21+
1722
Parameters
1823
----------
1924

@@ -22,7 +27,7 @@ Parameters
2227
Returns
2328
-------
2429

25-
The pointer passed with :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.
30+
The server connection ID as a positive integer or -1 if it is not available.
2631

2732
.. seealso::
2833

src/libmongoc/doc/mongoc_apm_command_started_get_server_connection_id.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ Synopsis
88

99
.. code-block:: c
1010
11-
void *
11+
int32_t
1212
mongoc_apm_command_started_get_server_connection_id (
1313
const mongoc_apm_command_started_t *event);
1414
15-
Returns this event's context.
15+
Returns the server connection ID for the command. The server connection ID is
16+
distinct from the server ID (:symbol:`mongoc_apm_command_started_get_server_id`)
17+
and is returned by the hello or legacy hello response as "connectionId" from the
18+
server on 4.2+.
1619

1720
Parameters
1821
----------
@@ -22,7 +25,7 @@ Parameters
2225
Returns
2326
-------
2427

25-
The pointer passed with :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.
28+
The server connection ID as a positive integer or -1 if it is not available.
2629

2730
.. seealso::
2831

src/libmongoc/doc/mongoc_apm_command_succeeded_get_server_connection_id.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ Synopsis
88

99
.. code-block:: c
1010
11-
void *
11+
int32_t
1212
mongoc_apm_command_succeeded_get_server_connection_id (
1313
const mongoc_apm_command_succeeded_t *event);
1414
15-
Returns this event's context.
15+
Returns the server connection ID for the command. The server connection ID is
16+
distinct from the server ID
17+
(:symbol:`mongoc_apm_command_succeeded_get_server_id`) and is returned by the
18+
hello or legacy hello response as "connectionId" from the server on 4.2+.
1619

1720
Parameters
1821
----------
@@ -22,7 +25,7 @@ Parameters
2225
Returns
2326
-------
2427

25-
The pointer passed with :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.
28+
The server connection ID as a positive integer or -1 if it is not available.
2629

2730
.. seealso::
2831

0 commit comments

Comments
 (0)