Skip to content

Commit

Permalink
rest of apm methods
Browse files Browse the repository at this point in the history
  • Loading branch information
norareidy committed Mar 25, 2024
1 parent 81317be commit 720bdd4
Show file tree
Hide file tree
Showing 32 changed files with 295 additions and 244 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_server_opening_get_context
.. _mongoc_apm_server_opening_get_context:

=======================================
mongoc_apm_server_opening_get_context()
=======================================

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_server_opening_get_host
.. _mongoc_apm_server_opening_get_host:

====================================
mongoc_apm_server_opening_get_host()
====================================

Expand All @@ -8,10 +9,12 @@ Synopsis

.. code-block:: c

const mongoc_host_list_t *
mongoc_apm_server_opening_get_host (const mongoc_apm_server_opening_t *event);
const mongoc_host_list_t *
mongoc_apm_server_opening_get_host (const mongoc_apm_server_opening_t *event);

Returns this event's host. This :ref:`mongoc_host_list_t` is *not- part of a linked list, it is solely the server for this event. The data is only valid in the scope of the callback that receives this event; copy it if it will be accessed after the callback returns.
Returns this event's host. This :ref:`mongoc_host_list_t` is *not* part of a linked list,
it is solely the server for this event. The data is only valid in the scope of the callback
that receives this event; copy it if it will be accessed after the callback returns.

Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_server_opening_get_topology_id
.. _mongoc_apm_server_opening_get_topology_id:

===========================================
mongoc_apm_server_opening_get_topology_id()
===========================================

Expand All @@ -8,9 +9,9 @@ Synopsis

.. code-block:: c

void
mongoc_apm_server_opening_get_topology_id (
const mongoc_apm_server_opening_t *event, bson_oid_t *topology_id);
void
mongoc_apm_server_opening_get_topology_id (
const mongoc_apm_server_opening_t *event, bson_oid_t *topology_id);

Returns this event's topology id.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_server_opening_t
.. _mongoc_apm_server_opening_t:

===========================
mongoc_apm_server_opening_t
===========================

Expand All @@ -8,7 +9,8 @@ Server-opening event
Synopsis
--------

An event notification sent when the driver adds a :ref:`mongoc_server_description_t` for a new server it was not monitoring before.
An event notification sent when the driver adds a :ref:`mongoc_server_description_t` for a new
server it was not monitoring before.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_set_command_failed_cb
.. _mongoc_apm_set_command_failed_cb:

==================================
mongoc_apm_set_command_failed_cb()
==================================

Expand All @@ -8,20 +9,21 @@ Synopsis

.. code-block:: c

typedef void (*mongoc_apm_command_failed_cb_t) (
const mongoc_apm_command_failed_t *event);
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);
void
mongoc_apm_set_command_failed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_command_failed_cb_t cb);

Receive an event notification whenever the driver fails to execute a MongoDB operation.

Parameters
----------

- ``callbacks``: A :ref:`mongoc_apm_callbacks_t`.
- ``cb``: A function to call with a :ref:`mongoc_apm_command_failed_t` whenever a MongoDB operation fails.
- ``cb``: A function to call with a :ref:`mongoc_apm_command_failed_t` whenever a MongoDB
operation fails.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_set_command_started_cb
.. _mongoc_apm_set_command_started_cb:

===================================
mongoc_apm_set_command_started_cb()
===================================

Expand All @@ -8,20 +9,21 @@ Synopsis

.. code-block:: c

typedef void (*mongoc_apm_command_started_cb_t) (
const mongoc_apm_command_started_t *event);
typedef void (*mongoc_apm_command_started_cb_t) (
const mongoc_apm_command_started_t *event);

void
mongoc_apm_set_command_started_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_command_started_cb_t cb);
void
mongoc_apm_set_command_started_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_command_started_cb_t cb);

Receive an event notification whenever the driver starts a MongoDB operation.

Parameters
----------

- ``callbacks``: A :ref:`mongoc_apm_callbacks_t`.
- ``cb``: A function to call with a :ref:`mongoc_apm_command_started_t` whenever the driver begins a MongoDB operation.
- ``cb``: A function to call with a :ref:`mongoc_apm_command_started_t` whenever the driver
begins a MongoDB operation.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_set_command_succeeded_cb
.. _mongoc_apm_set_command_succeeded_cb:

=====================================
mongoc_apm_set_command_succeeded_cb()
=====================================

Expand All @@ -8,11 +9,11 @@ Synopsis

.. code-block:: c

typedef void (*mongoc_apm_command_succeeded_cb_t) (
const mongoc_apm_command_succeeded_t *event);
typedef void (*mongoc_apm_command_succeeded_cb_t) (
const mongoc_apm_command_succeeded_t *event);

void
mongoc_apm_set_command_succeeded_cb (mongoc_apm_callbacks_t *callbacks,
void
mongoc_apm_set_command_succeeded_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_command_succeeded_cb_t cb);

Receive an event notification whenever the driver completes a MongoDB operation.
Expand All @@ -21,7 +22,8 @@ Parameters
----------

