19 #include <mongocxx/events/command_failed_event.hpp>
20 #include <mongocxx/events/command_started_event.hpp>
21 #include <mongocxx/events/command_succeeded_event.hpp>
22 #include <mongocxx/events/heartbeat_failed_event.hpp>
23 #include <mongocxx/events/heartbeat_started_event.hpp>
24 #include <mongocxx/events/heartbeat_succeeded_event.hpp>
25 #include <mongocxx/events/server_changed_event.hpp>
26 #include <mongocxx/events/server_closed_event.hpp>
27 #include <mongocxx/events/server_opening_event.hpp>
28 #include <mongocxx/events/topology_changed_event.hpp>
29 #include <mongocxx/events/topology_closed_event.hpp>
30 #include <mongocxx/events/topology_opening_event.hpp>
32 #include <mongocxx/config/prelude.hpp>
35 inline namespace v_noabi {
41 class MONGOCXX_API
apm {
58 std::function<
void(
const mongocxx::events::command_started_event&)> command_started);
65 const std::function<void(
const mongocxx::events::command_started_event&)>&
command_started()
83 std::function<
void(
const mongocxx::events::command_failed_event&)> command_failed);
90 const std::function<void(
const mongocxx::events::command_failed_event&)>&
command_failed()
108 std::function<
void(
const mongocxx::events::command_succeeded_event&)> command_succeeded);
115 const std::function<void(
const mongocxx::events::command_succeeded_event&)>&
command_succeeded()
133 std::function<
void(
const mongocxx::events::server_opening_event&)> server_opening);
140 const std::function<void(
const mongocxx::events::server_opening_event&)>&
server_opening()
158 std::function<
void(
const mongocxx::events::server_closed_event&)> server_closed);
165 const std::function<void(
const mongocxx::events::server_closed_event&)>&
server_closed()
const;
183 std::function<
void(
const mongocxx::events::server_changed_event&)> server_changed);
190 const std::function<void(
const mongocxx::events::server_changed_event&)>&
server_changed()
208 std::function<
void(
const mongocxx::events::topology_opening_event&)> topology_opening);
215 const std::function<void(
const mongocxx::events::topology_opening_event&)>&
topology_opening()
233 std::function<
void(
const mongocxx::events::topology_closed_event&)> topology_closed);
240 const std::function<void(
const mongocxx::events::topology_closed_event&)>&
topology_closed()
259 std::function<
void(
const mongocxx::events::topology_changed_event&)> topology_changed);
266 const std::function<void(
const mongocxx::events::topology_changed_event&)>&
topology_changed()
284 std::function<
void(
const mongocxx::events::heartbeat_started_event&)> heartbeat_started);
291 const std::function<void(
const mongocxx::events::heartbeat_started_event&)>&
heartbeat_started()
309 std::function<
void(
const mongocxx::events::heartbeat_failed_event&)> heartbeat_failed);
316 const std::function<void(
const mongocxx::events::heartbeat_failed_event&)>&
heartbeat_failed()
335 std::function<
void(
const mongocxx::events::heartbeat_succeeded_event&)>
336 heartbeat_succeeded);
343 const std::function<void(
const mongocxx::events::heartbeat_succeeded_event&)>&
347 std::function<void(
const mongocxx::events::command_started_event&)> _command_started;
348 std::function<void(
const mongocxx::events::command_failed_event&)> _command_failed;
349 std::function<void(
const mongocxx::events::command_succeeded_event&)> _command_succeeded;
350 std::function<void(
const mongocxx::events::server_closed_event&)> _server_closed;
351 std::function<void(
const mongocxx::events::server_changed_event&)> _server_changed;
352 std::function<void(
const mongocxx::events::server_opening_event&)> _server_opening;
353 std::function<void(
const mongocxx::events::topology_closed_event&)> _topology_closed;
354 std::function<void(
const mongocxx::events::topology_changed_event&)> _topology_changed;
355 std::function<void(
const mongocxx::events::topology_opening_event&)> _topology_opening;
356 std::function<void(
const mongocxx::events::heartbeat_started_event&)> _heartbeat_started;
357 std::function<void(
const mongocxx::events::heartbeat_failed_event&)> _heartbeat_failed;
358 std::function<void(
const mongocxx::events::heartbeat_succeeded_event&)> _heartbeat_succeeded;
365 #include <mongocxx/config/postlude.hpp>
Class representing MongoDB application performance monitoring.
Definition: apm.hpp:41
apm & on_command_succeeded(std::function< void(const mongocxx::events::command_succeeded_event &)> command_succeeded)
Set the command succeeded monitoring callback.
const std::function< void(const mongocxx::events::server_changed_event &)> & server_changed() const
Retrieves the server description changed monitoring callback.
apm & on_heartbeat_succeeded(std::function< void(const mongocxx::events::heartbeat_succeeded_event &)> heartbeat_succeeded)
Set the heartbeat succeeded monitoring callback.
apm & on_server_opening(std::function< void(const mongocxx::events::server_opening_event &)> server_opening)
Set the server opening monitoring callback.
apm & on_heartbeat_started(std::function< void(const mongocxx::events::heartbeat_started_event &)> heartbeat_started)
Set the heartbeat started monitoring callback.
apm & on_command_started(std::function< void(const mongocxx::events::command_started_event &)> command_started)
Set the command started monitoring callback.
apm & on_topology_closed(std::function< void(const mongocxx::events::topology_closed_event &)> topology_closed)
Set the topology closed monitoring callback.
const std::function< void(const mongocxx::events::topology_opening_event &)> & topology_opening() const
Retrieves the topology_opening monitoring callback.
const std::function< void(const mongocxx::events::heartbeat_started_event &)> & heartbeat_started() const
Retrieves the heartbeat started monitoring callback.
apm & on_topology_changed(std::function< void(const mongocxx::events::topology_changed_event &)> topology_changed)
Set the topology description changed monitoring callback.
const std::function< void(const mongocxx::events::command_succeeded_event &)> & command_succeeded() const
Retrieves the command succeeded monitoring callback.
apm & on_topology_opening(std::function< void(const mongocxx::events::topology_opening_event &)> topology_opening)
Set the topology_opening monitoring callback.
const std::function< void(const mongocxx::events::heartbeat_failed_event &)> & heartbeat_failed() const
Retrieves the heartbeat failed monitoring callback.
const std::function< void(const mongocxx::events::heartbeat_succeeded_event &)> & heartbeat_succeeded() const
Retrieves the heartbeat succeeded monitoring callback.
apm & on_server_closed(std::function< void(const mongocxx::events::server_closed_event &)> server_closed)
Set the server closed monitoring callback.
apm & on_heartbeat_failed(std::function< void(const mongocxx::events::heartbeat_failed_event &)> heartbeat_failed)
Set the heartbeat failed monitoring callback.
const std::function< void(const mongocxx::events::server_closed_event &)> & server_closed() const
Retrieves the server closed monitoring callback.
const std::function< void(const mongocxx::events::command_started_event &)> & command_started() const
Retrieves the command started monitoring callback.
const std::function< void(const mongocxx::events::topology_changed_event &)> & topology_changed() const
Retrieves the topology description changed monitoring callback.
apm & on_command_failed(std::function< void(const mongocxx::events::command_failed_event &)> command_failed)
Set the command failed monitoring callback.
const std::function< void(const mongocxx::events::topology_closed_event &)> & topology_closed() const
Retrieves the topology closed monitoring callback.
const std::function< void(const mongocxx::events::server_opening_event &)> & server_opening() const
Retrieves the server opening monitoring callback.
apm & on_server_changed(std::function< void(const mongocxx::events::server_changed_event &)> server_changed)
Set the server description changed monitoring callback.
const std::function< void(const mongocxx::events::command_failed_event &)> & command_failed() const
Retrieves the command failed monitoring callback.
The top-level namespace for mongocxx library entities.
Definition: bulk_write.hpp:24