#include <appdynamics.h>
Public Member Functions | |
| Event (const std::string &applicationContext, appd_event_severity severity, const std::string &eventSubType, const std::string &summary, const std::map< std::string, std::string > &properties, const std::map< std::string, std::string > &details) | |
| bool | report () |
Private Member Functions | |
| Event ()=delete | |
| Event (const Event &)=delete | |
Private Attributes | |
| bool | m_success = true |
| appd_event_handle | m_eventHandle = nullptr |
Represents an AppDynamics Event for C++ applications.
An instance of this class defines an event ( equivalent to calling appd_custom_event_start, appd_custom_event_add_property, and appd_custom_event_add_detail) upon construction. Then on this event object report() method should be invoked ( equivalent to calling appd_custom_event_end) to report the event.
A simple usage example is shown below:
{
std::string applicationContext = "";
appd_event_severity severity = APPD_EVENT_SEVERITY_INFO;
std::string eventSubType = "category3";
std::string summary = "This is a summary message.";
std::map<std::string, std::string> properties;
properties.emplace("propertyName", "propertyValue");
std::map<std::string, std::string> details;
details.emplace("detailName", "detailValue");
appd::sdk::Event customEvent(applicationContext, severity, eventSubType, summary,
properties, details);
bool success = customEvent.report();
// other code
}
You cannot copy an Event.
|
inline |
Create a custom event object.
| applicationContext | A string that contains the application context name for this custom event. If the application context is empty, then the default agent is picked. |
| severity | Enum representing the severity for this custom event. |
| eventSubType | A string that contains the custom event subtype. This subtype can be used in controller to filter the custom events belonging to a specific subtype. |
| summary | A string that contains the summary of what this custom event is about. |
| properties | A map that contains the property-name as key and property-value as value. These property-name and property-values cannot be empty, but an empty map can be passed in if there are no properties to pass. |
| details | A map that contains the detail-name as key and detail-value as value. These detail-name and detail-values cannot be empty, but an empty map can be passed in if there are no details to pass. |
|
privatedelete |
|
privatedelete |
|
inline |
Report the custom event.
|
private |
|
private |