- ``callbacks``: A :ref:`mongoc_apm_callbacks_t`.
- ``cb``: A function to call with a :ref:`mongoc_apm_command_succeeded_t` whenever the driver completes a MongoDB operation.
- ``cb``: A function to call with a :ref:`mongoc_apm_command_succeeded_t` whenever the driver
completes a MongoDB operation.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_set_server_changed_cb
.. _mongoc_apm_set_server_changed_cb:

==================================
mongoc_apm_set_server_changed_cb()
==================================

Expand All @@ -8,14 +9,15 @@ Synopsis

.. code-block:: c

typedef void (*mongoc_apm_server_changed_cb_t) (
const mongoc_apm_server_changed_t *event);
typedef void (*mongoc_apm_server_changed_cb_t) (
const mongoc_apm_server_changed_t *event);

void
mongoc_apm_set_server_changed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_changed_cb_t cb);
void
mongoc_apm_set_server_changed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_changed_cb_t cb);

Receive an event notification whenever the driver observes a change in status of a server it is connected to.
Receive an event notification whenever the driver observes a change in status of a server
it is connected to.

Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_set_server_closed_cb
.. _mongoc_apm_set_server_closed_cb:

=================================
mongoc_apm_set_server_closed_cb()
=================================

Expand All @@ -8,20 +9,22 @@ Synopsis

.. code-block:: c

typedef void (*mongoc_apm_server_closed_cb_t) (
const mongoc_apm_server_closed_t *event);
typedef void (*mongoc_apm_server_closed_cb_t) (
const mongoc_apm_server_closed_t *event);

void
mongoc_apm_set_server_closed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_closed_cb_t cb);
void
mongoc_apm_set_server_closed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_closed_cb_t cb);

Receive an event notification whenever the driver stops monitoring a server and removes its :ref:`mongoc_server_description_t`.
Receive an event notification whenever the driver stops monitoring a server and removes
its :ref:`mongoc_server_description_t`.

Parameters
----------

- ``callbacks``: A :ref:`mongoc_apm_callbacks_t`.
- ``cb``: A function to call with a :ref:`mongoc_apm_server_closed_t` whenever the driver stops monitoring a server and removes its :ref:`mongoc_server_description_t`.
- ``cb``: A function to call with a :ref:`mongoc_apm_server_closed_t` whenever the driver
stops monitoring a server and removes its :ref:`mongoc_server_description_t`.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_apm_set_server_heartbeat_failed_cb
.. _mongoc_apm_set_server_heartbeat_failed_cb:

===========================================
mongoc_apm_set_server_heartbeat_failed_cb()
===========================================

Expand All @@ -8,12 +9,12 @@ Synopsis

.. code-block:: c

typedef void (*mongoc_apm_server_heartbeat_failed_cb_t) (
typedef void (*mongoc_apm_server_heartbeat_failed_cb_t) (
const mongoc_apm_server_heartbeat_failed_t *event);

void
mongoc_apm_set_server_heartbeat_failed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_heartbeat_failed_cb_t cb);
void
mongoc_apm_set_server_heartbeat_failed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_heartbeat_failed_cb_t cb);

Receive an event notification whenever the driver fails to send a "hello" command to check the status of a server.

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.. _mongoc_apm_set_server_heartbeat_started_cb:

============================================
mongoc_apm_set_server_heartbeat_started_cb()
============================================

Synopsis
--------

.. code-block:: c

typedef void (*mongoc_apm_server_heartbeat_started_cb_t) (
const mongoc_apm_server_heartbeat_started_t *event);

void
mongoc_apm_set_server_heartbeat_started_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_heartbeat_started_cb_t cb);

Receive an event notification whenever the driver begins executing a "hello" command to check
the status of a server.

Parameters
----------

- ``callbacks``: A :ref:`mongoc_apm_callbacks_t`.
- ``cb``: A function to call with a :ref:`mongoc_apm_server_heartbeat_started_t` whenever the
driver begins executing a "hello" command to check the status of a server.

.. seealso::

| :ref:`Introduction to Application Performance Monitoring <mongoc_application_performance_monitoring>`

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.. _mongoc_apm_set_server_heartbeat_succeeded_cb:

==============================================
mongoc_apm_set_server_heartbeat_succeeded_cb()
==============================================

Synopsis
--------

.. code-block:: c

typedef void (*mongoc_apm_server_heartbeat_succeeded_cb_t) (
const mongoc_apm_server_heartbeat_succeeded_t *event);

void
mongoc_apm_set_server_heartbeat_succeeded_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_heartbeat_succeeded_cb_t cb);

Receive an event notification whenever the driver completes a "hello" command to check the
status of a server.

Parameters
----------

- ``callbacks``: A :ref:`mongoc_apm_callbacks_t`.
- ``cb``: A function to call with a :ref:`mongoc_apm_server_heartbeat_succeeded_t` whenever the
- driver completes a "hello" command to check the status of a server.

.. seealso::

| :ref:`Introduction to Application Performance Monitoring <mongoc_application_performance_monitoring>`

Loading

0 comments on commit 720bdd4

Please sign in to comment.